重新创了一个号,还好只是接口改了,问题不大
本帖最后由 潘钜森 于 2024-6-27 18:05 编辑### \# 前言(唉,老了,不中用了)
> 最近一直在用白鲸和起飞,好久没用蚂蚁了,原账号的用户名和密码忘了。唉~
### \# 抓包(雷电模拟器、HttpCanary)
!(data/attachment/forum/202406/27/172909glss2wlwl15l4cqu.png)
### \# 代码(更换接口和加了个循环)
```python
# -*- encoding: utf-8 -*-
import requests
import time
import json
from base64 import b64decode
from hashlib import sha256, md5
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
code = ['a6aVx', 'bJSZE']# 邀请码
class Ant(object):
def __init__(self, aff):
self.aff = aff
self.oauth_id = ''
self.timestamp = ''
self.url = 'http://antapi3.ymjxopa.com/api.php'
self.headers = {}
self.key = 'fjeldkb4438b1eb36b7e244b37dhg03j'
self.hexkey = 'B496F831128E4FE1DE33F4B7A2C46E0DD4772524A4826FE4486FCC07E3E2B87F'
self.b64key = 'tJb4MRKOT+HeM/S3osRuDdR3JSSkgm/kSG/MB+PiuH8='
@staticmethod
def get_timestamp(long=10):
return str(time.time_ns())[:long]
def decrypt(self, data: str):
ct_iv = bytes.fromhex(data[:32])
ct_bytes = bytes.fromhex(data)
ciper = AES.new(b64decode(self.b64key), AES.MODE_CFB, iv=ct_iv,segment_size=128)
plaintext = ciper.decrypt(ct_bytes)
return plaintext.decode()
def encrypt(self, data: str):
cipher = AES.new(b64decode(self.b64key), AES.MODE_CFB, segment_size=128)
ct_bytes = cipher.iv + cipher.encrypt(data.encode())
return ct_bytes.hex().upper()
def get_sign(self):
template = 'appId=android&appVersion=2.1.8&data={}×tamp={}2d5f22520633cfd5c44bacc1634a93f2'.format(
self.encrypt_data, self.timestamp)
sha = sha256()
sha.update(template.encode())
res = sha.hexdigest()
m = md5()
m.update(res.encode())
res = m.hexdigest()
return res
def request(self, d):
plaintext = {"version": "2.6.5", "app_type": "ss_proxy", "language": 0, "bundleId": "com.android.tnaant"}
d.update(plaintext)
self.timestamp = self.get_timestamp(10)
self.encrypt_data = self.encrypt(json.dumps(d, separators=(',', ':')))
sign = self.get_sign()
data = {
"appId": "android",
"appVersion": "2.1.8",
"timestamp": self.timestamp,
"data": self.encrypt_data,
"sign": sign
}
res = requests.post(url=self.url, data=data, headers=self.headers)
resj = res.json()
res = self.decrypt(resj.get('data'))
print(res)
return res
def get_user(self):
m = md5()
m.update(get_random_bytes(16))
oauth_id = m.hexdigest()
data = {"oauth_id": oauth_id, "oauth_type": "android", "mod": "user", "code": "up_sign"}
self.request(data)
self.oauth_id = oauth_id
print(oauth_id)
def invite(self):
self.get_user()
data = {
"oauth_id": self.oauth_id,
"oauth_type": "android",
"aff": self.aff,
"mod": "user",
"code": "exchangeAFF"
}
self.request(data)
if __name__ == "__main__":
for i in code:
ant = Ant(i)
ant.invite()
```
### \# 总结(可上云)
!(data/attachment/forum/202406/27/180113ednfvvfsgvnzuzv9.png)
> 亲测,只是接口变了,代码不用怎么改。可上云,建议挂Github上刷,欧耶~
### \# 附录(666)
- **原文**
- [【思否】记一次某加速器APP算法解密实现刷邀请](https://segmentfault.com/a/1190000040012580)
- [【吾爱】记一次某加速器APP算法解密实现刷邀请](https://www.52pojie.cn/thread-1441989-1-1.html)
- **软件**
- Visual Studio Code([https://code.visualstudio.com/#alt-downloads](https://code.visualstudio.com/#alt-downloads))
- 雷电模拟器([https://www.ldmnq.com](https://www.ldmnq.com))
- HttpCanary(不提供下载)
- 蚂蚁加速器(不提供下载)
- 白鲸加速器(不提供下载)
- 起飞加速器(不提供下载) 之前闲着无聊改过这个app,然后不知道是bug还是特性,
把我账号改成vip了。。。
(不是本地爆破,是把我账号搞成vip了)
(就是在正版的app上登录,也是vip)
(可惜后来包丢了) 涛之雨 发表于 2024-6-29 23:10
之前闲着无聊改过这个app,然后不知道是bug还是特性,
把我账号改成vip了。。。
我之前也是,就单纯挂Github刷免费时长,然后莫名其妙变成了付费会员,但是几周后就掉了,变回了免费会员{:4_110:} 潘钜森 发表于 2024-6-30 12:49
我之前也是,就单纯挂Github刷免费时长,然后莫名其妙变成了付费会员,但是几周后就掉了,变回了免费会员 ...
不是挂时长,是改app中的vip判断,结果把我改成服务器vip 了 涛之雨 发表于 2024-6-30 17:24
不是挂时长,是改app中的vip判断,结果把我改成服务器vip 了
ggnb!!但是我之前确实有一段时间莫名其妙变成了收费会员,现在也一直不知道怎么回事{:4_88:}
页:
[1]