Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mechanize
- import time
- br = mechanize.Browser()
- br.set_handle_robots(False)
- br.addheaders = [('user-agent', ' Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3'),
- ('accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8')]
- def login():
- print "Knock knock mQ"
- time.sleep(3)
- print "\nThe Matrix has you..."
- time.sleep(3)
- username = raw_input("Please enter your username: ")
- password = raw_input("Please enter your password: ")
- print "[+]Logging in."
- try:
- br.open("http://niggasin.space")
- except Exception as e:
- print "\nCould not open target URL, please reference the error message below: "
- print
- print e
- br.form = list(br.forms())[0]
- br["username"] = username
- br["password"] = password
- # Submit values for username and password fields
- response = br.submit()
- print "\n[+]Response:"
- print
- print response
- post()
- def post():
- while True:
- br.open("http://niggasin.space/thread/206")
- br.form = list(br.forms())[21]
- br["content"] = "tendies"
- response = br.submit()
- print "\n[+]Response:"
- print
- print response
- print
- print "[+]One hour until your next post"
- time.sleep(3600)
- login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement