Source code for shellcodes.arm64.read_from_stack

# read from stack and write to file descriptor

[docs]def generate(out_fd, size): """Writes a file from stack Args: out_fd (int/str/reg) = file descriptor size (int/str/reg) = size to read """ sc = """ /* write(...) */ mov x2, %s mov x0, %s mov x1, sp mov x8, 64 svc 1 """ % (size, out_fd) return sc