shellcode.pl
#!/usr/bin/perl
while( <> )
{
my @input=split('\s');
foreach ( @input )
{
if ( $_ =~ /^[0-9abcdef]{2}$/ )
{
print "\\x" . $_ ;
}
}
}
print "\n";
usage: objdump -ds| shellcode.pl
ascii2hex.pl
#!/usr/bin/perl
while(<>)
{
chomp;
my @input=split(//);
foreach ( @input )
{
printf("%x ",ord($_));
}
}
print "\n";
usage: echo "This is a string" | ascii2hex.pl
No comments:
Post a Comment