elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Tutorial básico de Quickjs


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Perl Tk] GoogleHack 0.3
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl Tk] GoogleHack 0.3  (Leído 2,186 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl Tk] GoogleHack 0.3
« en: 1 Diciembre 2011, 22:08 pm »

Simple programa en tk para buscar en google


Código
  1. #!usr/bin/perl
  2. #GoogleHack 0.3
  3. #By Doddy H
  4. #Based in the program GoogleHacks
  5. use Tk;
  6. use Tk::PNG;
  7.  
  8. if ($^O eq 'MSWin32') {
  9. use Win32::Console;
  10. Win32::Console::Free();
  11. }
  12.  
  13. my $ventana = MainWindow->new();
  14. $ventana->title("GoogleHack 0.3 By Doddy H");
  15. $ventana->geometry("370x300+20+20");
  16. $ventana->resizable(0,0);
  17.  
  18. $ventana->Label(-font=>"Impact1",-text=>"String : ")->place(-x=>20,-y=>20);
  19. my $v = $ventana->Entry(-text=>"Test",-width=>"31")->place(-x=>80,-y=>23);
  20. $ventana->Button(-width=>"10",-text=>"Load",-command=>\&now)->place(-x=>278,-y=>23);
  21.  
  22. $ventana->Label(-text=>"Options",-font=>"Impact1")->place(-x=>140,-y=>70);
  23.  
  24. $ventana->Radiobutton(-text =>"Music", -value => "music",-variable=> \$op)->place(-x=>140,-y=>130);
  25. $ventana->Radiobutton(-text =>"Programs", -value => "programs",-variable=> \$op)->place(-x=>140,-y=>160);
  26. $ventana->Radiobutton(-text =>"Book", -value => "book",-variable=> \$op)->place(-x=>140,-y=>190);
  27. $ventana->Radiobutton(-text =>"Videos", -value => "videos",-variable=> \$op)->place(-x=>140,-y=>220);
  28. $ventana->Radiobutton(-text =>"Torrent", -value => "torrent",-variable=> \$op)->place(-x=>140,-y=>250);
  29.  
  30. MainLoop;
  31.  
  32. sub now {
  33.  
  34. my $test = $v->get;
  35. my $link;
  36.  
  37. if ($op eq "music") {
  38. $link = '-inurl:(htm|html|php) intitle:index of +last modified +parent directory +description +size +(.mp3|.wma|.ogg) "'.$test.'"';
  39. }
  40. elsif ($op eq "programs") {
  41. $link = '-inurl:(htm|html|php) intitle:index of +last modified +parent directory +description +size +(.exe|.zip|.ddl) "'.$test.'"';
  42. }
  43. elsif ($op eq "book") {
  44. $link = '-inurl:(htm|html|php) intitle:index of +last modified +parent directory +description +size +(.txt|.pps|.lit|.odt|.doc|.rtf|.zip|.rar|.pdf|.chm) "'.$test.'"';
  45. }
  46. elsif ($op eq "videos") {
  47. $link = '-inurl:(htm|html|php) intitle:index of +last modified +parent directory +description +size +(.mpg|.avi|.flv|.wmv|.di) "'.$test.'"';
  48. }
  49. elsif ($op eq "torrent") {
  50. $link = "$test filetype:torrent";
  51. } else {
  52. $link = "como aprender a escribir";
  53. }
  54. chomp $link;
  55. my $final = "http://www.google.com.ar/search?q=".$link;
  56. system('start firefox "'.$final.'"');
  57. }
  58.  
  59. # The End ?
  60.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
perl
Scripting
nobo 0 3,194 Último mensaje 22 Febrero 2005, 07:49 am
por nobo
Perl
Scripting
zhynar_X 2 2,222 Último mensaje 12 Enero 2008, 04:36 am
por GroK
-=PERL=-
Scripting
D4RIO 1 5,711 Último mensaje 25 Febrero 2008, 17:27 pm
por D4RIO
MSN Perl y PHP
Scripting
isseu 0 2,669 Último mensaje 30 Diciembre 2008, 14:36 pm
por isseu
Libros de Perl online [PERL]
Scripting
madpitbull_99 0 3,833 Último mensaje 18 Mayo 2011, 21:49 pm
por madpitbull_99
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines