Skip to content
Snippets Groups Projects
Commit de36fe80 authored by virus2500's avatar virus2500
Browse files

removed not anymore needed isIpv4 sub

parent 166fd045
No related branches found
Tags v1.0.2
No related merge requests found
...@@ -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 ##
################## ##################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment