mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-06-30 01:27:38 -04:00
some memory exploitation snippets
This commit is contained in:
parent
d987311195
commit
ab05e249d4
19 changed files with 2613 additions and 0 deletions
8
Memory_Exploits/C-codes/get_stack_pointer.c
Normal file
8
Memory_Exploits/C-codes/get_stack_pointer.c
Normal file
|
@ -0,0 +1,8 @@
|
|||
/* Get stack pointer of the system(Unix/Linux) */
|
||||
#iclude <stdio.h>
|
||||
unsigned long get_sp(void) {
|
||||
__asm__("movl %esp,%eax");
|
||||
}
|
||||
void main() {
|
||||
printf("0x%x\n", get_sp());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue