zonyitoo / sysuh3c

H3C CLI Client for SYSU, which is implemented in C/C++. With an OpenWRT version.
MIT License
116 stars 37 forks source link

Some question about eap-md5 #34

Closed TXZdream closed 6 years ago

TXZdream commented 6 years ago

I am interested in the auth of h3c, but I am stuck in the md5 part. I have tried md5(hex(id + password + challange)), but the answer is not matched with the eap response I got from wireshark. Can you point out the question?

zonyitoo commented 6 years ago

Remove the hex.

TXZdream commented 6 years ago

The challenge sent by auth server is in hex mode, but the password is written with string, if I remove the hex, which format I should use? Is it means I should transfer all of them from hex to string? I have tried a lot of method, but I can not solve it.

Thanks for your reply.

zonyitoo commented 6 years ago

The challenge sent by auth server is in hex mode, but the password is written with string, if I remove the hex, which format I should use?

Just concatenate them together! You don't need any "format"!.

https://github.com/zonyitoo/sysuh3c/blob/cpp0x/src/eapauth/eapauth.cpp#L104-L106

TXZdream commented 6 years ago

Thank you.