' BlackIce.txt 10/31/99 Rick LaBanca, http://members.home.com/rickla1/ha ' ' If you use BlackICE, this script will let you trigger a HomeSeer event if attacked. ' BlackICE is simple, their own monitoring program works the same way this does. When ' an attack happens, it's added to a file called "attack-list.csv" in your black ice ' directory. This script just looks for a file date change. ' ' To use: ' - Set the fileName below to your own settings. ' - Make a new Event "BlackIce Check", set the trigger to recurring, at the time ' frequency you like, setting this script to run. ' - Make a new Event "BlackIce Alert", set to manual. This script will call that ' event when an attack occurs. Optionally you could just change this file to ' do what you want right here. Or you can change the event Const below. ' ' If you don't run some kind of firewall and are using the web interface, you should! ' You will be surprised at how often someone will try something. ' Set this to where your attack-list file is. Const FILE_TO_CHECK = "G:\attack-list.csv" ' The name of the event to trigger if file changes Const EVENT_TO_TRIGGER = "BlackIce Alert" ' Shouldn't have to change this. Const TIME_VARIABLE_NAME = "BlackIce Time" sub main() lastDateOnFile = "" Dim FSO Set FSO = CreateObject("Scripting.FileSystemObject") ' If the file exists, grab the date if FSO.FileExists(FILE_TO_CHECK) then Set file = FSO.getFile(FILE_TO_CHECK) lastDateOnFile = file.dateLastModified end if ' Make sure you have this virtual device set up (code > q1) lastDateRecorded = "" hs.CreateVar TIME_VARIABLE_NAME lastDateRecorded = hs.GetVar(TIME_VARIABLE_NAME) ' Save the date if they differ. if lastDateOnFile <> lastDateRecorded then hs.SaveVar TIME_VARIABLE_NAME, lastDateOnFile end if ' You could just put things to do in here, but it's cleaner to call a trigger. if StrComp(lastDateOnFile, "") <> 0 and StrComp(lastDateRecorded, "") <> 0 and StrComp(lastDateOnFile, lastDateRecorded) <> 0 then hs.TriggerEvent EVENT_TO_TRIGGER end if end sub