Plugin net.spf

File: net.spf
Author: Nicholas Nemtsev
Description: Additional capabilities for networking
System requirements: WinNT/2000/XP

New words:


%SESSIONSCOUNT%

A variable containing a number of sessions.

Example:

MSG: "Currently there are %SESSIONSCOUNT% sessions"

%LOGGEDUSERCOUNT%

A variable containing the number of users that are currently logged on.

Example:

MSG: "Currently there are %LOGGEDUSERCOUNT% logged users"

%SESSIONSERVERS%

A variable containing a list of available servers. A blank space is used as a separator.

Example:

FILE-WRITE: "c:\temp\servers.txt"  " %SESSIONSERVERS% "

%SESSIONSUSERS%

A variable containing a list of users. A blank space is used as a separator.

Example:

FILE-WRITE: "c:\temp\users.txt"  " %SESSIONSUSERS% "

NET-FILE-LIST ( a-user u-user a-path u-path -- list)

This word is used to collect the list of filenames, which are opened throgh network on a specified PC. The name of the PC is stored in varible NetHost.
Here is the NET-FILE-LIST syntax: S" username" S" the-beginning-of-the-filename" NET-FILE-LIST
Specify the username if you want to see the files which were opened by this user, or leave this argument blank (S" ") if you want to see the files, which were opened by all users.
Specify the-beginning-of-the-filename if you want to monitor the special directory or directories. Leave this argument blank (S" ") to see all the files which were opened.

Пример:

#( test-net-file-list 
AsLoggedUser
NoActive
VARIABLE net-file-list \ print all the files in F:\db\1C directory opened by user to console
Action:
S" \\OFSERV2" S>UNICODE DROP NetHost !
S" user" S" F:\db\1C" NET-FILE-LIST net-file-list !
[NONAME
NodeValue ASCIIZ> TYPE CR
NONAME] net-file-list DoList
)#

NetHost

This variable holds the name of the PC to monitor. The default value of NetHost=0 which means: monitor the current PC.

Пример:

S" \\OFSERV2" S>UNICODE DROP NetHost !