Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
245-Labs/Week7_XSS/Challenges/webapp/xss_trainer/templates/levels/BasicRegexp.html
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
35 lines (18 sloc)
581 Bytes
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
{% extends "levelBase.html" %} | |
{% block content %} | |
{% markdown %} | |
The developer knows that ```script``` tags are bad, so removes them from the output. | |
This time, we are using a regexp | |
### Filter | |
```python | |
def filter(data): | |
regexp = re.compile("<\/?script>", re.IGNORECASE) | |
payload = re.sub("", payload) | |
return payload | |
``` | |
??? tip "Hint" | |
We cant stop the script tags being found. | |
However, What happens to the output *after* the script is removed. | |
{% endmarkdown%} | |
{% endblock content%} | |
{# Overload the default form with a defaultForm block #} |