smbversion()Writing SMBclient-based WLSC NASL ScriptsWriting SMBclient-based WLSC NASL Scriptssmbclientavail()

smbclientavail()

This function returns TRUE if smbclient can be used from within openvasd. It also sets the knowledge base item "SMB/smbclient". It should be called first in any WLSC Script. Example:

  include("smbcl_func.inc");
  if(!get_kb_item("SMB/smbclient"))
  {
    smbclientavail();
  }
  if(get_kb_item("SMB/smbclient"))
  {
    do something;
  }
  else
  {
    report = string("SMBClient not found on this host !");
    security_note(port:0, proto:"SMBClient", data:report);
    exit(0);
  }

smbversion()Writing SMBclient-based WLSC NASL ScriptsWriting SMBclient-based WLSC NASL Scriptssmbclientavail()