www.christopherlewis.com
Home
News
Recent Projects
Resume
Code Samples
SMTP SmartHost
SpamAssassin
Wget
Analog Reports
Feedback

If you found any of the tools on this page helpful, any donations would be appreciated.

Ping.cs RemoveURLScan_All.vbs Analog_run.vbs Logon.VBS Analog_Reports.ASP

Code Samples

All code here is free for any use.  Please send me an e-mail with questions or comments.

C# .Net

Ping (click to view code)

Ping program implemented in C# and .NET.  Based on Saurabh Nandu (saurabhn@webveda.com) code from HTTP://www.CSharpHelp.com.  Fixes some bugs in the socket stack, and implements all types as C# types.  Adds most of the Ping.exe command's simpler parameters.

Update: (May 2003) It has been brought to my attention that this Ping code, while working, has some, well, issues with it :-)  I haven't had as much time as I'd like to work on this as I should, but I'm going to try to get to it in the next week or two.

Update: (August 2003) I've fixed the Ping.CS code to use the Identifier and Sequence fields of the ICMP packet to prevent this Ping from listening to all ICMP transmits.  Thanks to Vandeweert Patrick for help on finding this bug.

Ping.cs source (16k)

VBScripts

RemoveURLScan_All (click to view code)

This VBScript removes all URLScan lines from IIS log files and creates a file with "Purged_" prepended to the file name.  Allows for much easier visual processing of log files.

RemoveURLScan_All.vbs source (4k)

Analog_Run (click to view code)

This VBScript prepares log files and calculates the run parameters for Analog, a free log processing tool, and ReportMagic, a graphic add on for Analog.  This script runs Analog for Daily, Weekly and Monthly reports and allows for easy running in the Task Scheduler.

Use the following command in Task Scheduler:

C:\WINNT\system32\cscript.exe E:\Analog\Analog_Run.vbs /DAY=

to get an Analog report for Yesterday. Use

C:\WINNT\system32\cscript.exe E:\Analog\Analog_Run.vbs /MONTH=

to get an Analog report for last month.

- Updated Analog_run.vbs to version 1.5 which fixes some relative path issues and international dates. (5/15/02)

- Updated Analog_run.vbs to version 1.7 which adds Year processing and fixes a bug concerning Report Magic and spaces in the path. (10/29/02)

- Updated Analog_run.vbs to version 1.8 which RDNS integration, better GMT offset stuff and cleans up some  code. (12/15/03)

- Updated Analog_run.vbs to version 1.9 which fixes an issue w/ RDNS and /From= /To= command lines. (5/24/04)

Analog_Run.vbs source (45k)

Analog.cfg  (6k)

Logon.VBS (click to view code)

Sample Group Policy Logon script for my domain.  Has some sample code for writing to the registry, mapping a drive, and uses a RegExp IsCScript function.

Logon.vbs source (5k)

ASP

Analog_Report.ASP (click to view code)

This ASP page generates the calendar tables that I use to show my Analog Reports.

Analog_Reports.ASP source (5k)

Send mail to Webmaster with questions or comments about this web site.
Copyright © 2003-2006 Christopher G. Lewis
Last modified: 12/30/06 by Chris Lewis
Google
speakeasy.net http://www.mersenne.org MCSD

FrontPage