Page 1 of 2

Generate Graphs from summary files, using PHP

PostPosted: Tue Feb 15, 2005 4:36 pm
by icefreez
UPDATE:

Images of what this script creates when its done:
Image
Image
Image

Release 2:
Got a new update :)
I need some feedback though :) Post what you think of the script please :D

Download Summary Stats Version 2

NEW:

Added Channels pie chart

Added WEP vs NO WEP pie chart

Added ability to set a GPS grid to get your results from.

More info posted here

Release 1:
Currently it does just creates a customizable pie chart of the venders for all the AP's you output into a Net Stumbler Summary file. (I will add more graphs and information over time)

Download Package 1 of Summary file to Vendor Pie Chart Script

Don't forget you need a server capable of PHP and a mySQL database set up for this script to work.

----------------------------Original post-------------------------
I am working on a project to generate interesting information about NS Summary files.

I want to be able to see things like How many AP's have WEP VS no WEP, how many AP's are on what channels, What is the percentage of my AP's are Cisco routers.

Some of this stuff NS can do, but it lists it out for you not numbers it and percents it.

I will post the files here when I have completed them, but the reason I posted is to ask if anyone else has some ideas on what kind of stats might be interesting to generate.

Script currently requires (PHP Server, 1 mySQL database)

PostPosted: Tue Feb 15, 2005 4:45 pm
by streaker69
icefreez wrote:I am working on a project to generate interesting information about NS Summary files.

I want to be able to see things like How many AP's have WEP VS no WEP, how many AP's are on what channels, What is the percentage of my AP's are Cisco routers.

Some of this stuff NS can do, but it lists it out for you not numbers it and percents it.

I will post the files here when I have completed them, but the reason I posted is to ask if anyone else has some ideas on what kind of stats might be interesting to generate.

Script currently requires (PHP Server, 1 mySQL database)


You mean stats like this?

Database Size 3.29mb
Total Entries: 8125
Data Files 116
Default SSID's 4456
Unique SSID's 2887
Single Hits 3336
Multiple Hits 4789
Infrastructure 7716 94.97%
Ad-Hoc: 409 5.03%
Open Points: 5896 72.57%
Closed Points: 2229 27.43%
802.11b: 5658 69.64%
802.11g: 2467 30.36%
Channel 01: 606 7.46%
Channel 02: 80 0.98%
Channel 03: 138 1.70%
Channel 04: 61 0.75%
Channel 05: 70 0.86%
Channel 06: 4275 52.62%
Channel 07: 86 1.06%
Channel 08: 72 0.89%
Channel 09: 99 1.22%
Channel 10: 372 4.58%
Channel 11: 1668 20.53%

PostPosted: Tue Feb 15, 2005 5:16 pm
by icefreez
Yes

Hopefully there is not already a script out that does that :P If there is I will probably still develope my script taylored to my wants though :)

Right now I play on having the info displayed like this:

VENDORS:
Linksys: 45 (40%)
NetGear 30 (34%)
Cisco 3 (2%)

(MAYBE PUT PIE CHART HERE, maybe;))

Channel 1: 4%
Channel 2: 20%
Channel 3: 6%
Channel 4: 7%
Channel 5: 3%
Channel 6: 50%

PostPosted: Tue Feb 15, 2005 5:59 pm
by streaker69
Those stats are generated from my own script that I wrote for my own website here I keep all my own personal wardriving info.

It really isn't hard to do what you want to do. Just need to know how to enter data into a database and then tabulate it.

PostPosted: Tue Feb 15, 2005 6:37 pm
by icefreez
Ya it hasn't been to hard to do. The hardest thing I had to do was parse the oui.txt file to strip out the vender names and mac address beginnings.

BTW whats the address to your script? I didn't see a link to it off your site and im curious to see what it looks like.

PostPosted: Tue Feb 15, 2005 6:42 pm
by streaker69
icefreez wrote:Ya it hasn't been to hard to do. The hardest thing I had to do was parse the oui.txt file to strip out the vender names and mac address beginnings.

