python贴吧发帖脚本-分享用Python写的99收抢单小脚本,仅供学习

实测挂2~3分钟可以刷到个10元,哈哈

在前面填写账号密码还有99开发者中心的私钥,然后用Python2跑即可

抢到单会自动暂停,但不会任何通知,请记得留意Log输出#!/usr/bin/python

#-*-coding:utf-8-*-

# 免责声明:以下脚本内容仅做为技术研究之用,请勿用于非法用途,造成后果与作者无任何关系!

import httplib, urllib, json, time, hashlib

# 用户名

username = ''

# 密码

password = ''

# 私钥

securitykey = ''

# 金额 (可选面值:10、20、30、50、100、200、300、500)

money = '10'

def main():

# 登录

conn = httplib.HTTPConnection(host='99shou.cn')

conn.request(method='POST', url='http://99shou.cn/api/user-server/user/login', body=json.dumps({'username' : username, 'password' : password}), headers={'Content-Type' : 'application/json; charset=utf-8'})

response = conn.getresponse()

if response.status != 200:

# 登录失败

fail(-1)

data = json.loads(str(response.read()))

conn.close()

if data['rtnCode'] != '000000':

print data['rtnMsg']

fail(data['rtnCode'])

token = data['rtnData']['token']

while 1:

txntime = str(int(round(time.time() * 1000)))

# 参数

params = json.dumps({'faceValue' : money})

md5 = hashlib.md5()

md5.update(params+securitykey+txntime)

sign = md5.hexdigest()

conn = httplib.HTTPConnection(host='99shou.cn')

conn.request(method='POST', url='http://99shou.cn/api/phonecharge-server/phonecharge/phone/receive', body=params, headers={'Content-Type' : 'application/json; charset=utf-8', 'channelid' : 'OP0001', 'token' : token, 'txntime' : txntime, 'sign' : sign})

response = conn.getresponse()

if response.status == 200:

data = json.loads(str(response.read()))

print data['rtnMsg']

if data['rtnCode'] == '000000':

exit()

time.sleep(1)

conn.close()

def fail(code):

print 'Fail: ' + str(code)

exit()

if __name__ == '__main__':

main()

python贴吧发帖脚本-分享用Python写的99收抢单小脚本,仅供学习_第1张图片

来源

>>线报有时效性,及时参加,以免失效!

你可能感兴趣的:(python贴吧发帖脚本-分享用Python写的99收抢单小脚本,仅供学习)