usr bin perl use strict use warnings use LWP UserAgent my req filetype

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $req = q|filetype:php intitle:r57shell "[ phpinfo ]"|;
my $hacker = LWP::UserAgent->new(agent => '8====3', Timeout => 5);
my $heck;
my @shells = f3($req);
foreach (@shells) {
$heck = $hacker->get($_)->as_string;
if ( $heck =~ m|Safe_mode:\s<b><font\scolor=\w+>(\w+)</font>|ix ) { print "[+] R57: ".$_."\n" } else { print "[-] NOT A R57. NEXT\n" }
}
sub f3 {
my $dor = shift;
for (0 .. 1) {
$heck .= $hacker->get('http://www.google.com/search?q='.$dor.'&start='.$_.'0&filter=0')->as_string;
sleep 20; }
my @links = $heck =~ m|a hrehf="(\S+)"\sclass=l|g;
return undef unless scalar @links > 1;
return @links;
}