爱意满满的作品展示区。
bestcondition

写了一个终端 poe-chatgpt 对话工具

  •  
  •   bestcondition ·
    bestcondition · May 28, 2023 · 3002 views
    This topic created in 1108 days ago, the information mentioned may be changed or developed.

    poe-cmd

    地址 github

    主要是openai的接口收费, poe的免费, 所以周末花点时间逆向了一下, 写了一个poe-cmd的终端工具

    逆向

    poe 用 http + graphql 发送问题, 用 websocket 接受结果, 其中 http 里面对 body 做了 md5 签名

    登录那块好像有人机校验, 实在看不懂, 不如就直接拿来 cookie 用吧

    使用

    先从 网页 上开 F12 拿到两个参数

    从这个https://poe.com/api/settings?channel=xxx端点拿到channelCookie

    ts-node index.ts init <channel> <Cookie> 初始化参数

    ts-node index.ts 启动终端

    截图

    运行截图

    感悟

    用 webstorm 找引用 + chrome 打断点, 逆向速度会快很多, 要是 chrome 的 source 能找引用就好了

    最近刚接触逆向, 还是挺有意思的, 逆向出来比程序写出来还兴奋

    第一次写 node ts, 感觉比写了这么久的 python 舒服, json 即对象, 以及接口标注比较对味

    1 replies    2023-05-29 14:24:01 +08:00
    jifengg
        1
    jifengg  
       May 29, 2023
    然后你还可以通过 puppeteer 直接去获取 channel 和 Cookie ,一条龙
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1826 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 16:15 · PVG 00:15 · LAX 09:15 · JFK 12:15
    ♥ Do have faith in what you're doing.