| Crates.io | devicecheck |
| lib.rs | devicecheck |
| version | 1.0.2 |
| created_at | 2024-12-03 04:06:33.886086+00 |
| updated_at | 2024-12-03 04:16:10.541069+00 |
| description | chatgpt preauth devicecheck server |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1469644 |
| size | 98,475 |
这是一个适用于iOS/iPad设备的HTTP中间人代理,用于抓取device_token
最新版的ChatGPT APP已上SSL pinning验证,使用前提:
iOS/iPad设备需要越狱或者已经安装巨魔(越狱后也可以安装)巨魔商店安装TrollFools,下载👉 动态库注入到ChatGPT以上只是推荐的方法,当然也有其它方法,目的是绕过SSL pinning
$ devicecheck -h
chatgpt preauth devicecheck server
Usage: devicecheck
devicecheck <COMMAND>
Commands:
run Run server
start Start server daemon
restart Restart server daemon
stop Stop server daemon
log Show the server daemon log
ps Show the server daemon process
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
$ devicecheck run -h
Run server
Usage: devicecheck run [OPTIONS]
Options:
-d, --debug Debug mode
-b, --bind <BIND> Bind address [default: 0.0.0.0:1080]
-p, --proxy <PROXY> Upstream proxy
--cert <CERT> MITM server CA certificate file path [default: ca/cert.crt]
--key <KEY> MITM server CA private key file path [default: ca/key.pem]
-h, --help Print help
# 需要先安装rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install --git https://github.com/penumbra-x/devicecheck
该代理不会像正常代理一样提供网络代理,目的是抓包device_token。如果害怕使用多了会被封设备,我建议是使用一些一键换机之类的仿冒设备的软件。
devicecheck run
# 带代理
devicecheck run --proxy http://192.168.1.1:1080
devicecheck start
# 带代理
devicecheck start --proxy http://192.168.1.1:1080
Wi-Fi/Shadowrocket设置HTTP代理
浏览器打开http://192.168.1.100:1080/mitm/cert,替换你的代理IP以及端口,打开下载安装以及信任证书。到这里就彻底完成了,由于Hook了ChatGPT的网络请求,有以下两种抓取更新device_token的动作:
APP都会抓取一次,APP任意点击登录会抓取一次,同理点击取消往复操作也生效。preauth_cookie请求接口http://192.168.1.100:1080/auth/preauth,替换你的代理IP以及端口,示例:
curl http://127.0.0.1:1080/auth/preauth
{
"preauth_cookie": "900175BB-61C4-4AA2-B400-4DE3B2E1FD7E:1726892032-9nYJ1mU4JSUAEyhACbVOxYoCATD4uXX8H1HZRJzYQ4E%3D"
}
到这里项目的使命已经完成,你可以将preauth_cookie用在ios.chat.openai.com的接口或者登录。
cookie大概会在一段时间内过期(具体不记得什么时间了,24小时?)/auth/preauth接口