[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



How should I split off the scanning from the monitoring?  I'm planning
on setting up a scheduled NESSUS scan, but I'd like the nmap to happen
in near-real time.  Is this a fork() or threads situation?

A basic overview of the script:

sub nmapscan
{	
	$result = qx/nmap -sSU $machine_ip/;
	PERL::DBI Stuff
	INSERT into COMPUTERSCANS (id, computer_id, results) values ('',
$computer_id, $result);
	close PERL::DBI stuff
}

Start Infinite loop 

Monitor /var/log/messages

If $line contains "DHCPACK" then parse it for IP/MAC/NAME and create
appropriate variables

Check DB for current record of machine, if exists, create global
variable $computer_id.  

If not, create a record, and store primary key into $computer_id. 

If new IP address, update hosts table w/new IP address.
nmapscan();

Restart the loop;

-- 
Jonathan Glass
Systems Support Specialist II
Institute for Bioengineering & Bioscience
Georgia Institute of Technology
Email: jonathan.glass at ibb.gatech.edu
Office: 404-385-0127
Fax: 404-894-2291


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00218" href="msg00218.html">[ale] Perl Help - Again</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00215.html">[ale] [Fwd: Fwd: Internet Parking Notice....caught!]</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00217.html">[ale] ACPI APM, Power Management Mandrake 9.1</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00215.html">[ale] [Fwd: Fwd: Internet Parking Notice....caught!]</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00218.html">[ale] Perl Help - Again</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00216"><strong>Date</strong></a></li>
<li><a href="threads.html#00216"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>