Skip to content

Commit

Permalink
capability to check for html to avoid shenanigans
Browse files Browse the repository at this point in the history
  • Loading branch information
zardus committed Jan 28, 2025
1 parent f508277 commit 88a7beb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pwnshop/templates/base/selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@

{% if challenge.print_page %}
print("Retrieved the following HTML:")
{% if challenge.ensure_html %}
if "<html" not in browser.page_source.lower():
print("Doesn't look like we retrieved an HTML page...")
sys.exit(1)
{% endif %}
print(browser.page_source)
{% endif %}

Expand Down

0 comments on commit 88a7beb

Please sign in to comment.