Added 10 more gists.

This commit is contained in:
Miguel Astor
2023-06-19 09:38:01 -04:00
parent 8af706e97d
commit 1400a87eab
25 changed files with 1133 additions and 0 deletions

1
smash.s/README.md Normal file
View File

@@ -0,0 +1 @@
Smashing the stack for fun and no profit.

28
smash.s/smash.s Normal file
View File

@@ -0,0 +1,28 @@
.section .rodata
str:
.asciz "Smashed!"
.section .text
.globl main
main:
pushq %rbp
movq %rsp, %rbp
call function
xorl %eax, %eax
leave
ret
function:
pushq %rbp
movq %rsp, %rbp
leaq smash(%rip), %r8
movq %r8, 8(%rbp)
leave
ret
smash:
leaq str(%rip), %rdi
call puts@plt
movq $60, %rax
movq $89, %rdi
syscall