My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads

This webapp includes an expect script that will scan a list of Cisco routers/switches, collect information as seen in the "show inventory" command, present the results in a web page, and archive the scan for reference.

Dependencies

#1 - expect
#2 - telnet
#3 - ssh
#4 - PHP enabled web server (Apache)

File Structure

 ./inventory
   /scripts
    /connect.sh        # bash script to initiate scan
                       # "$./connect.sh username password"
    /scaninventory.sh  # expect script to scan routers
    /hosts.list        # list of routers to scan
    /archive           # this folder stores old scans
  /htdocs
    /inventory.php     # page to display results of scan
                       # in your Apache config, this should
                       # be the only file that is available
                       # for public viewing. E.g.:

@@@ Sample apache config @@@
Alias /inv "/opt/lampp/myapps/inventory/htdocs"

<Directory "/opt/lampp/myapps/inventory/htdocs">
	Options Indexes FollowSymLinks ExecCGI Includes
	DirectoryIndex inventory.php
	AllowOverride AuthConfig Limit
	Order allow,deny
	Allow from all
</Directory>
@@@ End sample config @@@

How to:

 #1 - Extract to your server
 #2 - Give the scripts execute privs
 #3 - Make sure the scripts folder is writable by the apache user as the scripts will generate scan files
 #4 - Populate the 'hosts.list' file with a list of routers that you want to scan. This can be a list of IPs or hostnames
 #5 - Run your first scan by issuing the following command:
     user@host:/path/to/inventory/scripts$ ./connect.sh username password
 #6 - Modify your Apache config to meet your needs so that the 'htdocs/inventory.php' file is publicly available
 #7 - When the scan is complete, open 'inventory.php' in your browser and check the results
Powered by Google Project Hosting