drcoms / drcom-HC5661-1s-patch

Dr.COM/DrCOM HC5661 补丁

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

U60可以登录,但是会不断登录注销

charli2014 opened this issue · comments

我们学校使用的U60,使用此程序可以登录,但是会不断的登录注销。
2014-06-23_132344

下面是登陆时的调试显示:
[challenge] recv 02027f0ae2a8a80000000100f003e8f000000000ac18cd040400a8a20000294d4d3f00000000d802000000000000000000000000000000000000000000000000000000000000000000000000
[DEBUG] challenge:
02027f0ae2a8a80000000100f003e8f000000000ac18cd040400a8a20000294d4d3f00000000d802000000000000000000000000000000000000000000000000000000000000000000000000
[challenge] challenge packet sent.
[mkpkt] 0301001c65f93a78d31b4c4fc1649404360a6b1b3230313034333933000000000000000000000000000000000000000000000000000000002002dd71d97dc59bd9df0d329bb566aa642aeed415f0ce280100000000000000000000000000000000227685387592748901000000004472636f6d0000000000000000000000000000000000000000000000000000000808080800000000000000000000000000000000940000000500000001000000280a0000020000004c696e75780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00020c904cb9c70000b888e30516800000e913
[login] send 0301001c65f93a78d31b4c4fc1649404360a6b1b3230313034333933000000000000000000000000000000000000000000000000000000002002dd71d97dc59bd9df0d329bb566aa642aeed415f0ce280100000000000000000000000000000000227685387592748901000000004472636f6d0000000000000000000000000000000000000000000000000000000808080800000000000000000000000000000000940000000500000001000000280a0000020000004c696e75780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00020c904cb9c70000b888e30516800000e913
[login] recv 0400000500c95b000022511605ffffffffff00000000004472636fcaca00a33c4aac18cd0401e5b0050b00010000003ac80a00ffffff0000000000caca0000fffff00000000000caca4000fffff00000000000dac28000fffff00000000000dbdd6000ffffe00000000000dec68000ffffe00000000000b4558000ffff800000000000c0a80000ffff000000000000ac100000fff00000000000000a000000ff0000000100000000000000000000000110
[login] packet sent.
[login] loged in
[login] login sent
package_tail 4472636fcaca00a33c4aac18cd0401e5
starting to empty socket buffer
recived sth unexcepted 4d3a633a687474703a2f2f6a6764772e6371752e6564752e636e2f68746d6c2f7765622f313534352e68746d
exception in empty_socket_buffer
emptyed
[keep_alive1] send ff65f93a78d31b4c4fc1649404360a6b1b0000004472636fcaca00a33c4aac18cd0401e50a6800000000
[keep-alive1] recv 0701100006000a686833f705ac18cd04a8a20000294d4d3f00000000d8020000030000000000000005000000c95b000022511605ffffffffffffffffffffffff
[keep-alive2] send1 070028000b010f272f12000000000000000000000000000000000000000000000000000000000000
[keep-alive2] recv1 070010010b06d8022f12000000000000a8a20000294d4d3f00000000d80200004d5a90000300000004000000ffff0000b800000000000000400000000000000000000000000000000000000000000000000000000000000000000000080100000e1fba0e00b409cd21b8014ccd21546869732070726f6772616d2063616e6e6f742062652072756e20696e20444f53206d6f64652e0d0d0a2400000000000000be4ff959fa2e970afa2e970afa2e970aa30d840af82e970a81329b0afe2e970a7926ca0af02e970a7932990af82e970a95319c0afb2e970a95319d0aff2e970a9531930af82e970afa2e960a492e970acc08930af92e970acc089c0af22e970a3d28910afb2e970a050e930af92e970a
[keep-alive2] send2 070128000b01dc022f12000000000000000000000000000000000000000000000000000000000000
[keep-alive2] recv2 070110010b06d8022f12000000000000a8a20000294d4d3f00000000d80200004d5a90000300000004000000ffff0000b800000000000000400000000000000000000000000000000000000000000000000000000000000000000000080100000e1fba0e00b409cd21b8014ccd21546869732070726f6772616d2063616e6e6f742062652072756e20696e20444f53206d6f64652e0d0d0a2400000000000000be4ff959fa2e970afa2e970afa2e970aa30d840af82e970a81329b0afe2e970a7926ca0af02e970a7932990af82e970a95319c0afb2e970a95319d0aff2e970a9531930af82e970afa2e960a492e970acc08930af92e970acc089c0af22e970a3d28910afb2e970a050e930af92e970a
[keep-alive2] send3 070228000b03dc022f12000000000000a8a200000000000000000000000000000000000000000000
Traceback (most recent call last):
File "/usr/bin/wired.py", line 318, in
main()
File "/usr/bin/wired.py", line 316, in main
keep_alive2(SALT,package_tail,password,server)
File "/usr/bin/wired.py", line 148, in keep_alive2
data, address = s.recvfrom(1024)
socket.timeout: timed out

