#!/usr/bin/perl
print "Enter characters here: ";
$string_x = <STDIN>;
$hex_x = unpack('H*', "$string_x");
print "\n\n";
print "[+] String $string_x";
print "has been converted to\n[+] ";
print '0x';
for ($i = 0; $i < length $hex_x; $i += 1) {
print substr $hex_x, $i, 1;
}
print "\n";
Someone else wrote most of this, I've only modded it so perl uses a different hex encoding call because with the previous code it was only capable of encoding text. but now it encodes text and numbers. I dont know how this would be useful to anyone, but nonetheless the Perl section has a small amount of content.
Cheers