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

时间戳位移后为0,造成的错误字符串长度问题 #188

Closed
kuretru opened this issue Nov 8, 2017 · 2 comments
Closed

时间戳位移后为0,造成的错误字符串长度问题 #188

kuretru opened this issue Nov 8, 2017 · 2 comments

Comments

@kuretru
Copy link
Contributor

kuretru commented Nov 8, 2017

Mon Nov  6 22:11:27 2017 daemon.info pppd[7640]: timenow(Hex)=%ßx
Mon Nov  6 22:11:27 2017 daemon.info pppd[7640]: Begin : beforeMD5
Mon Nov  6 22:11:27 2017 daemon.info pppd[7640]: 1.<>
Mon Nov  6 22:11:27 2017 daemon.info pppd[7640]: 2.<>
Mon Nov  6 22:11:27 2017 daemon.info pppd[7640]: 3.<>
Mon Nov  6 22:11:27 2017 daemon.info pppd[7640]: 4.length=<1>
Mon Nov  6 22:11:27 2017 daemon.info pppd[7640]: End : beforeMD5
Mon Nov  6 22:11:27 2017 daemon.info pppd[7640]: Begin : afterMD5
Mon Nov  6 22:11:27 2017 daemon.info pppd[7640]: 1.MD5use_1=< a>
Mon Nov  6 22:11:27 2017 daemon.info pppd[7640]: 2.MD5use_2=< 8>
Mon Nov  6 22:11:27 2017 daemon.info pppd[7640]: End : afterMD5

近日出现拨号不成功的情况,可以看到传入MD5进行计算的字符串长度为1,原因为11月7号前后的时间戳进行位移运算后,得出的结果类似于0x12 0x00 0x8f 0x38产生了0,导致后续算法strlen(beforeMD5)取到得值为1,传入MD5进行计算的字符串不正确。

可以将路由器时间更改为11月6号之前,临时解决该问题。

@zuishikonghuan
Copy link

万分感谢,我把这个项目移植到 Debian 后,去掉了调试信息,拨不上号了还以为是算法更新了,感谢!

@ErrorCrush
Copy link

@kuretru 能问下,我自己对着教程编译了从你那下载的代码,在路由器里拨号时显示CHAP认证成功,但是就是没网是怎么回事呢,我这是江西南昌,这个方式还是可以破解的,计算账号时显示jiangxi4.0,但是就如你所说的,从6号之后就经常连不上,只有改日期才行,不知道能否帮下忙,垃圾宽带实在闹心

miao1007 added a commit that referenced this issue Aug 30, 2018
@kuretru kuretru closed this as completed Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants