Shell Code Generator

Today I wanna write a little shell code generator useful for embedding and coding shellcodes. Of course you may find more interesting this one (well-known shellcode generator), the following generator written in perl, is a very basic idea of what a shellcode generator does. Feel free to keep and to modify it.


#!/usr/bin/perl

# shellcode generator

print "shellcode: ";

$x1=<>;

my $data = "$x1";

chomp($data);

my @values = split(undef,$data);


foreach my $val (@values) {


chomp($val);

print '\x';

print unpack(H8,"$val");


}


print "\n";

exit 0;