On Mon, Jun 06, 2005 at 04:17:17PM +0300, Josh
Zlatin-Amishav wrote:
> Question 1.
> I want to write a plugin to check for the existence of
> three specific files in the c:\windows\system32 SMB share.
> I tried to find examples of other plugins that look for
> specific files in an SMB share but could not find any.
One approach is to use the smb_file_read() function in
smb_file_funcs.inc. For an example of that, see plugin
#12286, js.scob.trojan.nasl.
> Question 2.
> One of the files I want to look for starts with an ASCII
> DEC 255 character.
...
> packet = raw_string(0xff, 0x73, 0x76, 0x63, 0x68, 0x6F,
> 0x73, 0x74, 0x2E, 0x65,0x78, 0x65);
> display("[", packet, "]\n");
display() renders unprintable characters as '.'. You could
use hexstr() to display it, or my preferred method:
ereg_replace(string:hexstr(packet), pattern:"(..)",
replace:"0x\1 ");
which converts it into a slightly nicer format.
George
--
theall@private
_______________________________________________
Plugins-writers mailing list
Plugins-writers@private
http://mail.nessus.org/mailman/listinfo/plugins-writers
This archive was generated by hypermail 2.1.3 : Tue Jun 07 2005 - 13:43:08 PDT