You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
RunasSudo 4322fe57e7
Add built-in string support in dis/assembler
6 years ago
dbg Fix speedrun 6 years ago
disasm_hints Add built-in string support in dis/assembler 6 years ago
libsynacor Add built-in string support in dis/assembler 6 years ago
tools Port disassembler to new API 6 years ago
.gitignore Port debug scripts to new API 6 years ago
COPYING Initial commit 7 years ago
README.md Port debug scripts to new API 6 years ago
arch-spec Initial commit 7 years ago
asm.py Annotate self test 6 years ago
disasm.py Add built-in string support in dis/assembler 6 years ago
electric_boogaloo.md Switch notation to R{0..7} per spec 6 years ago
notes.md Port debug scripts to new API 6 years ago
synacor.py Port debug scripts to new API 6 years ago

README.md

synacor.py

My OOP, poorly-documented concise working response to the Synacor challenge

Debug commands

At any time the program is waiting for input, a string of the following form may be input:

.<cmd> <args>

This will execute the file <cmd>.py with dbg_args[0] set to <cmd> and <args> stored in dbg_args[1..n].

For example, the self-test and decryption at the beginning of the program takes a comparatively long time. To save the state to the dumps/init file, enter:

.dbg/dump dumps/init

Similarly, debug commands may be passed as command-line arguments to synacor.py in the form:

./synacor.py <file> <cmd> <args>

For example, to load the dumps/init state to skip the self-test and decryption, run:

./synacor.py challenge.bin dbg/load dumps/init

Dump files are stored in Python pickle format, so if you want to inspect the memory in a hex editor, for example, it will be necessary to extract a raw memory dump:

./tools/dump_to_raw.py dumps/init dumps/init.raw