这种是不是不匹配U60导致的?

喔, 这个问题似乎以前解决过, 但是忘掉了修正的方案, 能否截一段完整的客户端登陆的封包发到我的邮箱里我对照一下。
顺便附上密码,最该改成123456之类的简单的。

邮箱:latyas@gmail.com

已经发送相关信息到你邮箱了,十分感谢

看了一下心跳部分,发现区别在

07fc28000b02 d802 0c0c0000000000007401fb050000000000000000000000000000000000000000

尝试一下对 drcom-generic-debug-u62.py 进行如下修改

85行到88行

    if first :
      data += '\x0f\x27'
    else:
      data += '\xdc\02'

修改为

    data += "\xd8\x02"

试一试看看能不能正常心跳了?

正常了,没有出现以前的情况了。非常感谢,wired.py中是不是也做同样的更改?

修改wired.py后可以使用了,没有其他文件需要修改了的吧。再次感谢!!!

嗯,事实上只用得到wired.py,另一个用不到啦~

恭喜恭喜,从drcom中解放啦~

commented

charli2014 同学是cqu的么
感谢lyj同学 👍

对呀。

来自 MEIZU MX

-------- 原始邮件 --------
发件人:ln notifications@github.com
时间:周一 7月7日 12:37
收件人:drcoms/HC5661-1s-patch HC5661-1s-patch@noreply.github.com
抄送:charli2014 lichanglin2012@foxmail.com
主题:Re: [HC5661-1s-patch] U60可以登录,但是会不断登录注销 (#1)

charli2014 同学是cqu的么
感谢lyj同学 👍


Reply to this email directly or view it on GitHub:
#1 (comment)

执行drcom-generic-debug-u62.py文件,
一直显示[challenge] timeout, retrying...
怎么解决?

我这边也显示[challenge] timeout, retrying... 这个是802.1x协议的问题?

如果是802.1x需要先通过802.1x认证,这样交换机才会打开你的物理端口。
drcoms 群组下已经有802.1x测试程序,需要linux的测试环境,目前没人测试好伤心…

802.1x可以在win下做测试吗?

可以,我有空帮你测试。我看过那个,不用改什么东西吗?

------------------ 原始邮件 ------------------
发件人: "fax001";notifications@github.com;
发送时间: 2014年10月19日(星期天) 下午3:19
收件人: "drcoms/HC5661-1s-patch"HC5661-1s-patch@noreply.github.com;
抄送: "Communication、"441635966@qq.com;
主题: Re: [HC5661-1s-patch] U60可以登录,但是会不断登录注销 (#1)

802.1x可以在win下做测试吗?


Reply to this email directly or view it on GitHub.

@fax001 不清楚python怎么在windows下发raw data的包,所以暂时只能在linux下测试

@441635966 也许应该是不用改什么东西,试试看运行的情况?

在电脑上运行wired.py能成功登陆,但是在路由器上运行python /usr/bin/wired.py,就出现了下面的错误。(重庆大学 drcom5.20版)

[challenge] timeout, retrying...
File "/usr/bin/wired.py", line 321, in
main()
File "/usr/bin/wired.py", line 311, in main
package_tail = login(username, password, server)
File "/usr/bin/wired.py", line 251, in login
salt = challenge(svr,time.time()+random.randint(0xF,0xFF))
File "/usr/bin/wired.py", line 51, in challenge
log('[challenge] timeout, retrying...')
File "/usr/bin/wired.py", line 41, in log
f.write(s + '\n')