Código
#!usr/bin/python #PasteBin Uploader (C) Doddy Hackman 2011 import urllib2,sys,re nave = urllib2.build_opener() nave.add_header = [('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5')] def tomar(web,vars) : return nave.open(web,vars).read() def head(): print "\n-- == PasteBin Uploader == --\n\n" def copyright(): print "\n(C) Doddy Hackman 2011\n" sys.exit(1) def sintax(): print "[+] paste.py <file> <title> <perl/python/ruby/php>\n" def chubir(file,title,type): print "[+] Uploading file\n" try: lineas = open(file,"r").readlines() except: print "[-] Error open file\n" copyright() lin = "".join(lineas) try: code = tomar("http://pastebin.com/api_public.php","paste_code="+str(lin)+"&paste_name="+title+"&paste_format="+type+"&paste_expire_date=N&paste_private=public&submit=submit") except: print "[-] Page offline\n" if re.findall("Bad API request",code): print "[-] Error uploading file\n" else: print "[+] Enjoy : ",code+"\n" copyright() head() if len(sys.argv) != 4 : sintax() else : chubir(sys.argv[1],sys.argv[2],sys.argv[3]) copyright() # The End