#!/usr/bin/perl # # alt-strings v0.1, (c) Hexacorn.com, 1984 # # This script lists alternative strings - all binary strings # that have been neglected by analysts for years # # Usage: # perl alt-strings.pl # # Examples: # perl alt-strings.pl sample.exe # use strict; use warnings; $| = 1; print STDERR " ============================================================================ alt-strings v0.1, written (c) Hexacorn.com, 1984 ============================================================================ "; my $file = shift; if (!defined($file)) { print "Gimme a file name!\n"; exit; } if (!open (FILE, '<'.$file)) { print "Can't open \"$file\"\n"; exit; } my $filesize=-s $file; binmode (FILE); read (FILE, my $data, $filesize); while ($data =~ /([^ -~]{3,})/sg) { print $1."\n"; } close FILE;