Hello, I’ve been trying to run an individual script.nasl for the past few days and I keep find difficulties on the process… I am trying to run the .nasl script with the command Openvas-nasl -X -t myscript.nasl
And I get an error, the error that I get is about the lib kb_redis-CRITICAL **: get_redis_ctx: Redis connection error: No such file or dir I managed to run the command by adding this flag " --config-file=/path/to/openvassd.config " to the previous one.Although it does not start to output the results, it just ends…
I also added the flag --trace=results.log and I can see the execution (flow) of my script but I still don’t get anything displayed on my screen…
Could you please help me figure out what’s wrong or what am I doing wrong?
Here is the script that I am trying to run:
if(description){
script_name(english:"Simple TCP scan");
script_summary(english:"PortScan 1-5000");
script_family(english:"General");
script_copyright(english:"No Copyright");
exit(0);
}
for(port=1; port<443; port++){
if (get_port_state(port)>=0){
mysock = open_sock_tcp(port);
if(mysock){
r = recv(socket:mysock, lenght:256);
close(mysock);
if (r) display("Open Port ", port, " DATA: ", r);
if (!r) display("Open Port", port, "\n");
}
}
}