UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
September
Su M Tu W Th F Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Sponsored Links
Latest Postings
The History Thread...
by Gremelin
09/18/14 09:42 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
Latest Reviews
Topic Options
Rate This Topic
#17794 - 07/30/02 09:05 AM DHCP detection
psychogen Offline
Member

Registered: 03/02/02
Posts: 257
Loc: UK
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)

Top
Sponsored Links
      
#17795 - 07/30/02 10:26 AM Re: DHCP detection
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
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

Top
#17796 - 07/30/02 04:13 PM Re: DHCP detection
psychogen Offline
Member

Registered: 03/02/02
Posts: 257
Loc: UK


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
_________________________
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)

Top
#17797 - 08/01/02 06:00 AM Re: DHCP detection
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
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

Top
#17798 - 08/01/02 09:06 AM Re: DHCP detection
psychogen Offline
Member

Registered: 03/02/02
Posts: 257
Loc: UK
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 bitch 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 fuck 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)

Top
#17799 - 08/01/02 09:45 AM Re: DHCP detection
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
can't you make it interchangeable? Where you can use either IP or computer name?
_________________________
Domain Registration, Hosting, Management
http://www.dollardns.net

Top

Featured Member
Registered: 02/28/02
Posts: 7193
Forum Stats
2148 Members
46 Forums
34503 Topics
69673 Posts

Max Online: 1567 @ 04/25/10 02:20 AM
Top Posters
UGN Security 27665
Gremelin 7193
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
Tim050, Gecko666, defghi795767, Devo60, ali
2148 Registered Users
Who's Online
0 registered (), 327 Guests and 291 Spiders online.
Key: Admin, Global Mod, Mod
Latest News


Donate
  Get Firefox!
Get FireFox!