我正试图了解缓冲区溢出和shellcode的行为。基本上,当我编译代码时,会收到以下警告:
gcc- -fno-stack-protector -z exestack -Wall -o buff buff.c
buff.c: In function ‘main’:
buff.c:19:2: warning: implicit declaration of function ‘gets’; did you mean ‘fgets’? [-Wimplicit-function-declaration]
gets(buffer);
^~~~
fgets
/usr/bin/x86_64-linux-gnu-ld: warning: -z exestack ignored.
/tmp/cctQkxAI.o: In function `main':
buff.c:(.text+0x28): warning: the `gets' function is dangerous and should not be used.
如何解决以下警告:
/ usr / bin / x86_64-linux-gnu-ld:警告:-z exestack已忽略。
我尝试了不同版本的gcc,但是遇到了相同的问题。