المشاريع1. Basic Quine (
2. Fortran Quine (
3. Trojanized Quine (
4. Obfuscated Trojan Quine (
حول
Quines demonstrating self-propagation
مشاريع أخرىالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلQuine - Compiler Original Sin
This repository contains code examples demonstrating concepts from Ken Thompson's 1984 Turing Award lecture Reflections on Trusting Trust. These quines illustrate the ideas behind self-propagating code. Thompson shared the concept of a self-propagating compiler backdoor that could survive indefinitely without leaving evidence in the source code.
Contents
- Self-Producing Program (Quine): Program that outputs its own source code
- "Trojanized" Quine: Self-producing program that inject purposeful modifications
- Obfuscated "Trojan" Quine: Simple obfuscation to hide the injected modifications
Code Examples
1. Basic Quine (quine.c)
gcc quine.c -o quine
./quine
2. Fortran Quine (fort_quine.f90)
gfortran fort_quine.f90 -o fort_quine
./fort_quine
3. Trojanized Quine (trojan_quine.c)
Demonstrates payload injection by replacing the word "right" with "wrong" in its output.
gcc trojan_quine.c -o trojan_quine
./trojan_quine
4. Obfuscated Trojan Quine (obfuscated_trojan_quine.c)
gcc obfuscated_trojan_quine.c -o obfuscated_trojan_quine
./obfuscated_trojan_quine
Testing the Examples
Verify that the quines work correctly by comparing their output to their source:
# Test basic quine
./quine > output.c
diff quine.c output.c
# Test trojan quine (will show differences due to "right" -> "wrong" replacement)
./trojan_quine > trojan_output.c
diff trojan_quine.c trojan_output.c
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…