for($i=$addr;$i<$saddr;$i++)
{
print TEMP "\n"
}
####
print TEMP $/ for $addr .. $saddr - 1;
##
##
$x=~s/...//g;
##
##
$x =~ s/...//g;
##
##
open(ITEMP,"/tmp/scresult.tmp");
@data=;
close ITEMP;
foreach $x(@data)
{
if($x=~/^\(gdb\)/)
{
$x=~s/\(gdb\) 0x.+ <.+>:\s+//g;
$x=~s/0x/\\x/g;
$x=~s/\n//g;
$x=~s/\(gdb\)//g;
$x=~s/\s+//g;
$sc.=$x;
}
$i++;
#
# "Indent" the shellcode
# ($i exists only for this)
#
if(($i%12)==0)
{
$sc.="\"\n\t\""
}
}
##
##
open( TEMP, ")
{
if(/^\(gdb\)/)
{
s/\(gdb\) 0x.+ <.+>:\s+//g;
s/0x/\\x/g;
s/\n//g;
s/\(gdb\)//g;
s/\s+//g;
$sc .= $_;
}
# "Indent" the shellcode
# ($i exists only for this)
$i++;
unless (++$i%12)
{
$sc.="\"\n\t\""
}
}
close TEMP;