Asserting downloaded file content and more changes #37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added four changes:
big-gradient.jpg
for a large image file andshort-text.txt
for a short text file. I use these in the SOP PoCs and I assume files like this can be useful for different PoCs in general./screenshots/
makes it possible to view all screenshots in the browser. Until now, I had to clumsily copy the files from the server to view them...REPORT_LEAK
command to the script which behaves as expected and makes interaction scripts slightly more readableASSERT_FILE_CONTAINS file content
command which checks if the downloaded file contains the given content (as a substring) and continues the evaluation only if it does. Failing this assertion is still considered sane behaviour and the exact reason for failing is included as a query parameter in thebughog_sanity_check=OK
report. I choseASSERT_FILE_CONTAINS
instead of, e.g.,REPORT_LEAK_IF_FILE_CONTAINS
so that the user has more freedom to choose what to do after checking the file content (e.g., download another file and report a leak only if both files contain some string).