in reply to Re^4: Inserting domain name into Snort rule
in thread Inserting domain name into Snort rule
The code as you've quoted it works fine when I give it a hardcoded domain:
$domain = 'foobar.foodomain.com'; $dns = join '|', '', ( map { sprintf('%02d',length $_), $_ } split /\. +/, $domain ), '00', ''; print "$dns\n"; # prints: |06|foobar|09|foodomain|03|com|00|
So I'd say you need to look at your input.
Aaron B.
Available for small or large Perl jobs; see my home node.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Inserting domain name into Snort rule
by miniperl (Initiate) on Oct 10, 2012 at 14:12 UTC |