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

 

 


Tema destacado: AIO elhacker.NET 2021 Compilación herramientas análisis y desinfección malware


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


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Ruby] PasteBin Uploader
« en: 16 Octubre 2011, 02:50 am »

Un simple programa para subir codigos a pastebin

Código
  1. #!usr/bin/ruby
  2. #PasteBin Uploader  (C) Doddy Hackman 2011
  3.  
  4. require "net/http"
  5.  
  6. def head()
  7. print "\n\n-- == PasteBin Uploader\n\n\n"
  8. end
  9.  
  10. def copyright()
  11. print "\n\n(C) Doddy Hackman 2011\n\n"
  12. exit(1)
  13. end
  14.  
  15. def uso()
  16. print "\n[+] up.rb <file> <titulo> <tipo>\n"
  17. end
  18.  
  19. def tomar(web,par)
  20.   return Net::HTTP.post_form(URI.parse(web),par).body
  21.   end
  22.  
  23. def subir(file,titulo,tipo)
  24.  
  25. begin
  26. archivo = File.open(file)
  27. lineas = archivo.readlines
  28. rescue
  29. print "\n[-] Error open file\n"
  30. end
  31.  
  32. print "[+] Uploading file\n\n"
  33.  
  34. code = tomar("http://pastebin.com/api_public.php",{"paste_code" =>lineas,"paste_name"=>titulo,"paste_format"=>tipo,"paste_expire_date"=>"N","paste_private"=>"public","submit"=>"submit"})
  35.  
  36. if code=~/Bad API request/
  37. print "[-] Error uploading\n"
  38. else
  39. print "[+] Enjoy : "+code+"\n"
  40.  
  41. end
  42. end
  43.  
  44. file = ARGV[0]
  45. titulo = ARGV[1]
  46. tipo = ARGV[2]
  47.  
  48. head()
  49. if !file and !titulo and !tipo
  50. uso()
  51. else
  52. subir(file,titulo,tipo)
  53. end
  54. copyright()
  55.  
  56. # ¿ The End ?
  57.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Perl] PasteBin Uploader
Scripting
BigBear 0 2,237 Último mensaje 8 Octubre 2011, 16:55 pm
por BigBear
[Python] PasteBin Uploader
Scripting
BigBear 1 3,513 Último mensaje 9 Febrero 2012, 15:03 pm
por Eleкtro
[APORTE] [RUBY] Shack (Imageshack Uploader)
Scripting
Eleкtro 0 1,677 Último mensaje 19 Marzo 2012, 15:18 pm
por Eleкtro
[RUBY] [WINDOWS] IShack v1.4 (ImagesHack Uploader) ...(24/10/2012)
Scripting
Eleкtro 6 5,416 Último mensaje 27 Octubre 2012, 00:33 am
por Garcad
[RUBY] [WINDOWS] Pastebin Uploader
Scripting
Eleкtro 0 2,245 Último mensaje 10 Diciembre 2012, 21:02 pm
por Eleкtro
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines