Last active
November 3, 2015 10:21
-
-
Save littmus/9625a4436e1edfb3afe9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
import httplib | |
except: | |
import http.client as httplib | |
try: | |
import urllib | |
urllib.urlencode({}) | |
except: | |
import urllib.parse as urllib | |
p = urllib.urlencode({'user_id':'blahsdfi','password':'qwera'}) | |
h = { | |
'Content-Type':'application/x-www-form-urlencoded', | |
'User-Agent':'Mozilla/5.0 (Linux; Android 4.2.2; GT-I9505 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.59 Mobile Safari/537.36' | |
} | |
conn = httplib.HTTPConnection("www.koreapas.com") | |
conn.request("POST", "/bbs/login_check.php", p, h) | |
r = conn.getresponse() | |
try: | |
print(r.msg.as_bytes()) | |
except: | |
print(r.msg) | |
print(r.getheaders()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment