diff options
| author | Louis Burda <quent.burda@gmail.com> | 2021-05-10 17:18:28 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2021-05-10 17:18:28 +0200 |
| commit | 1490268ea6ae75e5e9b78861c56dc9b04db903f3 (patch) | |
| tree | 415a4ea7b11648c7cfea226637fe1a84c0576918 /service/src/test.sh | |
| parent | 2a8416eaa85af6348fe34859859a7fb39db2003d (diff) | |
| download | enowars5-service-stldoctor-1490268ea6ae75e5e9b78861c56dc9b04db903f3.tar.gz enowars5-service-stldoctor-1490268ea6ae75e5e9b78861c56dc9b04db903f3.zip | |
extended query function to load file info, added poc test
Diffstat (limited to 'service/src/test.sh')
| -rw-r--r-- | service/src/test.sh | 72 |
1 files changed, 50 insertions, 22 deletions
diff --git a/service/src/test.sh b/service/src/test.sh index 9a905b7..57c7ca7 100644 --- a/service/src/test.sh +++ b/service/src/test.sh @@ -26,26 +26,54 @@ checkleaks() { export RESULTDIR="scans" -announce "Trying ASCII STL" -( - echo "submit" - cat tests/sample-ascii.stl | wc -c - cat tests/sample-ascii.stl -) | checkleaks - -announce "Trying BIN STL" -( - echo "submit" - cat tests/sample-binary.stl | wc -c - cat tests/sample-binary.stl - echo "testname" -) | checkleaks - - -announce "Testing Proof-Of-Concept" -( - echo "submit" - cat tests/evil1.stl | wc -c - cat tests/evil1.stl -) | checkleaks +if [ "$1" == "stl" ]; then + announce "Testing ASCII STL Parsing" + ( + echo "submit" + cat tests/sample-ascii.stl | wc -c + cat tests/sample-ascii.stl + ) | checkleaks + + announce "Testing BIN STL Parsing" + ( + echo "submit" + cat tests/sample-binary.stl | wc -c + cat tests/sample-binary.stl + echo "testname" + ) | checkleaks + +elif [ "$1" == "poc" ]; then + + announce "Testing Proof-Of-Concept" + + rm -rf scans/* + + echo -e "\n--- Uploading evil STL ---\n" 1>&2 + ( + echo "submit" + cat tests/evil1.stl | wc -c + cat tests/evil1.stl + echo "AAAA" + ) | ./printdoc + + echo -e "\n--- Testing Exploit ---\n" 1>&2 + + ( + echo "query" + echo "AAAA" + echo "0" + echo "n" + + echo "query" + ) | ./printdoc + +else + ( + echo "submit" + echo "2" + echo "AA" + echo "AAAA" + ) | ./printdoc + +fi |
