[kismac] Re: Intel port -almost- complete

  • From: Michael Rossberg <mick@xxxxxxxxxxxxxxxx>
  • To: kismac@xxxxxxxxxxxxx
  • Date: Thu, 23 Feb 2006 06:02:14 +0100


next time you can write me directly =). swapping is not really something you want to do here. because it is slow and this function needs to be fast. it also does not matter if it returns a different value on intel machines, as long as it always returns the same on that machines (wont affect saved files). however currently the function will always return 0 or some in defined value. you will need to remove the +1's and +2's i belive...
the fast lookup is indeed not used currently because of its intense memory usage...
good luck


On 23.02.2006, at 05:14, Geoffrey Kruse wrote:

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: