Hack Forums
[Perl] PHP Shell Dork Scanner - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5)
+---- Thread: [Perl] PHP Shell Dork Scanner (/showthread.php?tid=1623842)



PHP Shell Dork Scanner - .K1LL3r - Aug 19, 2011

Simply insert a dork such as:
Code
inurl:c99.php
inurl:loc.php
inurl:r57.php
inurl:c100.php

and it will give you pre-shelled sites

Code
#!/usr/bin/perl

use LWP::Simple;
use LWP::UserAgent;
use HTTP::Request;

print "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
print "+          PHP Shell Scanner          +\n";
print "+      Coded by Erm... AKA H4k3r      +\n";
print "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+";
print "\nInsert Shell Finding Dork > ";
chomp($dork = <STDIN>);
print "\nTotal Query Pages 10 Links/Page > ";
chomp($page = <STDIN>);
print "\n[+]@#~Result~#@[+]\n\n";
for ($start = 0;$start != $page*10;$start += 10)
   {
   $search = "http://www.google.com/search?hl=en&q=".$dork."&btnG=Search&start=".$start;
   $ua = LWP::UserAgent->new(agent => 'Mozilla 5.0');
   $resp = $ua->get($search);
   if ($resp -> is_success)
      {
      $cont = $resp -> content;
      @linkz0r = split (/<a href=/, $cont);
      foreach $line(@linkz0r)
         {
         if ($line =~ /(.*) class=l/ig)
            {
            $click = $1;
            $ua = LWP::UserAgent->new(agent => 'Mozilla 5.0');
            $resp = $ua -> get($click);
            $shelld0m = $resp->content();
            if ($shelld0m =~m/uname -a/)
               {
               print "$click has a shell present\n";
               }
            }
         }
      }
   }



* - . . . - Aug 19, 2011

Thanks for this, but how long does it take to get loads of results, because i'v only got one atm.


* - .K1LL3r - Aug 19, 2011

No problem br0, enjoy ;) 😁😁


* - empathy. - Sep 24, 2011

Thanks bro. I was able to come up with a few results.