smbgetdir(share, dir, typ)Writing SMBclient-based WLSC NASL Scriptssmbversion()smbgetfile(share, filename, tmp_filename)

smbgetfile(share, filename, tmp_filename)

Use this function to get a file from the target host and save this file locally using tmp_filename. Returns TRUE if successful. Example:

  tmp_filename = get_tmp_dir() + "tmpfile" + rand();
  orig_filename = "C:\Windows\systems32\ntdll.dll";
  smbgetfile(share: "C$", filename: orig_filename, tmp_filename: tmp_filename)

smbgetdir(share, dir, typ)Writing SMBclient-based WLSC NASL Scriptssmbversion()smbgetfile(share, filename, tmp_filename)