Home self reproducing code
Post
Cancel

self reproducing code

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:

  1. execute malicious code
  2. print the code it self

usage: XXS worm

This post is licensed under CC BY 4.0 by the author.