Avoid forgotten \0
using lea, neg
This commit is contained in:
parent
15695498a4
commit
70c0823fe7
2 changed files with 7 additions and 6 deletions
|
@ -3,14 +3,15 @@
|
|||
|
||||
_start:
|
||||
jmp indirect
|
||||
|
||||
|
||||
p:
|
||||
xorq %rdi, %rdi
|
||||
xor %rdi, %rdi
|
||||
pop %rdi
|
||||
#shr $0x8, %rdi
|
||||
push $0x1b6
|
||||
push $0xfffffffffffffe4b
|
||||
xor %rsi, %rsi
|
||||
pop %rsi
|
||||
neg %rsi
|
||||
add $1, %rsi
|
||||
push $85
|
||||
pop %rax
|
||||
syscall
|
||||
|
@ -26,4 +27,4 @@ p:
|
|||
|
||||
indirect:
|
||||
call p
|
||||
.asciz "/tmp/pwn"
|
||||
.ascii "/tmp/pwn"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue