my $old_buffer;
my $offset = 0;
while (read(FH,65536,\$buffer)) {
# Append the last 8 bytes of the buffer
if ($old_buffer) {
$buffer = substr( $old_buffer, -8 ) . $buffer;
$offset -= 8;
};
if ($buffer =~ /(......\0\0\0........)/sm) {
printf "Found possible candidate at %s : $1\n", $offset + pos;
};
$offset += len $buffer;
$old_buffer = $buffer;
};
####
####
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The
$d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider
($c = $d->accept())->get_request(); $c->send_response( new #in the
HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web