-
Notifications
You must be signed in to change notification settings - Fork 102
Usage
Joshua Segal edited this page Apr 20, 2021
·
7 revisions
Usage: mimic [-h | -f [-m] [-e] | -r [-d] | -c [-d] | -x | -l]
Options:
-h, --help show this help message and exit
-f, --forward mimic input to output (default)
-r, --reverse de-mimic input to output
-c, --check check input for suspicious chars, flag in output
-e SOURCE_STEG_FILE, --encode=SOURCE_STEG_FILE
encode this file as a hidden co-stream in output
-d DEST_STEG_FILE, --decode=DEST_STEG_FILE
decode a hidden co-stream from input to this file
-m CHANCE, --me-harder=CHANCE
forward replacement percent, default 1
-x EXPLAIN_CHAR, --explain=EXPLAIN_CHAR
show a char's homoglyphs
-l, --list show all homoglyphs
Mimic is much like an old-school *nix command - it operates on pipe I/O, thus does not pay attention to files directly. To input a file, use cat
; otherwise it will wait for keyboard input. Likewise, to output a file, use >
or tee
; otherwise it will simply print the output to the console.
These examples assume that mimic has been installed as per the instructions
below. Before installation, invoke via python -m mimic
.
mimic --list # Show all of the homoglyphs
mimic --explain=o # What crazy things can we do with this letter?
mimic --me-harder 100 # Type some lines in and mess with every single char
mimic --reverse # Undo the mayhem. Boooring.
cat somefile | mimic # Pipe some source through at 1%
# Turn up the knob and save the results
cat somefile | mimic --me-harder 25 > mimicked
# Find out exactly where we broke the source
cat mimicked | mimic --check | less
# Now we know the source is broken, so fix it
cat mimicked | mimic --reverse > fixedfile
# This should output nothing (i.e. the files are the same)
diff fixedfile somefile