Click here to Skip to main content
15,881,742 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
import urllib
import urllib2
import cookielib

print "Expolit and Damage ... Project Bee"

url = "http://www.torn.com/authenticate.php"
username = raw_input("Your name: ")
password = raw_input("Your password: ")
query = {'username': username, 'password': password}
data_query = urllib.urlencode(query)
cj  = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
sending_data = opener.open(url, data_query)
print sending data
print response.read()
print response.info()
print response.geturl()


Each time i run this code to the webpage i get redirected to the site's error page telling me am not loggged in yet! ..
Heres a valid username: olabad password: oluwatoyin of which if my login details where to wrong it would take me to a different webpage.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900