Calling nessus from shell..


 
Thread Tools Search this Thread
Special Forums Cybersecurity Calling nessus from shell..
# 1  
Old 09-05-2002
Calling nessus from shell..

I am trying to code a php script that calls upon the "nessus" client; and formats the output into a HTML table. Somehow, my shell scripts don't seen to be working correctly...is my syntax messed up?

Here's what i got:

<CENTER><BR><BR><BR><BR>
<table width="" border="0" cellspacing="1" cellpadding="0" bgcolor="#B1B78B"><tr><td>
<table width="" border="0" cellspacing="1" cellpadding="8" bgcolor="#F6F7EB"><tr><TD WIDTH="100%" BGCOLOR="#B1B78B"><b>Our scanner found the following interesting ports on node <? echo $_SERVER[REMOTE_HOST]; ?>
<? echo $_SERVER[REMOTE_ADDR]; ?>: </b></TD>
</TR>
<TR><?
$target = $_SERVER[REMOTE_ADDR];
$fp=fopen($target,'w') or exit (LogError($target));
fputs($fp,$target);
fclose($fp);
exec ("/usr/sbin/bin/nessus -q -c /usr/local/httpd/htdocs/postnuke/.nessusrc localhost 1241 thomas nimda $target $nessusResult 2> clientError");
$arraySize = sizeof($nessusResult);
$x = 3;
while($x < $arraySize){
echo "<tr>
<td><b>" .$nessusResult[$x]. "</b></td>"; $x++; } ?>
</tr>


Thanks!
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Programming

How to parse .nessus file to get result in human readable format?

Scripting Language: bash shell script, python I want to parse .nessus file in human readable format. If any one have any ideas please help me. (2 Replies)
Discussion started by: sk151993
2 Replies

2. Shell Programming and Scripting

How to write script to scan ip list through Nessus?

Scripting language: Shell script I want to Scan IP's from IPlist.txt through Nessus using shell scripting language. Give the Input (IPlist) to nessus and generate Nessus report in xml or PDF form which is saved automatically on computer . Please help if any one has idea about how to write... (2 Replies)
Discussion started by: sk151993
2 Replies

3. UNIX for Dummies Questions & Answers

VNC Server Unauthenticated Access - Nessus

hi guys Suse 10 SP2 Security guys run an app called Nessus for vulnerabilities and they found this one on my linux VNC Server Unauthenticated Access and I really don't know what they mean... I can update vnc on these servers but there is not guarantee this will fix the issue and the... (2 Replies)
Discussion started by: kopper
2 Replies

4. Shell Programming and Scripting

calling 'n' number of shell scripts based on dependency in one shell script.

Hello gurus, I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script. i m looking for something like this call 3.1; If 3.1 = "complete" then call 3.2; if 3.2 = ''COMPlete" then call 3.3; else exit The... (1 Reply)
Discussion started by: shashi369
1 Replies

5. Shell Programming and Scripting

shell script for nessus-adduser

I took a stab at writing a script to automate the interactive process of adding users to Nessus - I have zero previous coding experience. So far, it doesn't get me anywhere. I took small sections of code from posts I found on this site and others:... (1 Reply)
Discussion started by: nolamiami
1 Replies

6. Cybersecurity

how to hide os type from scaning of nmap or nessus

my os is freebsd 7.1 just open sshd and hide the sshd banner nessus still report correctly the os type how to hide os type from scaning of nmap or nessus? Thanx so much. my ipfw rule: ipfwcmd="ipfw -q add allow tcp" localip="192.168.1.254" $ipfwcmd from any to $localip 22 in setup... (2 Replies)
Discussion started by: overdose
2 Replies

7. Shell Programming and Scripting

Calling shell functions from another shell script

Hi, I have a query .. i have 2 scripts say 1.sh and 2.sh 1.sh contains many functions written using shell scripts. 2.sh is a script which needs to call the functions definded in 1.sh function calls are with arguments. Can some one tell me how to call the functions from 2.sh? Thanks in... (6 Replies)
Discussion started by: jisha
6 Replies

8. Shell Programming and Scripting

Calling Shell Script

Hello Friends, I have bash script on unix server which i want to call from windows server. Basically i want a command line which will call this script on unix server. Any one has any idea regarding this? Help really appreciated!! Thanks, Roshni. (1 Reply)
Discussion started by: onlyroshni
1 Replies
Login or Register to Ask a Question
shell(1F)							   FMLI Commands							 shell(1F)

NAME
shell - run a command using shell SYNOPSIS
shell command [command] ... DESCRIPTION
The shell function concatenate its arguments, separating each by a space, and passes this string to the shell ($SHELL if set, otherwise /usr/bin/sh). EXAMPLES
Example 1: A sample output of shell command. Since the Form and Menu Language does not directly support background processing, the shell function can be used instead. `shell "build prog > /dev/null &"` If you want the user to continue to be able to interact with the application while the background job is running, the output of an exe- cutable run by shell in the background must be redirected: to a file if you want to save the output, or to /dev/null if you don't want to save it (or if there is no output), otherwise your application may appear to be hung until the background job finishes processing. shell can also be used to execute a command that has the same name as an FMLI built-in function. NOTES
The arguments to shell will be concatenate using spaces, which may or may not do what is expected. The variables set in local environments will not be expanded by the shell because "local" means "local to the current process." ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
sh(1), attributes(5) SunOS 5.10 5 Jul 1990 shell(1F)