Hi With Michel's help I've written the following plugin. What I'm trying to do here is find the live hosts on a network that are not running landesk and just report back to me that its not running. The problem I'm having is display in the client gui. I'm not seeing it under the "Misc." family when I reload nessusd and reconnect with the gui. # # This script checks for a running LanDesk client on # the remote client. # # landesk_check.nasl # # This script essentially performs a negative port scan # It looks for hosts NOT listening on port tcp 9595 # if (description) { script_version("$Revision:1.0$"); # script_name is simply the name of the script. Use a # descriptive name for your script. For example, # "php_4_2_x_malformed_POST.nasl" is a better name than # "php.nasl" name["english"] = "landesk_check.nasl"; name["francais"] = "landesk_check.nasl"; script_name(english:name["english"], francais:name["francais"]); # script_description is a detailed explanation of the vulnerablity. desc["english"] = " This script reports which remote clients are NOT running LanDesk workstation client. The script is run to enforce our policy that all Microsoft workstations run the LanDesk client."; script_description(english:desc["english"]); # script_summary is a one line description of what the script does. summary["english"] = "This script checks for a running LanDesk client."; summary["francais"] = "This script checks for a running LanDesk client."; script_summary(english:summary["english"],francais:summary ["francais"]); script_category(ACT_SCANNER); script_copyright(english:"No copyright."); family["english"] = "Misc."; family["francais"] = "Misc."; script_family(english:family["english"],francais:family["francais"]); # script_dependencies is the same as the incorrectly- # spelled "script_dependencie" function from NASL1. It # indicates which other NASL scripts are required for the # script to function properly. script_dependencies("find_service.nes"); # script_require_ports takes one or more ports and/or # Knowledge Base entries script_require_ports(9595); # Always exit from the "description" block exit(0); } # # Check begins here # port = 9595; k = strcat("Ports/tcp/", port); if (get_kb_item(k)) # Port was found open by the scanner exit(0); # flag = get_preference("unscanned_closed") ; # if (flag) exit(0); # Don't connect to unscanned or closed port # Here, either the port is closed, or it was not scanned soc = open_sock_tcp(port); if (!soc) security_note(port: port, data: "Port is closed. LanDesk is not running"); _______________________________________________ Plugins-writers mailing list Plugins-writers@private http://mail.nessus.org/mailman/listinfo/plugins-writers
This archive was generated by hypermail 2.1.3 : Sat Oct 07 2006 - 11:53:36 PDT