September 2017
Beginner to intermediate
290 pages
6h 58m
English
Right now, we are going to implement our own gets() procedure, which would, in fact, forward calls to fgets() just as our PE patch did. Unfortunately, Flat Assembler's support for ELF does not allow us to create shared objects in a simple way yet; therefore, we will create an object file and later link it with GCC as a shared object for a 32-bit system.
The source code is, as usual, quite simple and intuitive:
; First the formatter directive to tell; the assembler to generate ELF object fileformat ELF; We want to export our procedure under ; the name "gets"public gets as 'gets'; And we need the following symbols to be; imported from libc; As you may notice, unlike Windows, the ; "stdin" is exported by libcextrn fgetsextrn ...
Read now
Unlock full access