Shannon,
I finally had a chance to start digging into this problem.  I found another thing that is puzzling me.  From your log output I see that the first password request should have also failed.
 IPModem password request packet:
     00000000: 02 00 00 00 74 12 6f e6 0a 00 00 00 0a 00 00 00     ....t.o.........
     00000010: e9 ba a1 24 1c 00 00 00 78 56 34 12                 ...$....xV4.
 
     BulkWrite to endpoint 11:
     00000000: 03 00 00 00 ba cb 53 9b 12 f8 c5 27 be 85 a3 e2     ......S....'....
     00000010: 4d 9f dc 43 a6 a9 c4 23 78 56 34 12                 M..C...#xV4.
 
     IPModem read password response.
     00000000: 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
     00000010: 01 00 00 00 1c 00 00 00 78 56 34 12                 ........xV4.
 
     IPModem password accepted.
The password seed is incremented when the password is accepted by the device. The seed is found in packet 0x02.  For this session it was 74 12 6f e6. So the response packet 0x04 should have looked like this:
     00000000: 04 00 00 00 75 12 6f e6 0a 00 00 00 0a 00 00 00
     00000010: 01 00 00 00 1c 00 00 00 78 56 34 12 
The code is just checking if the two seeds were different. I see now that we will have to check if the seed is indeed incremented.

        // check response 04 00 00 00 .......
        // On the 8703e the seed is incremented, retries are reset to 10 when the password is accepted.
        // if( data.GetData()[0] == 0x04  && data.GetData()[8] == 0x0a ) {
                if( data.GetSize() >= 9 && data.GetData()[0] == 0x04 ) {
                        if( memcmp(data.GetData() + 4, seed, sizeof(seed)) == 0 ) {
                                ddout("IPModem invalid password.\n" << data);
                                throw BadPassword("Password rejected by device.", data.GetData()[8], false);
                        }
                        ddout("IPModem password accepted.\n");


But that's not going to fix your problem yet.  :-(

I need another output from you.  This time I need you to use an bad password so I can compare the responses.  If you can create the same log as before, that would be great.  I also need to know the bad password you used so I can check that the password hash is created properly.  PLEASE, DON'T RUN THIS TEST NO MORE THAN TWO TIMES without logging out and then back in to reset the bad password count.

--Andy



------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Barry-devel mailing list
Barry-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/barry-devel

Reply via email to