-
-
Save perillamint/de4df6b47a288a72f159 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
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
#It needs address fuzzer. | |
""" | |
pip install requests | |
""" | |
import urllib | |
import requests | |
import binascii | |
import os | |
def create_param(name, pos, addr_1, addr_2): | |
encoding = "utf-8" | |
params = { | |
"ret_action": "http://legislation-sign.com/korcham/SignAgree.html", | |
"randNum": binascii.b2a_hex(os.urandom(11)) + "." + binascii.b2a_hex(os.urandom(4)), | |
"NM": name, | |
"POS": pos, | |
"tmp_addr01": addr_1, | |
"tmp_addr02": addr_2, | |
# "NM": urllib.quote(name.encode(encoding)), | |
# "POS": urllib.quote(pos.encode(encoding)), | |
# "tmp_addr01": urllib.quote(addr_1.encode(encoding)), | |
# "tmp_addr02": urllib.quote(addr_2.encode(encoding)), | |
} | |
return params | |
def vote(name, pos, addr_1, addr_2): | |
url = "http://legislation-sign.com/korcham/SignWriteAct.php" | |
headers = { | |
"User-Agent": "Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)", | |
"Referer": "http://legislation-sign.com/korcham/SignAgree.html", | |
} | |
params = create_param(name, pos, addr_1, addr_2) | |
r = requests.post(url, data=params, headers=headers) | |
print(r.status_code) | |
print(r.text) | |
if __name__ == "__main__": | |
vote(u"박근혜", u"청와대", u"강원도", u"강릉시") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment