Hi GuyZ,
This is a useful tool which you have to need in Buffer Overflow vulnerability exploitation and exploit development. I got this tool from here.
This is a useful tool which you have to need in Buffer Overflow vulnerability exploitation and exploit development. I got this tool from here.
Source Code
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { char *ptr; if(argc < 3) { printf("Usage: %s <environment variable> <target program name>\n", argv[0]); exit(0); } ptr = getenv(argv[1]); /* get env var location */ ptr += (strlen(argv[0]) - strlen(argv[2]))*2; /* adjust for program name */ printf("%s will be at %p\n", argv[1], ptr); }
1 comments :
Write comments