Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Jake
abuse-mailer
Commits
08c0c117
Commit
08c0c117
authored
Oct 08, 2015
by
Cool Fire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added checking for local networks as source.
parent
b2fcd0a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
scraper.rb
scraper.rb
+3
-2
No files found.
scraper.rb
View file @
08c0c117
...
...
@@ -7,7 +7,8 @@ require 'ipaddr'
fw_logfile
=
'/home/coolfire/fw_alerts.log'
f2b_logfile
=
'/var/log/fail2ban.log'
own_ip
=
IPAddr
.
new
'80.112.131.85'
home_net_4
=
IPAddr
.
new
'80.112.131.85/32'
home_net_6
=
IPAddr
.
new
'2001:470:1f15:958::2:1/64'
cc_address
=
'coolfire@insomnia247.nl'
...
...
@@ -36,7 +37,7 @@ fh.each_line do |line|
ip
=
IPAddr
.
new
ip
# Make sure we don't report ourself
if
(
ip
==
own_
ip
)
if
(
home_net_4
.
include?
ip
||
home_net_6
.
include?
ip
)
next
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment