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.
- Host: GitHub
- URL: https://github.com/artainmo/dr-quine
- Owner: artainmo
- Created: 2022-06-07T00:33:31.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T01:04:07.000Z (over 3 years ago)
- Last Synced: 2025-01-22T15:32:22.798Z (over 1 year ago)
- Topics: 42school, c, cybersecurity, virus
- Language: C
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)