Jump to content
Sign in to follow this  
darkjohn20

Network Connection Information?

Recommended Posts

darkjohn20

Is there any way to collect information about all connections (wireless or not) to a network? I seem to recall something like this that had already been made? I'm not quite sure.

Basically I want to grab information about connections without actually knowing the name or anything.

For example, if I'm on a laptop at a hotel or at school, I could be getting several networks that I could connect to. I want to retrieve any data that I can about these networks.

I don't really have any script yet because:

1) I want to know if this has already been done (at least partially)

2) I don't exactly know where to start.

I will continue looking around in the mean time. Thanks!

Edit: Maybe it has to do with ws2_32.dll?

I have looked at Windows Socket functions and here's what I found:

http://msdn.microsoft.com/en-us/library/ms738566%28v=VS.85%29.aspx

http://msdn.microsoft.com/en-us/library/ms741563%28v=VS.85%29.aspx

I'm not quite sure what to do, but here's my attempt:

#include <Array.au3>

Global $DLL = "ws2_32.dll", $hLookup

$sWSADATA = DllStructCreate("word Version;word HighVersion;char Description[256];char SystemStatus[256];ushort MaxSockets;ushort MaxUdpDg")
$sWSAQUERYSET = DllStructCreate("dword Size;str ServiceInstanceName;str ServiceClassId;str Version;str Comment;dword NameSpace;str NSProviderId;str Context;dword NumberOfProtocals;str apfProtocals;str QueryString;dword NumberOfCsAddrs;str csaBuffer;dword OutputFlags;str Blob")
DllStructSetData($sWSAQUERYSET, "Size", DllStructGetSize($sWSAQUERYSET))

$WSAStartup = DllCall($DLL, "int", "WSAStartup", "word", "2.2", "ptr", DllStructGetPtr($sWSADATA))
_ArrayDisplay($WSAStartup)

$WSALookupServiceBegin = DllCall($DLL, "int", "WSALookupServiceBegin", "ptr", DllStructGetPtr($sWSAQUERYSET), "dword", "LUP_RETURN_ALL", "handle", $hLookup)
_ArrayDisplay($WSALookupServiceBegin)

This is my current script. I know it's wrong, but I don't know what I'm doing wrong as I'm not used to this. WSAStartup appears to work but WSALookupServiceBegin doesn't.

Edited by darkjohn20

Share this post


Link to post
Share on other sites
darkjohn20

This is interesting, but not exactly what I'm looking for. I was looking more for information on the actual network.

So, not information about a process' connection, but rather the network itself.

Say I'm on a laptop at a hotel or something.

Through Windows I would be able to view all networks I could connect to, regardless of whether they need a password or not.

Say I connect to one. I want any information I can get about the network I am connected to. Anything from the name to any other bit of information.

I'm not quite sure what sort of data to expect, so I can't explain very much.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.