I know it works, in fact with -T at last works too, but the thing i wish
to do is run this command line  to execute nessus with plugins and
server preferens, that's why i was trying to run it using nessus -qpP i
thinked that could give me the result i wanted.

Best Regards,
Lic. Francisco Araujo 



-----Original Message-----
From: Doug Nordwall [mailto:[EMAIL PROTECTED]] 
Sent: Lunes, 17 de Febrero de 2003 11:50 a.m.
To: Francisco Araujo
Cc: [EMAIL PROTECTED]
Subject: Re: Running nessus from command-line


try putting the -T html_graph option before the -q. It states in the -q

section of the man page that any following argument are construed as  
arguments to the batch mode, i.e. host, port, user, pass, etc.

I have verified that

nessus -T html_graph -q <host> <port> <user> <pass> <targetfile>  
<resultsfile>

works. In this case, the results "file" actually is a directory where  
all the files get dropped.

On Monday, February 17, 2003, at 07:39 AM, Francisco Araujo wrote:

>
> Thanks, but i was doing that because if you read the help you found
> this:
>
> Batch-mode scan:
>  nessus -q [-pPS] <host> <port> <user> <pass> <targets-file> 
> <result-file>
>
> And as far i know that means i must use -q and optionally -pPS and if 
> this is not the way then i think that nessus --help command must be 
> changed to shown in an appropiate way.
>
> Anyway, here i'm including a sample file of what i'm trying to do. 
> Thanks.
>
>
> #!/bin/sh
> #
> # nessus-scan.sh
> #
> # This script will run a scan process to the hosts specified in target

> file # zipping results to send by email and moving results to 
> last-scan folder
> #
> # Script by: Francisco Araujo. [EMAIL PROTECTED]
> # http://developers.sytes.net
> #
>
####################################################################### 
> #
> ####
>
> # check parameters
> # login
> if [ -z "$1" ]; then
>     echo usage: \<login\> \<password\> \<targets-file\>
\<result-file\>
>     exit
> else
>     LOGIN=$1
> fi
>
> # password
> if [ -z "$2" ]; then
>     echo usage: \<login\> \<password\> \<targets-file\>
\<result-file\>
>     exit
> else
>     PASSWORD=$2
> fi
>
> # targets-file
> if [ -z "$3" ]; then
>     echo usage: \<login\> \<password\> \<targets-file\>
\<result-file\>
>     exit
> else
>     HOSTS=$3
> fi
>
> # result-file
> if [ -z "$4" ]; then
>     echo usage: \<login\> \<password\> \<targets-file\>
\<result-file\>
>     exit
> else
>     RESULTS=$4
> fi
>
> SCANDATE=-$(date +%Y%m%d)-$(date +%H%M)
>
> echo Process started at $(date +%m/%d/%Y) $(date +%H:%M) >> 
> $RESULTS$SCANDATE.log
>
> (nessus -q 127.0.0.1 1241 $LOGIN $PASSWORD $HOSTS $RESULTS -T
> html_graph) >> $RESULTS$SCANDATE.log
> (zip -rT9 $RESULTS$SCANDATE.zip $RESULTS) >> $RESULTS$SCANDATE.log 
> (uuencode $RESULTS$SCANDATE.zip $RESULTS$SCANDATE.zip | 
> /var/qmail/bin/qmail-inject [EMAIL PROTECTED]) >> 
> $RESULTS$SCANDATE.log rm -rf $RESULTS >> $RESULTS$SCANDATE.log
> mv -f $RESULTS$SCANDATE.zip last-scan >> $RESULTS$SCANDATE.log
>
> echo Process finished at $(date +%m/%d/%Y) $(date +%H:%M) >> 
> $RESULTS$SCANDATE.log
>
> mv -f $RESULTS$SCANDATE.log logs
>
>
> Best Regards,
> Lic. Francisco Araujo
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> On Behalf Of George A. Theall
> Sent: Lunes, 17 de Febrero de 2003 09:44 a.m.
> To: Francisco Araujo
> Cc: [EMAIL PROTECTED]
> Subject: Re: Running nessus from command-line
>
>
> On Sat, Feb 15, 2003 at 01:29:25PM -0400, Francisco Araujo wrote:
>
>> I've been trying to run nessus client from command-line to put it in
a
>> cron job, i already got it running but i couldn't do it to get
plugins
>
>> preferens and server preferents from command-line options, this what
>> i'm
>> running:
> ...
>> nessus -qpP 192.168.0.1 1241 <user> <password> targets.txt results -T
>> html_graph
>>
>> now the problem is i'm getting an error when i tried to run that.
>
> The syntax you're using is incorrect.  First of all, you can't combine
> the options to list plugins *and* preferences. Second, you shouldn't
> specify targets, results, or output type when listing sessions,
> preferences, or plugins.  Thus, you'll need to run the following two
> commands:
>
>     nessus -qp 192.168.0.1 1241 <user> <password>
>     nessus -qP 192.168.0.1 1241 <user> <password>
>
> and then integrate the results, which of course will need to be
> redirected in some fashion.
>
> George
> -- 
> [EMAIL PROTECTED]
>
>



Reply via email to