An open API service indexing awesome lists of open source software.

https://github.com/artainmo/dr-quine

42 school project. Create quine programs in C as an introduction to the concept of virus propagation in cybersecurity.
https://github.com/artainmo/dr-quine

42school c cybersecurity virus

Last synced: over 1 year ago
JSON representation

42 school project. Create quine programs in C as an introduction to the concept of virus propagation in cybersecurity.

Awesome Lists containing this project

README

          

# dr-quine
42 school [subject](https://cdn.intra.42.fr/pdf/pdf/34050/en.subject.pdf).

Create quine programs in C as an introduction to the concept of virus propagation in cybersecurity.

### Explanation
A quine is a program that outputs its own content.

An empty program or program that opens and reads its file is prohibited.

#### Colleen
A quine program in c that outputs itself in the console.

`%c` displays char and `%s` displays a string.

In printf 10 is ASCII code for `\n` and 34 for `"`.

Between `%` and `c` or `s`, `1$` refers to 10 and `2$` TO 34 and `$3` to str.

Basically a string representing the program is printed which is also able to print itself by using a self referential embedded format tag.

#### Grace
Outputs its content in another file.

#### Sully
The program creates a new file, writes its own content into that file and executes the file, leading to the creation of another file who also created another file and so on, leading to a self-replicating program which is useful for viruses to propagate.

### DOCUMENTATION
[Self-replicating Python code | Quine](https://www.youtube.com/watch?v=a-zEbokJAgY)

[what does print(s%%s) mean here?](https://stackoverflow.com/questions/28145588/what-does-printss-mean-here)

[Imprimer le code source du code C sans aucune entrée | Quiné](https://www.youtube.com/watch?v=VaGl_HZBIoM&t=634s)