Format String Problem On Fedora 9 - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Format String Problem On Fedora 9

arunpanakkalarunpanakkal Posts: 1Member
hi ,
I am trying to write some value to 0x08049818 which is under GOT section and contains address of Printf fuction. I tried command like
./myprogram x18x98x04x08%143$n'
according to the books i have reffered it should write value from stack to my address (0x08049818)
but i am getting and error message stating
"segmentation fault"

the C Program which i am using is a sample from a hacking book
here is its source
[code]
#include
#include
int main( int argc, char *argv[] )
{

if( argc != 2 )
{
printf("Error - supply a format string please
");
return 1;
}

printf( argv[1] );
printf( "
" );
return 0;
}
[/code]
i am using Fedora core 9
could you tell me how to solve this problem
Sign In or Register to comment.