This was a challenge to demonstrate how the content-type header can be used to fool the browser into treating the HTTP response body in unexpected ways.
As the harder solution works for both, heres source:
php| version: "3.8" | |
| # NOTE! This docker container has hard-coded values for passwords - this is intentional as this is testing machine. DO NOT EXPOSE TO THE INTERNET. | |
| services: | |
| database: | |
| image: mariadb:10.6.4-focal | |
| restart: unless-stopped | |
| ports: | |
| - 3306:3306 | |
| environment: | |
| MYSQL_ROOT_PASSWORD: 'CTBB_ROOT_PASSWD' |
| // by @irsdl | |
| boolean manualColorHighlightEnabled = true; // e.g. BurpRed anywhere in the request | |
| boolean pwnFoxColorHighlightEnabled = true; // to support PwnFox Firefox extension containers | |
| // BEGIN HIGHLIGHT LOGIC { | |
| boolean hasAlreadyBeenColoured = false; | |
| /* Manual highlight logic to see something like BurpRed */ | |
| if(manualColorHighlightEnabled){ | |
| Pattern manualHighlightPattern = Pattern.compile("burp([a-z]{3,7}+)", Pattern.CASE_INSENSITIVE); // like burpRed or burpYellow |