DESCHALL-LOG-FILTER 0.9 available

Lee Sonko (lee@networks.bgs.com)
Tue, 22 Apr 1997 18:05:26 -0400 (EDT)


Here is some simple perl code that filters DESCHALL logs.
Please direct any comments to me at urgentlee@lee.org

#!/usr/local/bin/perl -s
# DESCHALL-LOG-FILTER (c) Lee Sonko 1997 Lee@lee.org
# Permission is granted to do whatever you want. Life is short.
#
# written on Solaris 2.5 with perl, version 5.001 but that shouldn't make much
# difference as this is basic stuff.
#
#This takes Standard input and will filter
# out all "routine" text generated by DESCHALL
#
#
# With no command line options, it will display only the key pair info. IE
# 2^29 complementary pairs of keys starting with 2C4CFB3201010101
# 2^30 complementary pairs of keys starting with 2C4FFB4F01010101
#
# Note that each of these pairs didn't nessesarily finish, it only started.
# Maybe I'll fix that in the next version.
#
# If issued with the "-alertonly" command line option, it will only display
# text from the logs that is out of the ordinary.
#
#
# How to use:
# create log files of all your DESCHALL processes. (It can even handle if two
# DESCHALLs were writting to the same log file.)
# Run this program on them. IE
# cat mylogfile | deschall-log-filter -alertonly | less
# glance at the output for any unexpected text
#
# Note that you will probably have to alter the program version info. IE
# the line that reads:
# $logfile =~ s/^(\.*)Program version: V0.214 Apr 3 1997 03:04:22\n//g;
# It is a simple matter of adding your version of the software to this list
#
# enjoy
# Lee Sonko

while (<STDIN>) { $logfile = $logfile . $_;}

$*=1;

$logfile =~ s/^(\.*)DES Challenge Solver\n//g;

$logfile =~ s/^(\.*)Selftest passed\n//g;
$logfile =~ s/^(\.*)Copyright \(c\) Rocke Verser, 1986, 1997\n//g;
$logfile =~ s/^(\.*)All Rights Reserved.\n//g;
$logfile =~ s/^(\.*)\*\*\*\*\* FOR USE IN THE USA AND CANADA ONLY \*\*\*\*\*\n//g;
$logfile =~ s/^(\.*)\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* NOT FOR EXPORT \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\n//g;
$logfile =~ s/^(\.*)(Processor \d -- Key not found\n)//g;
$logfile =~ s/^(\.*)Terminated\n//g;
$logfile =~ s/^(\.*)\n//g;
$logfile =~ s/^(\.*)$//g;
$logfile =~ s/^(\.*)Program version: V0.214 Apr 3 1997 03:04:22\n//g;
$logfile =~ s/^(\.*)Program version: V0.214 Mar 12 1997 15:50:48\n//g;
$logfile =~ s/^(\.*)Processor \#\d: Working\n//g;
$logfile =~ s/^(\.*)Processor \d -- (Elapsed time: \d+ seconds\n)//g;
$logfile =~ s/^(\.*)Processor \d -- (2\^\d+ complementary pairs of keys starting with [\d\w]+\n)/$2/g;
# $logfile =~ s/^Elapsed time:.*\n//g;
#$logfile =~ s/^\n//g;
# Fixes for Lee's desmonitor program
$logfile =~ s/^(\.*)Killed\n//g;
$logfile =~ s/^(\.*)end time =.*\n//g;
$logfile =~ s/^(\.*)start time =.*\n//g;
$logfile =~ s/^(\.*)(hostname = \w+\n)//g;
$logfile =~ s/^(\.*)(PID = [\d+ ]+\n)//g;

if ($alertonly) {
$logfile =~ s/^(\.*)2\^\d\d complementary pairs of keys starting with \w{16}\n//g;
}

print "$logfile";