2023-01-07实用工具0

目录

引入chatgpt

项目地址https://github.com/mamoe/mirai

安装jdk
sudo apt install openjdk-11-jre

在合适的地方新建一个目录
使用Mirai安装器https://github.com/iTXTech/mcl-installer/releases

cd ~
mkdir mirai
cd mirai
wget https://github.com/iTXTech/mcl-installer/releases/download/a969589/mcl-installer-a969589-linux-amd64
chmod +x mcl-installer-a969589-linux-amd64
./mcl-installer-a969589-linux-amd64

安装mirai-api-http
https://github.com/project-mirai/mirai-api-http/releases

cd plugins
wget https://github.com/project-mirai/mirai-api-http/releases/download/v2.7.1/mirai-api-http-v2.7.1.mirai2.jar
cd ..
chmod +x ./mcl
./mcl
exit

修改mirai-api-http

cd config/net.mamoe.mirai-api-http
vim setting.yml

修改为

adapters:
  - ws
debug: true
enableVerify: true
verifyKey: yirimirai
singleMode: false
cacheSize: 4096
adapterSettings:
  ws:
    host: localhost
    port: 8080
    reservedSyncId: -1

登录(在运行的根目录,运行mcl主程序)

./mcl
login [qq号] [密码]

验证码

LOGIN> >
2023-01-07 11:30:28 I/Bot.1731930067: [SliderCaptcha] 正在提交中...
2023-01-07 11:30:28 I/Bot.1731930067: [SliderCaptcha] Submitting...
2023-01-07 11:30:28 I/Bot.1731930067: [SliderCaptcha] 需要滑动验证码, 请按照以下链接的步骤完成滑动验证码, 然后输入获取到的 ticket
2023-01-07 11:30:28 I/Bot.1731930067: [SliderCaptcha] Slider captcha required. Please solve the captcha with following link. Type ticket here after completion.
2023-01-07 11:30:28 I/Bot.1731930067: [SliderCaptcha] @see https://github.com/project-mirai/mirai-login-solver-selenium
2023-01-07 11:30:28 I/Bot.1731930067: [SliderCaptcha] @see https://docs.mirai.mamoe.net/mirai-login-solver-selenium/
2023-01-07 11:30:28 I/Bot.1731930067: [SliderCaptcha] 或者输入 TxCaptchaHelper 来使用 TxCaptchaHelper 完成滑动验证码
2023-01-07 11:30:28 I/Bot.1731930067: [SliderCaptcha] Or type `TxCaptchaHelper` to resolve slider captcha with TxCaptchaHelper.apk
2023-01-07 11:30:28 I/Bot.1731930067: [SliderCaptcha] Captcha link: https://ssl.captcha.qq.com/template/wireless_mqq_captcha.html?style=simple&aid=16&uin=1731930067&sid=1125564158037256020&cap_cd=El8katapxrQ8rwkc_2X9w9KYxa48KGhe00undcX4dwbXYifGGlJk-A**&clientype=1&apptype=2

此时,我们赋值最后这个链接(因人而异),https://ssl.captcha.qq.com/template/wireless_mqq_captcha.html?style=simple&aid=16&uin=1731930067&sid=1125564158037256020&cap_cd=El8katapxrQ8rwkc_2X9w9KYxa48KGhe00undcX4dwbXYifGGlJk-A**&clientype=1&apptype=2 在浏览器中打开,并开启f12开发者工具

拖动滑块完成验证(可能还有汉字验证,也要一并完成)
注意看这里

image.png
找到cap_union_new_verify
复制ticket字样粘贴进去完成验证

引入chatgpt

https://github.com/cssxsh/mirai-openai-plugin/releases

cd plugins
wget https://github.com/cssxsh/mirai-openai-plugin/releases/download/v1.0.7/mirai-openai-plugin-1.0.7.mirai2.jar

获取api key
https://beta.openai.com/account/api-keys

本文作者:墨洺的文档

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!