Previous Thread
Next Thread
Print Thread
Rate Thread
#17794 07/30/02 09:05 AM
Joined: Mar 2002
Posts: 257
Member
OP Offline
Member
Joined: Mar 2002
Posts: 257
hey,

Well I need to write a routine to detect if an Ip is static or dynamic over a LAN, well giz suggested that DHCP addresses are usually dynamic and non DHCP is static, well how would i go about writing a detection routine on if DHCP is enabled or not?

Any suggestions?


The use of "hacker" to mean "security breaker" is a confusion on the part of the mass media. We hackers refuse to recognize that meaning, and continue using the word to mean, "Someone who loves to program and enjoys being clever about it."
--------------------
"Its not a bug, its a feature" (Epic Games)
#17795 07/30/02 10:26 AM
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
Offline
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
well, since I don't know how to do it via API - you may consider looking directly in the registry. This means you will have to know where to look for each windows version. In Win2K, I have found the following two keys:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\{3D8B8D97-AE67-4522-AF6C-F2CF52B8243A}\Parameters\Tcpip\
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\{3D8B8D97-AE67-4522-AF6C-F2CF52B8243A}\Parameters\Tcpip

Each time the value was stored in "EnableDHCP", which is a dword value set to 0 for false, and 1 for true. I trust you know how to use the registry API?


Domain Registration, Hosting, Management
http://www.dollardns.net
#17796 07/30/02 04:13 PM
Joined: Mar 2002
Posts: 257
Member
OP Offline
Member
Joined: Mar 2002
Posts: 257
smile

Cheers SR!

Never thought about looking in the registry!
And yeah I know how to process the registry!

Tx Again, now if anyone has a win98 box and could source those keys out for me with the full path that would be great cause i have no box running 98 within my reach frown


The use of "hacker" to mean "security breaker" is a confusion on the part of the mass media. We hackers refuse to recognize that meaning, and continue using the word to mean, "Someone who loves to program and enjoys being clever about it."
--------------------
"Its not a bug, its a feature" (Epic Games)
#17797 08/01/02 06:00 AM
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
Offline
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
well, I did some snooping around in the registry on my roommates 98 running laptop. No luck. I may have to go look at some more DHCP API's or...

say what it is that this is for? Perhaps I can find an alternative solution.


Domain Registration, Hosting, Management
http://www.dollardns.net
#17798 08/01/02 09:06 AM
Joined: Mar 2002
Posts: 257
Member
OP Offline
Member
Joined: Mar 2002
Posts: 257
See I am writing a plugin for the OfficeChat app i had been writing for quite some time, basicaly this plugin searches your disk(s) for mp3 files and then creates a Access db file with the ID3 Information of the files and where they are located by network path (eg. //mycomp/c/mp3/lamer.mp3) but i want to create the network paths by IP address rather than host name, now there is no problem in doing that but I found that some machines on the LAN have dynamic IP addresses(most likely by DHCP being enabled). The idea is to be able to use the same app as a Internet and WAN app so hostnames wont do the job.

So by knowing what if the IP addresses are static or dynamic I can implement a scanning routine to see if the IP has changed since last usage of the app, if it has the DB needs to be updated with new paths, and rather than having the user archive all their files again (which with over 200 files can take a [censored] of a time) I would write a loop that replaces the old IP with the new one through using a string var.

Now what happens is that with the plugin you can stream mp3s over the LAN/WAN or whatever by just searching throug each users mp3 archive(DB) and drag and dropping the files to ur mp3 player.

Does it make sense what I just wrote?

Well you might think, why does he not write a piece of code that will change the DHCP settings. Well i noticed that some comps need DHCP active cause of certain things they do, god knows what, and I dont want to [censored] to much with the users comps settings.

Get it?

Well thats why!


The use of "hacker" to mean "security breaker" is a confusion on the part of the mass media. We hackers refuse to recognize that meaning, and continue using the word to mean, "Someone who loves to program and enjoys being clever about it."
--------------------
"Its not a bug, its a feature" (Epic Games)
#17799 08/01/02 09:45 AM
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
Offline
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
can't you make it interchangeable? Where you can use either IP or computer name?


Domain Registration, Hosting, Management
http://www.dollardns.net

Link Copied to Clipboard
Member Spotlight
Phatal
Phatal
Houston, TX
Posts: 298
Joined: April 2004
Forum Statistics
Forums41
Topics33,840
Posts68,858
Average Daily Posts1
Members2,176
Most Online3,253
Jan 13th, 2020
Latest Postings
Where and how do you torrent?
by danni75 - 03/01/24 05:58 AM
Animation,
by JohanKaariainen - 08/15/19 01:18 AM
Blackbeard.....
by Gremelin - 10/03/18 07:02 PM
my old account still exists!
by Crime - 08/10/18 02:47 PM
Okay WTF?
by HenryMiring - 09/27/17 01:45 AM
The History Thread...
by Gremelin - 08/11/17 12:11 PM
My friend NEEDS your HELP!
by Lena01 - 07/21/17 12:06 AM
I'm having fun with this guy.
by gabithompson730 - 07/20/17 01:50 AM
I want to upgrade my phone
by gabithompson730 - 07/20/17 01:49 AM
Doom 3
by Cyrez - 09/11/14 08:58 PM
Amazon Gift Card Generator/KeyGen?te
by Gecko666 - 08/22/14 09:21 AM
AIM scene 99-03
by lavos - 09/02/13 08:06 AM
Planetside 2
by Crime - 03/04/13 07:10 AM
Beta Testers Wanted
by Crime - 03/04/13 06:55 AM
Hello Everyone
by Gremelin - 02/12/12 06:01 PM
Tracfone ESN Generator
by Zanvin Green - 01/18/12 01:31 PM
Python 3 issue
by Testing - 12/17/11 09:28 PM
tracfone airtime
by Drache86 - 07/30/11 03:37 AM
Backdoors and the Infinite
by ZeroCoolStar - 07/10/11 03:52 AM
HackThisZIne #12 Releaseed!
by Pipat2 - 04/28/11 09:20 PM
gang wars? l33t-wars?
by Gremelin - 04/28/11 05:56 AM
Consolidate Forums
by diggin2deep - 04/21/11 10:02 AM
LAN Hacking Noob
by Gremelin - 03/12/11 12:42 AM
Top Posters
UGN Security 41,392
Gremelin 7,203
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Likes Received
Ghost 2
Cyrez 1
Girlie 1
unreal 1
Crime 1
Powered by UBB.threads™ PHP Forum Software 7.7.5