### Decrypt Image with Outguess (Linux) Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/2013/additional docs/The infamous warnning/warnning thread on jan 4th.txt This snippet shows the command-line process for downloading an image, installing the outguess tool, and then using outguess to extract data from the image into a text file. It assumes a Linux environment where `wget` and `apt-get` are available. ```bash wget /content/1_b/448438397/1357300732704.jpg sudo apt-get install outguess outguess img.jpg img.txt ``` -------------------------------- ### Download Onion Data with Wget Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/assets/2014/stage02/README.md This snippet demonstrates how to download data from an Onion service using the wget command-line utility. It requires wget to be installed on the system. The input is a URL pointing to an Onion address. ```bash wget http://auqgnxjtvdbll3pv.onion ``` -------------------------------- ### Verify Signature with GPG Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/assets/2014/stage02/README.md This command uses the GnuPG (GPG) utility to verify a digital signature. It reads the signature data from standard input. GPG must be installed, and the necessary public keys should be available for verification. ```bash gpg < 1033.jpg.outguess ``` -------------------------------- ### Download Image from Onion Site with Wget Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/assets/2014/stage02/README.md This command uses wget to download a specific image file from an Onion service. Ensure wget is installed and that the provided URL is correct. The output is the downloaded image file. ```bash wget http://auqgnxjtvdbll3pv.onion/1033.jpg ``` -------------------------------- ### Extract Audio Frames from MP3 using GCC and libmpg123 Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/assets/2014/stage07/README.md This section shows how to compile and run a C program that extracts audio frames from an MP3 file. It requires the libmpg123-dev library to be installed. The output can be redirected to a file for further analysis. ```bash sudo apt-get install libmpg123-dev ``` ```bash gcc -lmpg123 /usr/share/doc/libmpg123-dev/examples/extract_frames.c -o extract_frames ``` ```bash ./extract_frames --no-info < index.mp3 > index.frames ``` -------------------------------- ### Run Outguess Decryption Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/assets/2014/stage02/README.md This command executes the outguess tool to attempt decryption of a file. It takes the input file (e.g., an image) and an output file name as arguments. Outguess is a steganography tool and requires proper installation. ```bash outguess -r 1033.jpg 1033.jpg.outguess ``` -------------------------------- ### Download Onion Service Output with Torify and Wget Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/assets/2014/stage07/README.md This snippet demonstrates how to securely download content from an onion service using torify to route traffic through Tor and wget to fetch the data. It requires the tor package to be installed and running. ```bash torify wget http://q4utgdi2n4m4uim5.onion ``` -------------------------------- ### Initialize Rune Analysis Variables Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/2016/2016/extra stuff/RuneSolver.py.txt Initializes variables used for frequency counting, word counting, and storing gematria information. This setup is crucial before processing the input rune stream. ```python freqcount = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] wordcount = 0 gemwordcount = 0 gemwordlist = "" gemwordfactors = "" gemfactorarray = [] conter = 0 fconter = 0 reverseline = [0] * len(stream) ``` -------------------------------- ### Import PGP Public Key with GPG Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/Archive/Old Sites/bernsteinbear.com blog cicada/3301 - Max Bernstein.html This command imports a PGP public key from a keyserver. It's essential for verifying the authenticity of signed messages from the puzzle creators. The example uses the MIT PGP keyserver and a specific key ID. ```bash gpg --keyserver pgp.mit.edu --recv-key 7A35090F ``` -------------------------------- ### Run TCP Puzzle Server and Interact with Cicada Challenges - Python Source: https://context7.com/cicada-solvers/the-complete-cicada3301-archive/llms.txt This Python script demonstrates how to start an interactive puzzle server and interact with its various commands. It covers connecting to the server, generating random bytes, performing base-29 conversions, conducting Diffie-Hellman key exchange, retrieving server source code, uploading files, and gracefully closing the connection. All client interactions are logged. ```python # server.py - Start interactive puzzle server on port 31415 python server.py # Client connection and available commands: import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect(("puzzle.server", 31415)) # Server responds: "00 WELCOME Python\r\n" # RAND command - Generate random bytes sock.send(b"rand 10\r\n") response = sock.recv(1024) # Returns: "01 OK\r\n142\r\n73\r\n251\r\n...\r\n.\r\n" # BASE29 command - Convert integer to base-29 representation sock.send(b"base29 1000\r\n") response = sock.recv(1024) # Returns: "01 OK 15D\r\n" # Uses alphabet: 0123456789ABCDEFGHIJKLMNOPQRSTUVXYZ # DH command - Diffie-Hellman key exchange sock.send(b"dh 997\r\n") # Provide prime modulus response = sock.recv(1024) # Returns: "01 OK 5 342\r\n" (base, server's public value) # Calculate shared secret: pow(server_public, client_private, prime) # CODE command - Retrieve server source code sock.send(b"code\r\n") source = b"" while True: chunk = sock.recv(1024) if b".\r\n" in chunk: break source += chunk # Server sends its own Python source code # NEXT command - Upload file to server sock.send(b"next\r\n") sock.send(b"Line 1 of data\r\nLine 2 of data\r\n.\r\n") # Server saves to receivedN.txt where N is auto-incremented # GOODBYE command - Close connection gracefully sock.send(b"goodbye\r\n") # Returns: "99 GOODBYE\r\n" sock.close() # All interactions logged to logs/clientlog-TIMESTAMP-ID.txt ``` -------------------------------- ### Amazon aax Demand and Event Listener Setup Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/2012/websites/the subreddit/old reddit/a2e7j6ic78h0j7eiejd0120.html This section initializes Amazon aax ads with specific configuration like publisher ID and version. It sets up a listener for impression viewable events and defines an `execute` queue to manage ad-related actions, including data processing limits. ```javascript /* aax */ if (!window.aax) { window.aax = { pubId: 'AAX763KC6', ver: 1.2, initTime: new Date().getTime(), hst: location.hostname, deliverExchangeDemand: function() {}, cmd: [ function() { window.aax.addEventListener('impressionViewable', function (e) { sendImpressionEvent(e, true); }); } ], execute: [], }; window.aax.execute.push(function() { window.aax.limitDataProcessing(limitDataProcessing); }); addScript('//c.aaxads.com/aax.js?pub=' + window.aax.pubId + '&hst=' + window.aax.hst + '&ver=' + window.aax.ver); } ``` -------------------------------- ### Generate and Upload PGP Key using GPG Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/Archive/Old Sites/bernsteinbear.com blog cicada/3301 - Max Bernstein.html Instructions for generating a new PGP key pair using the GPG command-line tool and uploading the public key to a PGP server. Assumes the user has GPG installed and is using the same email address as for the puzzle. ```bash gpg --gen-key gpg --keyserver pgp.mit.edu --send-key [KEY_ID] ``` -------------------------------- ### XOR Files with Offsets in Python Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/2014/additional docs/scripts/tool This script performs a byte-wise XOR operation between two files, starting from specified offsets. It takes two file paths and two integer offsets as command-line arguments. It reads bytes one by one from each file at their respective offsets, XORs them, and writes the result to standard output. The operation stops if an error occurs or the end of a file is reached. It utilizes the `sys` module and basic file handling. ```python # usage: xor.py file1 file2 offset1 offset2 import sys with file( sys.argv[1], 'rb' ) as one: with file( sys.argv[2], 'rb' ) as two: one.seek( int( sys.argv[3] ) ) two.seek( int( sys.argv[4] ) ) for c in one.read(): try: sys.stdout.write( chr( ord( c ) ^ ord( two.read( 1 ) ) ) ) except: break ``` -------------------------------- ### Cicada 3301 Hex to Text Conversion Example Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/2013/additional docs/logs/all cosmos posts from 7th on the 761 song - full log.txt This snippet represents the conversion of hexadecimal data from an onion address into plain text. This process is a fundamental step in deciphering parts of the Cicada 3301 puzzle, transforming encoded information into readable content. ```plaintext xsxnaksict6egxkq.onion That is the hex from the first onion converted to text. ``` -------------------------------- ### Command-line Utility: wget for File Download Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/Archive/Old Sites/bernsteinbear.com blog cicada/3301 - Max Bernstein.html Demonstrates the use of the `wget` command-line utility to download a file from a given URL. This is a common tool for fetching resources from the internet, as used in the initial stages of the Cicada 3301 puzzle. ```bash wget ``` -------------------------------- ### Go Service Command Handler Implementations Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/2013/additional files/Scripts/example TCP server coded in Go.txt This Go code defines a map of command handlers for a network service. Each handler processes specific commands, interacts with the network connection (reading input, writing output), and performs actions like file I/O, number generation, and cryptographic operations. It includes error handling for invalid inputs and unavailable resources. ```go package main import ( "bufio" "io" "log" "math" "math/big" "math/rand" "net" "os" "strconv" "strings" "time" ) const ( msgdir = "./msg/" koandir = "./koans/" ) var ( procedures = map[string]func(*Processor, []string){ "rand": func(p *Processor, c []string) { if len(c) == 0 { p.WriteFlush("02 ERROR NO NUMBER SPECIFIED") return } n, err := strconv.ParseUint(c[0], 10, 64) if err != nil { p.WriteFlush("02 ERROR " + c[0] + " INVALID") return } p.Write("01 OK") var i uint64 for i = 0; i < n; i++ { p.Write(strconv.Itoa(int(rand.Int31n(256)))) } p.WriteFlush(".") }, "quine": func(p *Processor, c []string) { p.Write("01 OK") f, err := os.OpenFile("quine.go", os.O_RDONLY, 0600) if err != nil { p.WriteFlush("02 ERROR QUINE NOT AVAILABLE") return } defer f.Close() io.Copy(p.Bout, f) p.WriteFlush(".") }, "base29": func(p *Processor, c []string) { if len(c) == 0 { p.WriteFlush("02 ERROR NO NUMBER SPECIFIED") return } n, err := strconv.ParseUint(c[0], 10, 64) if err != nil { p.WriteFlush("02 ERROR " + c[0] + " INVALID") return } s := "" for { r := n % 29 s = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[r:r+1] + s n = n / 29 if n == 0 { break } } p.WriteFlush("01 OK " + s) }, "code": func(p *Processor, c []string) { p.Write("01 OK") f, err := os.OpenFile("c3301serv.go", os.O_RDONLY, 0600) if err != nil { p.WriteFlush("02 ERROR SOURCE NOT AVAILABLE") return } defer f.Close() io.Copy(p.Bout, f) p.WriteFlush(".") }, "koan": func(p *Processor, c []string) { d, err := os.Open(koandir) if err != nil { p.WriteFlush("02 ERROR KOAN NOT AVAILABLE") return } defer d.Close() fs, err := d.Readdirnames(-1) if err != nil { p.WriteFlush("02 ERROR KOAN NOT AVAILABLE") return } f, err := os.OpenFile(koandir+fs[rand.Intn(len(fs))], os.O_RDONLY, 0600) if err != nil { p.WriteFlush("02 ERROR KOAN NOT AVAILABLE") return } defer f.Close() p.Write("01 OK") io.Copy(p.Bout, f) p.WriteFlush(".") }, "dh": func(p *Processor, c []string) { if len(c) == 0 { p.WriteFlush("02 ERROR NO PRIME MODULUS") return } m, ok := big.NewInt(0).SetString(c[0], 10) if !ok { p.WriteFlush("02 ERROR " + c[0] + " INVALID") return } b := big.NewInt(rand.Int63n(23) + 3) s := big.NewInt(rand.Int63n(math.MaxInt64-3301) + 3301) e := big.NewInt(0).Exp(b, s, m) p.WriteFlush("01 OK " + b.String() + " " + e.String()) p.C.SetReadDeadline(time.Now().Add(time.Second * 15)) l, err := p.ReadLine() if err != nil { p.WriteFlush("02 ERROR TIMEOUT") return } e2, ok := big.NewInt(0).SetString(l, 10) if !ok { p.WriteFlush("02 ERROR " + l + " INVALID") return } k := big.NewInt(0).Exp(e2, s, m) p.WriteFlush("03 DATA " + k.String()) }, "next": func(p *Processor, c []string) { fn := strconv.FormatUint(uint64(time.Now().Unix()), 10) f, err := os.OpenFile(msgdir+fn, os.O_WRONLY|os.O_CREATE, 0700) if err != nil { p.WriteFlush("02 ERROR INTERNAL PROBLEM") return } defer f.Close() p.WriteFlush("01 OK") for { p.C.SetReadDeadline(time.Now().Add(time.Second * 15)) l, err := p.ReadLine() if err != nil { p.WriteFlush("02 ERROR TIMEOUT") return } if l == "." { break } f.Write([]byte(l)) f.Write([]byte{0x0a}) } p.WriteFlush("01 OK") }, "goodbye": func(p *Processor, c []string) { p.WriteFlush("99 GOODBYE") p.Stop() }, } ) type Processor struct { C *net.TCPConn Bout *bufio.Writer Bin *bufio.Reader Log *log.Logger R bool } func NewProcessor(c *net.TCPConn, l *log.Logger) *Processor { return &Processor{c, bufio.NewWriter(c), bufio.NewReader(c), l, false} } func (this *Processor) Start() { this.R = true this.WriteFlush("00 WELCOME TO CICADA SERVICE WRITTEN IN GO") for this.R { this.C.SetReadDeadline(time.Now().Add(time.Minute)) l, err := this.ReadLine() if err != nil { this.WriteFlush("02 ERROR TIMEOUT") this.Stop() break } c := strings.Split(strings.ToLower(l), " ") if len(c) == 0 { this.WriteFlush("02 ERROR NO COMMAND") continue } p, ok := procedures[c[0]] if !ok { this.WriteFlush("02 ERROR COMMAND " + c[0] + " INVALID") continue } this.Log.Print("executing '" + strings.Join(c, " ") + "' for " + this.C.RemoteAddr().String()) this.C.SetReadDeadline(time.Unix(0, 0)) p(this, c[1:]) } } func (this *Processor) WriteFlush(data string) { this.Bout.WriteString(data + "\r\n") this.Bout.Flush() } func (this *Processor) Write(data string) { ``` -------------------------------- ### Detect JPG Images in Binary Data with Python Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/2014/additional docs/Titanpads from time of solving/The complete story of onion 6.txt A Python script used to scan a binary file for embedded JPEG image signatures. It identifies the start and end offsets of each detected JPG and saves them as separate files. ```python ../scripts/DetectJPG_v2.py -i onion6.bin ``` -------------------------------- ### Verify GPG Signature and Reverse Hexdump for Audio Processing Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/assets/2014/stage07/README.md This command pipeline first verifies the GPG signature of an HTML file (assuming it contains embedded data) and then reverses a hexdump of the output to create an MP3 file. This is useful for extracting hidden or encoded audio data. ```bash gpg < index.html | xxd -r -p > index.mp3 ``` -------------------------------- ### Download Files with Torify Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/assets/2014/stage04/README.md This snippet demonstrates how to download files from onion addresses using torify, ensuring anonymity. It fetches the main page and server status. ```bash torify wget http://fv7lyucmeozzd5j4.onion/ torify wget http://fv7lyucmeozzd5j4.onion/server-status ``` -------------------------------- ### Decrypt Outguess Files with GPG and Convert to Binary Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/assets/2014/stage03/README.md Decrypts files previously processed by 'outguess' using GPG, then converts the output from hexadecimal to raw binary using 'xxd'. This step further refines the extracted data. ```bash gpg < onion1.outguess | xxd -r -p > onion1.bin gpg < onion2.outguess | xxd -r -p > onion2.bin gpg < onion3.outguess | xxd -r -p > onion3.bin ``` -------------------------------- ### Python: Calculate Prime Factors of a Number Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/2016/2016/extra stuff/RuneSolver.py.txt This function calculates and prints the prime factors of a given integer 'n'. It uses an iterative approach, dividing 'n' by potential factors starting from 2 until the square root of 'n' is reached. The prime factors are stored and returned in a list. ```python def calcfactors(n): i = 2 factors = [] while i * i <= n: if n % i: i += 1 else: n //= i factors.append(i) if n > 1: factors.append(n) print(factors) return factors ``` -------------------------------- ### Heap Analytics Initialization Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/Archive/Old Sites/bernsteinbear.com blog cicada/3301 - Max Bernstein.html JavaScript code for initializing Heap, a product analytics platform. It loads the Heap library with a specific App ID and defines various functions for event tracking and user identification. This snippet is responsible for enabling product analytics. ```javascript window.heap=window.heap||[]; heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=t.forceSSL||"https:"===document.location.protocol,a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=(r?"https:":"http:")+"//web.archive.org/web/20160814151608/http://cdn.heapanalytics.com/js/heap-"+e+".js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n);for(var o=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","removeEventProperty","setEventProperties","track","unsetEventProperty"],c=0;c 501 Method Not Implemented

