[kismac] Intel port -almost- complete

  • From: Geoffrey Kruse <gkruse@xxxxxxxxxxxxxx>
  • To: kismac@xxxxxxxxxxxxx
  • Date: Wed, 22 Feb 2006 21:14:54 -0700

Just writing to let everyone know I have made a large amount of progress on the intel port. Saving and scanning is -mostly- working with both Airport Extreme (active) and prism 2 usb. The largest remaining issue is giving me some trouble though. The hashformac() function seems to return different values for the same input on the intel machines which causes the same net to show up multiple times. I'm going to continue to look into this, but I thought I'd ask the list to see if someone (mick?) can figure this out more quickly than I can. Here is the function:

inline UInt32 hashForMAC(const UInt8* val) {
    UInt32 l, j, k;

    //add to hash table
    memcpy(((char*)&l)+1, val, 3);
    memcpy(((char*)&j)+1, val+3, 3);
    l = (l ^ j) & 0x00FFFFFF;
    memcpy(((char*)&l)+2, val,   2);
    memcpy(((char*)&j)+2, val+2, 2);
    memcpy(((char*)&k)+2, val+4, 2);
    l = (l ^ j ^ k) & 0x0000FFFF;

    return l;

My guess is maybe they bytes in UInt8 * val are swapped or something but I'm not really sure how to fix this. maybe with swab()? FASTLOOKUP seems to not be defined on the code, so it is using the second method to create the hash.

Hope to get this finished up soon, so we can get a little more heavy testing on it. I'm also pretty sure that all cracking methods are still borked but I have no way to test this. We can fix that later when I get my hands on an intel mac.


p.s. Sorry to the non-code oriented people on the list, you can just ignore this

Other related posts: