Discussion:
Start Bash Script from NASL Script
(too old to reply)
Nils von Nethen
2017-09-07 14:47:36 UTC
Permalink
Hello,

 
I am currently trying to write my own NASL script which I want to use to check if a host running a MySQL Server permits root login with the password 'root'.

I have written a bash script which returns 'works' if the bash script can successfully connect to the server, login and execute a sql query.

 
Is it possible to execute the bash script from within the NASL script and after execution interpret the return code of the bash script?

 
Kind regards,

Nils von Nethen

 
ORDIX AG

Kreuzberger Ring 13

65205 Wiesbaden

Germany

Telefon: +49 (0)611 7784000

Fax: 0180 / 1673490

E-Mail: ***@ordix.de <mailto:***@ordix.de>

Internet: http://www.ordix.de/ <http://www.ordix.de/>

Die gesetzlichen Pflichtangaben finden Sie unter www.ordix.de/pflichtangaben.html <http://www.ordix.de/pflichtangaben.html>
Christian Fischer
2017-09-07 18:44:21 UTC
Permalink
Hi,
Post by Nils von Nethen
Hello,
I am currently trying to write my own NASL script which I want to use to
check if a host running a MySQL Server permits root login with the
password 'root'.
I have written a bash script which returns 'works' if the bash script
can successfully connect to the server, login and execute a sql query.
Is it possible to execute the bash script from within the NASL script
and after execution interpret the return code of the bash script?
there is currently only "pread" which returns the full response (not
only the return code) to nasl. See e.g.:

http://michel.arboi.free.fr/nasl2ref/node46.html

or some examples like nikto.nasl or nmap.nasl for the syntax.
Post by Nils von Nethen
Kind regards,
Nils von Nethen
Regards,

--

Christian Fischer | PGP Key: 0x54F3CE5B76C597AD
Greenbone Networks GmbH | http://greenbone.net
Neumarkt 12, 49074 Osnabrück, Germany | AG Osnabrück, HR B 202460
Geschäftsführer: Lukas Grunwald, Dr. Jan-Oliver Wagner

Loading...