Method Not Implemented

abc to /index.html not supported.


Apache/2.2.22 (Ubuntu) Server at li528-4.members.linode.com Port 81
``` ```html 501 Method Not Implemented

Method Not Implemented

Not supported on this server.


Apache Server li498-122.members.linode.com at Port 81
``` -------------------------------- ### Download Onion Data with torify Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/assets/2014/stage03/README.md Downloads content from onion addresses using torify to ensure anonymity. The output is saved to index.html files. This is the initial step to acquire the necessary data streams. ```bash torify wget http://cu343l33nqaekrnw.onion/ ``` -------------------------------- ### Extract Hidden JPEG Images from Binary Data - Python Source: https://context7.com/cicada-solvers/the-complete-cicada3301-archive/llms.txt This Python script, DetectJPG, is designed to scan binary files for hidden JPEG images by identifying their start and end markers. It extracts valid images, including those with byte-reversed order, and isolates unused bytes for further analysis. The tool is essential for uncovering steganographically hidden content within puzzle files. ```python # DetectJPG_v2.py - Extract all JPEGs from binary data # Basic usage: scan file for hidden images python DetectJPG_v2.py --infile suspicious_data.bin # Process: # 1. Scans for JPEG start marker (FF D8) # 2. Locates corresponding end marker (FF D9) # 3. Validates JPEG integrity # 4. Saves found images as .image00.jpg, .image01.jpg, etc. # 5. Reverses entire byte order and repeats scan # 6. Saves remaining (non-JPEG) bytes as .remainder00.bin # Output example: # Read suspicious_data.bin with 524288 bytes # --- scanning data --- # Detected jpg. Begin: 1024 End 45678 # Saving as suspicious_data.image00.jpg # Detected jpg. Begin: 50000 End 98765 # Saving as suspicious_data.image01.jpg # --- reversing byte order --- # --- scanning data --- # Detected jpg. Begin: 425523 End 473811 # Saving as suspicious_data.image02.jpg # --- looking for bytes not used in jpegs --- # Bytes not used in jpgs. Begin: 0 End: 1023 # Saving as suspicious_data.remainder00.bin # Bytes not used in jpgs. Begin: 98766 End: 425522 # Saving as suspicious_data.remainder01.bin # Advanced: invert all bytes before scanning (XOR with 0xFF) python DetectJPG_v2.py --infile encrypted.bin --invert # Programmatic usage: from DetectJPG_v2 import DetectJPG # Scan file with byte inversion (XOR mask) detector = DetectJPG("puzzle_image.png", bytemask=0xFF) # Manual byte masking for custom transformations: masked_data = bytearray() for byte in original_data: masked_data.append(byte ^ 0xAA) # XOR with custom mask # Then scan masked_data for hidden images ``` -------------------------------- ### Reddit Sign Up Form (HTML) Source: https://github.com/cicada-solvers/the-complete-cicada3301-archive/blob/main/2012/websites/the subreddit/old reddit/a2e7j6ic78h0j7eiejd0120.html This HTML structure defines the sign-up form for Reddit. It includes input fields for email, validation feedback elements, a submit button, and links for existing users to log in or skip the process. It uses various CSS classes for styling and layout. ```html

Find the good stuff

Reddit is filled with interest based communities, offering something for everyone. Check out some communities and we recommend you join at least 5.