plainblack.com
Username Password
search
Bookmark and Share

Network Connection Test, DNS Lookup

Two new methods for Utility.pm (or better yet your own package).  One will return all of the IP addresses for a given hostname and the other will allow you to test network connectivity to a remote host/port using some protocol (like TCP) by opening a socket.

I wrote these yesterday morning as part of a bug fix but it turns out that I didn't need them.  I figured they may be useful to some one else though.

To Install:

1) You'll need to install two CPAN modules.

IO::Socket::INET and Net::hostent

2) Paste the use lines in the attached file to the top of WebGUI/Utility.pm

3) Paste the two methods in the attached file into the body of Utility.pm  

Note:

This will break compatibility because you're modifying a core package.  In other words when you upgrade, you'll loose your changes.

If you want to do this the right way, make these methods part of a new package so the upgrade won't overwrite your changes.

Example usage:

At the bottom of the attached file under examples.

Cool Wobject ideas:

# Cool ideas for wobjects using these methods:

-- DNS Lookup wobject

-- Port scan wobject

-- Connection monitor

Have Fun =) 

System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
Comments
Downloadnetwork_tools_pl.txt network_tools_pl.txt
LinksNo Support Offered
Statistics Downloads: 414
Views: 5894
Rating: 0
Updated: 6/23/2006
Keywords miscellaneous
NavigationBack to the Bazaar
© 2018 Plain Black Corporation | All Rights Reserved