Such scripts in general event can be two types:
- Running continuously after start and answerring on event received from NetView.
The Skeleton of such script is looped call of WAITEVENT functions which wait for NetView events.
When script calls waitevent it suspends self execution until next event occures. Events can be:
Hosts recheck/refresh/retrace, menu clicks, periodical timer event (script can set timer for any interval).
- Scripts also can has no event-handler loop. Such scripts for example can be used to perfom some actions on
NetView startup.
Control functions
procedure SetStatus(txt:string);
- Sets script's status string in scripts list
procedure SetTimer(interval:integer);
- Starts/stops timer for this script. Timer sends to script messages with
code 8 every specified period of time
- interval -time period in milliseconds. If interval=0 then rimer
will be disabled
function WaitEvent(var wparam, lparam: integer): integer;
- Waits notifocation about of any NetView's event
- wparam, lparam -event additional parameters (see following)
- Returns event code:
- NetView sends NMNP_ACTION message for plug-in with following bitmask flags in
wParam:
NVACTION_GETFROMNET - after hostlist refresh using network
NVACTION_GETFROMFILE - after hostlist refresh using file
NVACTION_RECHECK - after hostlist recheck
NVACTION_RETRACE - after hostlist retrace
NVACTION_ACTIVATE - NetView window (de)activated. lParam the same as WM_ACTIVATE's
wParam.
NVACTION_MENUPOPUP - sends after some menus popups. lParam: NVMENUFLAG_MAIN, NVMENUFLAG_CONTEXT or
NVMENUFLAG_TRAY.
NVACTION_IMGEXPORT - after Visual Map GIF image export finished (lParam =list
id).
- NVALERT_NETWATCHER - when user connected in NetWatcher. lParam - host ID of the connected host or 0, if no such host in hostlist
- NVALERT_ALARMHOST - host with enabled alerts changed its online state. lParam - host
ID.
- NVALERT_TERMINAL - host was connected to Terminal n listen mode. lParam - host
ID.
- NVALERT_REDIRECTOR - Host connected to TCP bridge. lParam - host
ID.
- NVALERT_IPLOGGER - IP logger detected attack.
- NVALERT_NETSEARCHER - NetSearcher finished filesearching.
Bit flags in wParam :
NVALERTMASK_CANCEL - Set in next cases(user selects\deselects alerted host, NetWatcher's user disconnect, Terminal or TCP host disconnect. IP logger - attack finished.
NVALERTMASK_NWBLACK - NetWatcher's blaclist user
NVALERTMASK_NWWHITE - NetWatcher's keeplist user
NVALERTMASK_ILLIST - IPLogger - Scan detected
NVALERTMASK_ILICMP - IPLogger - ICMP flood detected.
NVALERTMASK_ILSYN - IPLogger - TCP SYN flood detected.
NVALERTMASK_ILUDP - IPLogger - UDP flood detected.
NVALERTMASK_HOSTUP - Alertable host goes online
NVALERTMASK_HOSTDOWN - Alertable host goes offline
- NMNP_HOSTMSG - user double-clicked on host wich has "hostmsg:N"
command string. wparam equals N, lparam- host's id
- Message codes from $850 to $A00 can be used for script's
menu items
|