Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么都用bytes写入,不理解 #304

Closed
wp19991 opened this issue Nov 22, 2022 · 18 comments
Closed

为什么都用bytes写入,不理解 #304

wp19991 opened this issue Nov 22, 2022 · 18 comments

Comments

@wp19991
Copy link

wp19991 commented Nov 22, 2022

client.go里面里面的代码是需要加密吗,为什么都用bytes写入写出。
想要完成用qqtoken去登录第三方网页,现在token看都看不到,全是bytes。

@Mrs4s
Copy link
Owner

Mrs4s commented Nov 22, 2022

为啥不用bytes

@wp19991
Copy link
Author

wp19991 commented Nov 23, 2022

看半天没看懂如何利用seession.token登录qq
可能是我水平还不够吧
可以分享一下登录的流程吗@Mrs4s

@Ink-33
Copy link
Contributor

Ink-33 commented Nov 23, 2022

有没有可能这个东西不太方便解释明白

@wp19991
Copy link
Author

wp19991 commented Nov 23, 2022

网上的资料关于如何登录的qq的很少
会不会是自己通过tcp抓包分析的过程

@wp19991
Copy link
Author

wp19991 commented Nov 23, 2022

想要完成用qqtoken去登录第三方网页
现在也找不到头绪开始写这个功能

@wp19991
Copy link
Author

wp19991 commented Nov 23, 2022

就是这个文件,里面还有发送数据包的代码

func (c *QQClient) sendAndWait(seq uint16, pkt []byte, params ...network.RequestParams) (any, error) {

@NWYLZW
Copy link

NWYLZW commented Nov 23, 2022

为什么你会问为什么都用 bytes 写入,不理解

@wfjsw
Copy link
Contributor

wfjsw commented Nov 23, 2022

不用bytes难道用string吗,这又不是ascii协议

@wp19991
Copy link
Author

wp19991 commented Nov 23, 2022

首先我是想拿着token去直接请求登录第三方网页,然后打开seession.token,看到是二进制不是明文,就去看源码
源码里面关于登录的都是bytes,就准备看如何把bytes变成能看到的token
发现越陷越深,加上我之前没学过go语言,语法和qq的登录过程也不太清楚
然后就提出了这个问题

@wp19991
Copy link
Author

wp19991 commented Nov 23, 2022

既然这个token可以快速登录,能不能单独独立出来,可以用其他语言带着token去请求网页

@NWYLZW
Copy link

NWYLZW commented Nov 23, 2022

#304 (comment)

@wfjsw
Copy link
Contributor

wfjsw commented Nov 23, 2022

不能

@wp19991
Copy link
Author

wp19991 commented Nov 23, 2022

目前我知道网页的扫码登录,那里面的token有效期只有2天,而这个登录的可以一直快速登录,就很好奇怎么实现的

@wfjsw
Copy link
Contributor

wfjsw commented Nov 23, 2022

你为啥觉得这个token可以登录网页

@wp19991
Copy link
Author

wp19991 commented Nov 23, 2022

和这个项目依赖的项目有一个未实现的接口,没有实现的原因也是因为这个token不能去登录网页?
/get_cookies

@wp19991
Copy link
Author

wp19991 commented Nov 23, 2022

go-cqhttp的项目里面,我是从那个项目依赖找到这个项目的

@abrahum
Copy link

abrahum commented Nov 23, 2022

这个token你的q退出后重开时用的,和你网页登录的授权完全不是一个东西

@Mrs4s Mrs4s closed this as completed Nov 23, 2022
@wp19991
Copy link
Author

wp19991 commented Nov 23, 2022

但是在普通的电脑上登录qq后,打开第三方网页可以不需要登录点击头像完成网页登录的授权
这个功能应该只有qq自己人才能写了
我之前隐约的注意到远程桌面的时候不能点击头像完成网页登录的授权

Repository owner locked as off-topic and limited conversation to collaborators Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants