-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unit tests for FeatherDuster commands
- Loading branch information
Daniel Crowley
authored and
Daniel Crowley
committed
Apr 3, 2017
1 parent
8da7249
commit 1af1c3a
Showing
16 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
echo 'Testing FeatherDuster analyze command...' | ||
python ./featherduster.py <<EOF | ||
import manualentry | ||
12345678 | ||
n | ||
analyze | ||
exit | ||
EOF | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
echo 'Testing FeatherDuster export command...' | ||
python ./featherduster.py << EOF | ||
import manualentry | ||
gdkkn | ||
use alpha_shift | ||
run | ||
export | ||
/tmp/fd_output | ||
EOF | ||
grep hello /tmp/fd_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
echo 'Testing import clear command...' | ||
python featherduster.py <<EOF | grep -v badger | ||
import manualentry | ||
Badger badger badger badger badger badger badger badger badger badger badger | ||
import manualentry | ||
MUSHroom MUSHroom | ||
import clear | ||
samples | ||
exit | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
echo 'Testing manual entry import command...' | ||
python ./featherduster.py <<EOF | grep 'apple pen' | ||
import manualentry | ||
I have a pen, I have an apple, UH, apple pen | ||
samples | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
echo 'Testing multi-ciphertext file import...' | ||
python ./featherduster.py << EOF | egrep "^'c7629149911e324e0322913e2e35c3b0fcea5180608a3f74cef73a010a6f71f49f346442f524a06578bfdfece04af86e8b8ad38bdb1cac4d6602fa4f2e'\$" | ||
import multifile | ||
examples/manytimepad.ciphertexts | ||
samples | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
echo 'Testing result import command...' | ||
python ./featherduster.py <<EOF | egrep "^'hello'$" | ||
import manualentry | ||
Z2Rra24= | ||
analyze | ||
Y | ||
use alpha_shift | ||
run | ||
import clear | ||
import results | ||
all | ||
samples | ||
exit | ||
EOF | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
echo 'Testing single ciphertext file import command...' | ||
python ./featherduster.py <<EOF | egrep "^'XUEGTZFZARLMOWPAQRNUPLQKWPRJABVURBFBAWYEEYPILJRZMPCJAPRXANSGZZZAPNTFOJLRIBNCLBGOWGABWJRXXVASZCAJEADVDMQGQRTBWKVVLRRETAPZSFWJEKUHIGWFPVPOTUESLTCNEOEUDIYHIETJDALYXRMPYTLYAVTDSMQGPCHBMMGYESTFCARBIEAMHWEJWNNEDEVZGUETHMEKMADJNIGKHOYXCQGORTTIPTRZXRRPQBUKGBRSPACURQIORIYVLNBFEQAZLRCJAPRXXRXU'$" | ||
import singlefile | ||
examples/vigenere.ciphertext | ||
samples | ||
exit | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
echo 'Testing modules command...' | ||
python ./featherduster.py <<EOF | ||
modules | ||
EOF | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
echo 'Testing options command...' | ||
python ./featherduster.py <<EOF | ||
options | ||
use alpha_shift | ||
options | ||
use vigenere | ||
options | ||
exit | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
echo 'Testing results command...' | ||
python ./featherduster.py <<EOF | egrep "^0: 'hello' *$" | ||
import manualentry | ||
gdkkn | ||
use alpha_shift | ||
run | ||
results | ||
exit | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
echo 'Testing run command...' | ||
python ./featherduster.py <<EOF | ||
run | ||
use alpha_shift | ||
run | ||
import manualentry | ||
gdkkn | ||
run | ||
import clear | ||
run | ||
exit | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
echo 'Testing samples command...' | ||
python ./featherduster.py <<EOF | ||
samples | ||
import manualentry | ||
gdkkn | ||
samples | ||
import clear | ||
samples | ||
exit | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
echo 'Testing search command...' | ||
python ./featherduster.py <<EOF | ||
search alpha | ||
search | ||
search thisshouldneverreturnresultsmostlikely | ||
exit | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
echo 'Testing set command...' | ||
python ./featherduster.py <<EOF | ||
set foo=bar | ||
use alpha_shift | ||
set foo=bar | ||
use vigenere | ||
set num_answers=3 | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
echo 'Testing unset command...' | ||
python ./featherduster.py <<EOF | ||
unset | ||
unset foo | ||
use vigenere | ||
set foo=bar | ||
unset foo | ||
exit | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
echo 'Testing use command...' | ||
python ./featherduster.py <<EOF | ||
use thisisnotarealmodule | ||
use alpha_shift | ||
exit | ||
EOF |