Open Source Institute | CyberArmy Intelligence & Security | CyberArmy Services & Projects

some funny perl code:


[Replies] [Reply] [View by Thread] [Help]
[Back To CyberArmy Public Forum]

Posted by Cpt CyberTNT On 2005-10-11 18:52:41
In Reply to 2002 source code now also released Posted by Ret. Founder Pengo On 2005-10-11 13:16:44

CptCpt
Cpt CyberTNT


denyip.pl
unless ($ip =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/) {

# That regex *should* match all decimal IPs :]

print "That sure didn't look like an IP to me, buddy...\n<BR><BR>\n";

&ourFORM();

} 



unless((0 <= int($1)) && (int($1) <= 255) && (0 <= int($2)) && (int($2) <= 255)
 && (0 <= int($3)) && (int($3) <= 255) && (0 <= int($4)) && (int($4) <= 255)) {

# The IP is out of range...

print "I never saw an IP element over 255 or under 0 before... \n<BR><BR>\n";

&ourFORM();

} 
#################################
5 = PIUUTHXSRIO:TINETYNCNROST = 5
#################################



Replies:


Guest:
Subject:
Message:
Signature:
Optional Image Link:
http://

CyberArmy::Forum v0.6
Generated In 0.02734 seconds


About Us | Privacy Policy | Mission Statement | Help