Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blocklist-with-ipset
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
virus2500
blocklist-with-ipset
Commits
de36fe80
Commit
de36fe80
authored
10 years ago
by
virus2500
Browse files
Options
Downloads
Patches
Plain Diff
removed not anymore needed isIpv4 sub
parent
166fd045
No related branches found
Branches containing commit
Tags
v1.0.2
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
blocklist.pl
+1
-16
1 addition, 16 deletions
blocklist.pl
with
1 addition
and
16 deletions
blocklist.pl
+
1
−
16
View file @
de36fe80
...
@@ -198,7 +198,7 @@ sub addIpsToBlocklist {
...
@@ -198,7 +198,7 @@ sub addIpsToBlocklist {
}
else
{
}
else
{
$skipped
++
;
$skipped
++
;
}
}
}
}
}
}
foreach
$line
(
uniq
(
@fileArray
))
{
foreach
$line
(
uniq
(
@fileArray
))
{
if
((
exists
$ipsetArray
{"
$line
"})
||
(
$line
~~
@whiteListArray
))
{
if
((
exists
$ipsetArray
{"
$line
"})
||
(
$line
~~
@whiteListArray
))
{
...
@@ -282,21 +282,6 @@ sub cleanup {
...
@@ -282,21 +282,6 @@ sub cleanup {
}
}
############### END cleanup ######################
############### END cleanup ######################
############ isIpv4 #############
## check if given value looks ##
## like an ipv4 ip address ##
#################################
sub
isIpv4
{
my
(
$isIp
)
=
@_
;
if
(
$isIp
=~
m/^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/
)
{
#print "It's an IPv4\n";
return
$isIp
;
}
else
{
return
0
;
}
}
######### END isIpv4 ##########
###### log #######
###### log #######
## log $message ##
## log $message ##
##################
##################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment