Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 9th, 2007, 12:17 PM
SteadyScene SteadyScene is offline
Designer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 258 SteadyScene User rank is Private First Class (20 - 50 Reputation Level)SteadyScene User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 21 h 56 m 52 sec
Reputation Power: 6
Send a message via AIM to SteadyScene Send a message via Yahoo to SteadyScene
Script to Detect IP Address

The company I work for has a xp computer in another region that we use to monitor security cameras for the warehouse.

The problem is the IP address keeps changing and they do not want to purchase a static IP.

The script needs to detect the IP address and then email it to the admin over here daily.

Any help?

Much thanks.

Reply With Quote
  #2  
Old February 9th, 2007, 01:04 PM
tj_nt tj_nt is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Posts: 1,731 tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 4 Days 16 h 4 m 44 sec
Reputation Power: 717
save the following line as a .bat file

ipconfig > c:\save_ip.txt


this will write a text file with the current IP address to the C drive...

set up a task scheduler to run the .bat file and then e-mail the text file to the remote e-mail address

[edited]
another way to retrieve the data is to run the .bat file then use an FTP client to transfer the file to the other system.

Last edited by tj_nt : February 9th, 2007 at 01:10 PM.

Reply With Quote
  #3  
Old February 9th, 2007, 02:01 PM
SteadyScene SteadyScene is offline
Designer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 258 SteadyScene User rank is Private First Class (20 - 50 Reputation Level)SteadyScene User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 21 h 56 m 52 sec
Reputation Power: 6
Send a message via AIM to SteadyScene Send a message via Yahoo to SteadyScene
Quote:
Originally Posted by tj_nt
save the following line as a .bat file

ipconfig > c:\save_ip.txt


this will write a text file with the current IP address to the C drive...

set up a task scheduler to run the .bat file and then e-mail the text file to the remote e-mail address

[edited]
another way to retrieve the data is to run the .bat file then use an FTP client to transfer the file to the other system.


What if I wanted to get the ip for the router? From that same workstation.

Reply With Quote
  #4  
Old February 9th, 2007, 04:57 PM
tj_nt tj_nt is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Posts: 1,731 tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level)tj_nt User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 4 Days 16 h 4 m 44 sec
Reputation Power: 717
if you run ipconfig it will return the local system IP as well as the gateway...which will be the router's IP if the system is patched into the network through a router. This will not do you any good as far as informing you of the IP so you can tunnel into the cams.

What else is the remote system responsible for other than the cams?

Have you considered installing Linux on the remote system?

Reply With Quote
  #5  
Old May 24th, 2007, 02:17 AM
fuquey fuquey is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 1 fuquey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 12 sec
Reputation Power: 0
ISP Dynamic IP

How do I do if I want to detect my ISP provided Dynamic IP?

Reply With Quote
  #6  
Old October 28th, 2008, 07:32 PM
Coder1251 Coder1251 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 1 Coder1251 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 40 sec
Reputation Power: 0
>>>How do I do if I want to detect my ISP provided Dynamic IP
ISP provided Dynamic IP - it's you external IP.. you can find it here
my-addr.com

Reply With Quote
  #7  
Old November 14th, 2008, 10:36 PM
Lagniappe Lagniappe is offline
Registered User
Click here for more information
Click here for more information
 
Join Date: Nov 2008
Posts: 34 Lagniappe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 22 m 15 sec
Reputation Power: 1
Why wouldn't you use a dynamic dns service like dyndns.com?

http://www.dyndns.com/support/kb/us...os_systems.html

You install a client update applet on the pc and it keeps dyndns current with your camera's IP then you just reference it by name.

Don't know about you, but I get enough email already, I don't need a camera emailing me with it's ip address. And what about the time from ip change until next email? It's ok to be out of touch that long? Finding a balance between email frequency and lag between updates to email would be a pain. And you know the time you need to reach it in a hurry is when it will be changed and not yet emailed.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > Script to Detect IP Address


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT