FoBoT
08-06-2003, 11:31 AM
this can be in almost anything, i would prefer perl as i am slightly familiar with it, but beggers can't be choosers
I need a script that does the following:
searches predefined subnets (about 25 different ranges) for a device that has port 111 open/active.
it then records the IP address of this device into a flat file/text file.
it then either sets a flag or places a file onto a web server to indicate the status of that device. i.e. a webpage that displays the status of these devices either being present or not needs to be updated by the script.
next is hits a url based on the ip address, http://<IP Address> , and extracts a particular piece of information from the web page, here is an example of the source code from a typical page (applicable portion)
<HTML>
<HEAD>
<TITLE>Snap Server SNAP176101 [Home]</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
<!-- Hide script from old browsers.
so i need the script to read the "SNAP176101" from that URL and put that into a flat/text file.
that is about it, i can hack/chop/mangle the rest of what i need to do
any advice or pointers to code snippets relating to this type of thing is appreciated. thank you
also if you can point me to other scripting sites where i may be able to post this question for greater exposure , that would be appreciated as well
I need a script that does the following:
searches predefined subnets (about 25 different ranges) for a device that has port 111 open/active.
it then records the IP address of this device into a flat file/text file.
it then either sets a flag or places a file onto a web server to indicate the status of that device. i.e. a webpage that displays the status of these devices either being present or not needs to be updated by the script.
next is hits a url based on the ip address, http://<IP Address> , and extracts a particular piece of information from the web page, here is an example of the source code from a typical page (applicable portion)
<HTML>
<HEAD>
<TITLE>Snap Server SNAP176101 [Home]</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
<!-- Hide script from old browsers.
so i need the script to read the "SNAP176101" from that URL and put that into a flat/text file.
that is about it, i can hack/chop/mangle the rest of what i need to do
any advice or pointers to code snippets relating to this type of thing is appreciated. thank you
also if you can point me to other scripting sites where i may be able to post this question for greater exposure , that would be appreciated as well