BTW whats the address to your script? I didn't see a link to it off your site and im curious to see what it looks like.


Ya shoulda asked, I already have it parsed out to an XLS and in an Access Database.

PostPosted: Wed Feb 16, 2005 1:19 pm
by icefreez
Ok I'm having a bit of a problem parsing the mac address's out of the summary file. It works fine untill i hit an entry with no address like this.

N 43.9791333 W 96.8158483 ( ) BSS ( 00:02:2d:a5:94:6c ) 03:13:15 (GMT) [ 25 74 49 ] # ( ) 0011 00000040 100 110 6

I am currrently doing this to the file

$fcontents = file ('./sum2.txt'); // File name of stumble summary


for($i=1; $i<sizeof($fcontents); $i++) // Cycles though each line of the code
{
$line = trim($fcontents[$i]);
$line = explode("\t", $line); // Strips up line by Tabs


any tips on how to overcome this?

PostPosted: Wed Feb 16, 2005 1:25 pm
by streaker69
Do you mean no SSID?

In my script which was done in Vbscript, if the SSID is blank then I just have it set the SSID to "NO BROADCAST" which then gets entered in to my database that way.

PostPosted: Wed Feb 16, 2005 2:18 pm
by icefreez
LOL ya umm... sorry :P it was an ID 10 T error :P

I axidently corrupted the tab structure in my test file. So big supprise that tab parsing wasn't working right :P

Everything is working again now.
Close to getting beta 1 of the script up :)

Id 10 T

PostPosted: Wed Feb 16, 2005 8:23 pm
by icefreez
LOL ya umm... sorry :P it was an ID 10 T error :P

I axidently corrupted the tab structure in my test file. So big supprise that tab parsing wasn't working right :P

Everything is working again now.
Close to getting beta 1 of the script up :)

PostPosted: Thu Feb 17, 2005 12:16 am
by icefreez
Well I got my pie chart of my brand names working, but the php pie chart function I am using tends to glitch after a certain number of divisions :(

http://icefreez.com/temp/statscript/stats.php

I will keep working on it. If anyone is intested in the source I will post it, but if not I will wait till I perfect it a bit more.

PostPosted: Thu Feb 17, 2005 6:33 am
by streaker69
icefreez wrote:Well I got my pie chart of my brand names working, but the php pie chart function I am using tends to glitch after a certain number of divisions :(

http://icefreez.com/temp/statscript/stats.php

I will keep working on it. If anyone is intested in the source I will post it, but if not I will wait till I perfect it a bit more.


that's exactly why I never bothered with pie charts on my system. Once you have large amounts of data, the chart is meaningless. Probably the only data that would be worth charting would be channel distribution, Open/closed Ap's and Ad-Hoc/Infrastructure modes. Charting SSID's and vendors you're goin to have a pie chart with hundreds and thousands of slices.

PostPosted: Thu Feb 17, 2005 7:47 am
by icefreez
Ahh I just got an idea. I could set a minimum percentage, so only the top 4 or 5 are listed and the rest are dropped into a Other category :)

EDIT: Now I fixed it to have a min number for a company to be displayed :) Looks nice now :D

http://icefreez.com/temp/statscript/stats.php

PostPosted: Thu Feb 17, 2005 7:54 am
by streaker69
icefreez wrote:Ahh I just got an idea. I could set a minimum percentage, so only the top 4 or 5 are listed and the rest are dropped into a Other category :)


There ya go, now you're cooking with gas.

Finally

PostPosted: Thu Feb 17, 2005 6:44 pm
by icefreez
Ok finally here is my first release of this script. I am pretty happy with how it performs.

Currently it does just creates a customizable pie chart of the venders for all the AP's you output into a Net Stumbler Summary file. (I will add more graphs and information over time)

Download Package 1 of Summary file to Vendor Pie Chart Script

Don't forget you need a server capable of PHP and a mySQL database set up for this script to work.

Please report any bugs you notice.