Código
#!usr/bin/ruby #PasteBin Uploader (C) Doddy Hackman 2011 require "net/http" def head() print "\n\n-- == PasteBin Uploader\n\n\n" end def copyright() print "\n\n(C) Doddy Hackman 2011\n\n" exit(1) end def uso() print "\n[+] up.rb <file> <titulo> <tipo>\n" end def tomar(web,par) return Net::HTTP.post_form(URI.parse(web),par).body end def subir(file,titulo,tipo) begin archivo = File.open(file) lineas = archivo.readlines rescue print "\n[-] Error open file\n" end print "[+] Uploading file\n\n" 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"}) if code=~/Bad API request/ print "[-] Error uploading\n" else print "[+] Enjoy : "+code+"\n" end end file = ARGV[0] titulo = ARGV[1] tipo = ARGV[2] head() if !file and !titulo and !tipo uso() else subir(file,titulo,tipo) end copyright() # ¿ The End ?