Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- """
- Need to have pycurl installed
- tdr(dot)local(at)gmail(dot)com
- """
- import re
- import sys
- import pycurl
- import cStringIO
- input = sys.argv[1]
- response = cStringIO.StringIO()
- c = pycurl.Curl()
- c.setopt(c.POST, 1)
- c.setopt(c.URL, "https://www.networktotal.com/upload.php")
- data = [('uploaded', (c.FORM_FILE, input))]
- c.setopt(c.HTTPPOST, data)
- c.setopt(c.SSL_VERIFYPEER, 0)
- c.setopt(c.SSL_VERIFYHOST, 0)
- c.setopt(c.WRITEFUNCTION, response.write)
- #c.setopt(c.VERBOSE, 1)
- c.perform()
- c.close()
- results = response.getvalue()
- #print results
- if 'Sorry' in results:
- print 'The file you tried to upload did not pass the pcap check!Sorry your file was not processed!'
- else:
- print '\nFile '+input+' has been uploaded.\n'
- result = ''.join(re.findall('https.+',results))
- print '\nHASH for query:\n'+result[-42:-9]
- print '\nComplete URL result:\n'+result[:-43]
Add Comment
Please, Sign In to add comment