Results 1 to 6 of 6

Thread: NS1 Format fixes

  1. #1

    Default NS1 Format fixes

    I found at least 2 issues with the way Inssider 2 exports NS1 files.

    1. The speed (data rate) is calculated incorrectly. In the NS1 file format specification, this field is defined in units of 100kbps. I looked at the source code and I found that the original value (expressed in mbps) is multiplied by 1024 and then divided by 100. 1 mbit = 1000 kbits, not 1024kbits. So it should only be multiplied by 10.

    Code:
     Line 119: bData.AddRange(BitConverter.GetBytes(((int)ap.MaxRate) * 10));
    2. When exporting to NS1 every client is detected as "Peer" or "Ad-hoc". This is fixed easily by modifying lines 70 and 75:

    Code:
    67://802.11 capability flags. This just shows if the AP uses WEP and/or is AdHoc
    68:                if(ap.Privacy.ToLower() == "wep")
    69:                {
    70:                    if (ap.NetworkType != "Access Point") bData.AddRange(new byte[]  { 0x12, 0x00, 0x00, 0x00 });
    71:                     else bData.AddRange(new byte[] { 0x11, 0x00, 0x00, 0x00 });
    72:                }
    73:                else
    74:                {
    75:                    if (ap.NetworkType != "Access Point") bData.AddRange(new byte[] { 0x02, 0x00, 0x00, 0x00 });
    76:                    else bData.AddRange(new byte[] { 0x01, 0x00, 0x00, 0x00 });
    77:                }

  2. #2

    Default

    Hello,

    I was wondering why the max rate was never quite 54.

    I don't quite agree with the 2nd set of changes, It really should be this:
    Code:
    if(ap.Privacy.ToLower() != "none")
    {
    	if(ap.NetworkType != "Infrastructure" && ap.NetworkType != "Access Point") bData.AddRange(new byte[] { 0x12, 0x00, 0x00, 0x00 });
    	else bData.AddRange(new byte[] { 0x11, 0x00, 0x00, 0x00 });
    }
    else
    {
    	if (ap.NetworkType != "Infrastructure" && ap.NetworkType != "Access Point") bData.AddRange(new byte[] { 0x02, 0x00, 0x00, 0x00 });
    	else bData.AddRange(new byte[] { 0x01, 0x00, 0x00, 0x00 });
    }
    I did this because APs show up as "Infrastructure" for me(using Win7), and I think they show up as "Access Point" on XP.

    I've put these changes into the source for the next update.

    Thanks.

  3. #3

    Default

    Actually, for the 2nd set of changes you should change one line in the Utilities.cs file:

    Code:
    Line 48: new ValueString( (int)NetworkInfrastructure.Ndis80211Infrastructure, "Infrastructure" ),
    That way it is consistent with how it's called in Win7.

  4. #4

    Default

    Excellent observation, added!

  5. #5

    Default

    I have a suggestion: For every thread that has an implemnted solution, like above- can we mark the entry as ARCHIVE IN 1 YEAR, and then each NEW YEAR, delete or (ARCHIVE) every thread so designated. That would free up the database(prime),
    so that people wouldn't see old , ancient obsolete entries such as .. A meg is 1000 not 1024, and bug corrected in current release(name it). etc etc.. this reduces dead-code!!

  6. Default

    Thanks this is a pretty good suggestion actually. I'll see what we can do about it. Thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •