I am trying to open a local file ('flag' in a target file) in assembly in order to write an exploit script output the flag. However, I am getting the error: "target: Too long input: Success" when trying to open the file. This is my code to load and open the file:
#include <sys/syscall.h>
.globl main
.bss
.lcomm bfr, 1040
.type main, @function
.data
filename:
.string . "flag"
main:
mov %eax,0x5
mov %ebx,filename
mov %ecx,0x0
int $0x80
mov %ebx, %eax
mov %eax, 0x3
mov %ecx, bfr
mov %edx, 1040
int $0x80