W.O.P.R   W.O.P.R STORM monitor - description of ASP/file   Help

Home/storm.monitor/storm.monitor.asp.desc.asp

The storm.monitor.asp - file

If you take a look at the source here you will notice it has 4 funcion codes.

Function code 1

Source: Response.Write cStr(CDbl(Now())) It returns the current time on the remote server as a floating point value. The remote time is used to adjust the bias between the web server and the Monitor server.

Function code 2

Source: Response.Write rootPath + vbCrLf ListFolderContents(rootPath) First it returns the root path of the files in the webscope. This part is common to all the files in the list. The ListFolderContents(rootPath) returns a list of alle files modified since last poll. Last poll time is sent thrugh the field named lr, abbriviation for LastRun. This field is sent from The Monitor. The following list is built as follows: Field 1: Path - the relative path from the root path mentioned above. Field 2: File name - the name of the file, excluding all path. Field 3: File size - the size of the file in Bytes. Field 4: File modification date and time - from the Operating system. Each field is separated by a chr(30), and each line, or record, is separated by vbCrLf.

Function code 3

Source: Response.Write sfo.OpenTextFile(Request.Form("fn"),1).readall Function code 3 is ment to the extra service. It is used by The Monitor to retrieve the content of the file, versioned by every change. By having the content in The Monitor database, it will be possible to recover from intruders, that delete files. Or retrieve last version, in case of a missing backup.

Security

Source: if md5(Request.Form("md5")) <> "4cac25d28bea5e08ef731c6caa629e1d" then Response.end As you can see, every request is checked up against a md5 of the contents of the field named "md5". Since md5 is an irreversible hashing, nobody will be able to guess the content. The md5 is self chosen, and must be modified to get the Monitor to work. To do that, follow these steps:

  1. Open the asp file in your favorite editor.
  2. Find a passphrase, and get the md5 sum. If you don't hav an md5 calculator, go here
  3. Cut and paste the result into the source mentioned above.
  4. Save the file, and upload it to your server.

After it is uploaded, it can be registered at The Monitor.