This perl script is a simple encoding utility that converts data to Hex, Unicode, etc.
4dbb43ebc6e8ae0ee48d232da5ee1fe7#!/usr/bin/perl
# by MDH3LL
# mdh3ll@gmail.com
# 26/jan/2010
# Public
$sis="$^O";
if ($sis eq MSWin32) { $cmd="cls"; } else { $cmd="clear"; } system($cmd);
c: c();
sub c {
print "\tBy mdh3ll //Brazil[<o>] //Encode-max\n";
print q{
options:
#URL/URI
[0] -> Hex(%XX)
[1] -> Unicode(%uUUUU)
#HTML-Entity
[2] -> Hex(&#xXX)
[3] -> Hex long(�XX)
#IE Especific
[4] -> (\xXX)
[5] -> (\x0XX)
[6] -> (\x00XX)
[7] -> (\x000XX)
[8] -> (\x0000XX)
[9] -> (\x00000XX)
[10] -> (\uUUUU)
:};
chomp ($op = <>);
if($op =~ m/^\d{1}$|^10$/){
print "text >>\n";
chomp ( $d = <> );
my $dx = unpack('H*', $d);
chomp $dx;
my(@list) = ('%', '%u00', '&#x', '�', '\\x', '\\x0', '\\x00', '\\x000', '\\x0000', '\\x00000', '\\u00');
$dx =~ s/((.){2})/@list[$op]$1/g;
print "Result:\n\n$dx";
print "\n\n\n<enter> to continue...";<>;
system("$cmd");
goto c;
}else{
print "The option \"$op\" does not exist.\n<enter> to exit";<>;
exit 0;
}
}
Comments
No comments yet, be the first!