Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I want to make a batch file that every time someone opens it, it sends a messgage to my computer whoch displays their IP address. Is there any way I can program it to do that?

Is it me or is this awfully virus sounding? Better give a good reason why you want something like this before anybody will venture to answer.
-SN

Please i am currently doing a course that involves how the IP-Address is been calculated,Subnet address,domain control,Gateway Address,Binary number,Octal number etc.Can someone help me to understand how these things are working.
Daniel
Munich,Germany

Hey! I need the IP address because my dad wants me to set up a new home network in order for my automatic shutdowner to work, I need the IP address of the computer. So I need something that tells me that every time They start up their computer, it runs the batch file(I know how to do that) and it needs to send me their IP address.
Thanks guys

well there is a way, I read it in an old ms-dos book. but binding the IP Adress..well...ok i have an idea.
cd c:\windows\system
ipconfig?that might not work....Why dont you re program ip config just a tad to make it only show the Ip? use qbasic or something.then bind it and -----Lets just say for a second
cd c:\windows\system
ipconfig2?
meh.....I'm still learning telnet with this aTROTIOS windows XP...ehem with my pentium 4 and yada yada yadaa.....can someone give me a link to telnet tutorials?

I have no idea how to implement a "remote shutdowner", but here are a few of my thoughts.
1. You're going to hate this, but if this is just your dad's home network, why don't you just have the hub/router/switch/whatever assign static ip addresses? No fuss no muss. You seem like a smart enough guy that you already thought of this and it won't work for some reason, so I'll go on.
2. To my knowledge, it is very nearly impossible to "send a message" via a typical dos batch file. I assume by "send a message" you are referring to an e-mail. Security in most modern e-mail clients does not allow a message to be sent without a warning message to the user and a confirmation dialog box.
3. Assuming idea #1 won't work and #2 is true, then I would consider writing a batch file that simply runs ipconfig and outputs it to a file. This can be done in one line:
ipconfig>>c:\mydir\test.txt
Your "remote shutdowner" could then open this file over the network (easiest if you have a network drive mapped), parse it, and extract the ip address. Alternatively, you could change the command to write the file to the remote shutdowner's hard drive and your program could open it locally. Whichever is easier.
This is the only way I could think of that would work consistently (except for #1 of course)
Alternatively, as my first post implied, many viruses have exactly this behavior, so you may do some research there. They would have their own smtp engines. Some of them come as batch files(although not the lovely readable dos kind...I don't know how they do it)
Best of luck,
-SN

I Disagree with SN,
I have hacked the schools netwrok couple of tmes , the security is so pathetic.
First of all , you'll need to locate the main fodler that holds the servers documents, you'll need to replace the shutdown.exe or logoff.exe but patch.exe [ ass sniffer maybe ] , so delete the logoff.exe or shutdown.exe, & replace it with patch.exe.bat,
this way whenever the computer reboots the patch file wont be removed.Adigeh

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |