Jump to content
YOUR-AD-HERE
HOSTING
TOOLS
992Proxy

Locked [Perl] SQLi Scan


sQuo

Recommended Posts

[Perl] SQLi Scan

 

[LENGUAJE=perl]###########################

 

# [Perl] SQLi Scan

 

###########################

 

#!/usr/bin/perl

use warnings;

use strict;

 

use Google::Search;

use LWP::Simple;

use URI;

 

if( @ARGV

print "./scan.pl dork \n";

exit;

}

 

my ($dork, $out) = @ARGV;

if($out) {

open(FILE, '>>' . $out);

}

 

my @list;

my $found = 0;

my $insert = 0;

my $content = 0;

my $search = Google::Search->Web( query => $dork );

 

while ( my $result = $search->next ) {

my $page = $result->uri . "'";

my $content = get($page) or next;

foreach my $line (split("\n", $content)) {

if ($line =~ m/SQL/) {

$found = 1;

}

}

if($found == 1) {

print " [+] $page\n";

my $url = URI->new($page);

my $domain = $url->host;

foreach(@list) {

my $testurl = URI->new($_);

my $testdomain = $testurl->host;

if($domain eq $testdomain) {

$insert = 1;

}

}

if ($insert == 0) {

push(@list, $page);

}

$insert = 0;

} else {

print "[-] $page\n";

}

$found = 0;

}

 

print "\n

[*] Unique results found\n";

foreach (@list) {

print "$_\n";

if($out) {

print FILE "$_\n";

}

}

close(FILE);

 

###########################

 

[/LENGUAJE]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.