Foro de elhacker.net

Programación => Scripting => Mensaje iniciado por: BigBear en 1 Diciembre 2011, 22:09 pm



Título: [Perl Tk] SerialFinder 0.2
Publicado por: BigBear en 1 Diciembre 2011, 22:09 pm
Simple programa en tk para buscar seriales de programas o juegos

Código
  1. #!usr/bin/perl
  2. #SerialFinder 0.2
  3. #By Doddy H
  4.  
  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("SerialFinder 0.2 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 $p = $ventana->Entry(-text=>"Nero",-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 =>"serials.be", -value => "serials.be",-variable=> \$op)->place(-x=>130,-y=>130);
  25. $ventana->Radiobutton(-text =>"serials.ws", -value => "serials.ws",-variable=> \$op)->place(-x=>130,-y=>160);
  26. $ventana->Radiobutton(-text =>"cracks.vg", -value => "cracks.vg",-variable=> \$op)->place(-x=>130,-y=>190);
  27. $ventana->Radiobutton(-text =>"serialportal.com", -value => "serialportal.com",-variable=> \$op)->place(-x=>130,-y=>220);
  28. $ventana->Radiobutton(-text =>"freeserials.ws", -value => "freeserials.ws",-variable=> \$op)->place(-x=>130,-y=>250);
  29.  
  30. MainLoop;
  31.  
  32. sub now {
  33.  
  34. my $link;
  35. my $test = $p->get;
  36.  
  37. chomp $test;
  38.  
  39. if ($op eq "serials.be") {
  40. $link = "http://www.serials.be/search_serial.php?serial=".$test;
  41. }
  42. elsif ($op eq "serials.ws") {
  43. $link = "http://www.serials.ws/?chto=".$test;
  44. }
  45. elsif ($op eq "cracks.vg") {
  46. $link = "http://www.cracks.vg/search.php?query=".$test;
  47. }
  48. elsif ($op eq "serialportal.com") {
  49. $link = "http://www.serialportal.com/search.php?serial=".$test;
  50. }
  51. elsif ($op eq "freeserials.ws") {
  52. $link = "http://www.freeserials.ws/?q=".$test."&Search=Search";
  53. } else {
  54. $link = "http://www.google.com.ar/search?q=como aprender a escribir";
  55. }
  56.  
  57. system("start firefox $link");
  58.  
  59. }
  60.  
  61. # The End ?
  62.