mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-04-25 18:19:07 -04:00
13 lines
296 B
C
13 lines
296 B
C
// usage: ./getshadd ENVVAR BINARY
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
int main(int argc,char *argv[]){
|
|
char *ptr;
|
|
ptr=getenv(argv[1]);
|
|
ptr+=(strlen(argv[0])-strlen(argv[2]))*2;
|
|
printf("%s will be at %p\n",argv[1],ptr);
|
|
return 0;
|
|
}
|