Nmap Development mailing list archives

Re: Draft for hosted cgi


From: "Julien Delange" <julien.delange () gmail com>
Date: Thu, 25 May 2006 19:38:50 +0200

2006/5/25, Justin Knox <knox.justin () gmail com>:

Julien, that's a well done description. as far as having a daemon on
the back-end, why not simply use cron to schedule the scans?



Yes, it's another possibility. In fact,  there is two possibilities (daemon
and cron) :

Cron approach :
- A program is run every minute (or every N seconds/minutes) with cron
- The program read the configuration each time it's invoked
- It looks on the database if any scan should be performed
- It performs scans, make several forks and wait each of them and wait for
them


Daemon approach :
- Can perform a scan as soon as it is in the database (we can make a
hook-system)
- The configuration is read when the daemon begin, not at every scan request
- Make a fork() for each scan-request (should limit with a pool)


In fact, the cron method is a bit easier. In the twice methods, we have to
take precautions : for example, limit the scan number at the same time (we
can use a pool to limit it). And with the cron method, we cannot be sure
that the machine is not running more than N scans (because, two instances of
the scanning program could be run at the same time - the second can be
invoked when the first is not finished). More, run a program each minute is
a bit heavy. So, I have to choose a method for specifications but I think
it's not the most important and use a daemon instead a cron-program does not
change many lines of code.


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev


Current thread: