June 2026
Beginner to intermediate
464 pages
11h 55m
English
In this appendix, you will find the complete listings for the version of the worm developed in Chapter 10, for your convenience.
Listing C-1 shows the self-contained network-scanning x86_64 worm’s complete source code.
BITS 64
section .text
global _start
_start:
mov rbp, rsp ; Create a stack frame to store temporary values.
;; Check /tmp/pw for previous visits.
lea rdi, [rel mark]
mov rsi, 100o | 200o ; O_CREAT | O_EXCL
mov rdx, 700o ; S_IRWXU
call _open test rax, rax jl pw_done ; On error (file already exists), finish. mov rdi, rax call _close ; Done ...Read now
Unlock full access