How to write a quine
self-reproducing code
A quine is a program, takes no input and produces a copy of its own source code as its only output.
original code is:
1
2
3
Head is: malicious code + data of line numbers for tail
Body is: `Head in string` + `Tail in string`
Tail is: reproducing code
Tail code = print(Body.head) + print(Body) + print(Body.tail)
after execution:
- execute malicious code
- print the code it self
usage: XXS worm