| View previous topic :: View next topic |
| Author |
Message |
steveiwonder
Joined: 16 Nov 2004 Posts: 83
|
Posted: Thu Feb 02, 2006 12:21 pm Post subject: Help with Finding DNS and Gateway. Possible? |
|
|
Hey peeps..
I need help with this...
I know how to get the IP address which isnt my problem...
I have limited access and i am restricted to alotta things on a certain network i use.
I need to be able to find the DNS Server , Default Gateway, and possibly the WINS server....
Is there and way i can get this information using AHK? I would be a great help if anyone knows how?
Thanks
Steve.
Last edited by steveiwonder on Thu Feb 02, 2006 12:31 pm; edited 1 time in total |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Thu Feb 02, 2006 12:27 pm Post subject: |
|
|
Since you are no newbie any more, you should first learn to give your topics a descriptive title. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
kapege.de
Joined: 07 Feb 2005 Posts: 186 Location: Munich, Germany
|
Posted: Fri Feb 03, 2006 1:10 pm Post subject: |
|
|
Are you able to open the DOS-box? Then you might try a "ping" or "pingpath". That reveals the hops to a given destination. The first hop often is your router or a gateway. _________________ Peter
Wisenheiming for beginners: KaPeGe (German only, sorry) |
|
| Back to top |
|
 |
evl
Joined: 24 Aug 2005 Posts: 1238
|
Posted: Fri Feb 03, 2006 6:40 pm Post subject: |
|
|
Equally, at a dos prompt the following command can be used to find the dns server (using www.google.com as an example):
nslookup www.google.com
The first address line gives the dns server address and the 2nd line its IP. |
|
| Back to top |
|
 |
AgentSmith15
Joined: 06 May 2005 Posts: 37
|
Posted: Fri Feb 03, 2006 11:34 pm Post subject: |
|
|
WOW you are lucky I was going through the mail I got from the Nmap mailing list and fond this.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NameServer
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DhcpNameServer
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\*\NameServer
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\*\DhcpNameServer
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet*\Services\Tcpip\Parameters\NameServer
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet*\Services\Tcpip\Parameters\DhcpNameServer
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet*\Services\Tcpip\Parameters\Interfaces\*\NameServer
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet*\Services\Tcpip\Parameters\Interfaces\*\DhcpNameServer |
|
| Back to top |
|
 |
steveiwonder
Joined: 16 Nov 2004 Posts: 83
|
Posted: Sat Feb 04, 2006 5:53 pm Post subject: Slight Problem |
|
|
Yeah that works at home but at college is doesnt as i dont have access to command promt or the registry...
So if ya know any other ways then let me know  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Sun Feb 05, 2006 3:52 pm Post subject: |
|
|
The following function looks promising. Perhaps it can be called with DllCall:
GetAdaptersInfo() at MSDN |
|
| Back to top |
|
 |
AgentSmith15
Joined: 06 May 2005 Posts: 37
|
Posted: Sun Feb 05, 2006 9:16 pm Post subject: |
|
|
Well do you have access to "Run. . ." in the start menu? Just type in "cmd" without the quotes and it will open a command prompt.
From there you have 2 options.
The first one is to type in regedit which will open the registry editer.
The second option is to type in "ipconfig /all" without the quotes. That will list the current IP, DHCP server, DNS names, etc.
To capture the information you could use "CMDret.exe" or...
Instead of typing "ipconfig /all" you could type "ipconfig /all >>c:\ipconfig.txt". That would output a text file to the c:\ drive with all the information. Then you could pull it out with AHK.
The file will look like...
| Code: |
Windows IP Configuration Host Name . . . . . . . . . . . . : Desktop Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No DNS Suffix Search List. . . . . . : *.rr.com Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : *.rr.com Description . . . . . . . . . . . : Intel(R) PRO/100 VE Network Connection Physical Address. . . . . . . . . : 00-03-**-E9-E7-** Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : *.*.1.100 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : *.*.1.1 DHCP Server . . . . . . . . . . . : *.*.1.1 DNS Servers . . . . . . . . . . . : ***.**.41.125 **.***.40.73 ***.**.40.62 Lease Obtained. . . . . . . . . . : Sunday, February 05, 2006 10:27:55 AM Lease Expires . . . . . . . . . . : Monday, February 06, 2006 10:27:55 AM |
I replaced some of the IP's with * so I can remain anonymous. |
|
| Back to top |
|
 |
AgentSmith15
Joined: 06 May 2005 Posts: 37
|
Posted: Sun Feb 05, 2006 9:21 pm Post subject: |
|
|
| Also if the keyboard has the windows key you could open the run dialog by pressing "Windows Logo+R " |
|
| Back to top |
|
 |
|