X7ROOT File Manager
Current Path:
/home/u126090504/domains/chanakyahss.org.in/security-monitor
home
/
u126090504
/
domains
/
chanakyahss.org.in
/
security-monitor
/
📁
..
📁
data
📄
guard.php
(3.58 KB)
📄
scanner.php
(810 B)
Editing: scanner.php
<?php function calculateEntropy($string) { $h = 0; $len = strlen($string); if ($len == 0) return 0; $freq = count_chars($string, 1); foreach ($freq as $v) { $p = $v / $len; $h -= $p * log($p, 2); } return $h; } function riskScore($content) { $score = 0; $danger = ['eval','base64_decode','gzinflate','shell_exec','system','assert']; foreach($danger as $d){ if(stripos($content, $d) !== false){ $score += 2; } } if(preg_match('/[A-Za-z0-9\/\+=]{200,}/', $content)){ $score += 3; } if(strlen($content) > 15000){ $score += 1; } $entropy = calculateEntropy($content); if($entropy > 6.5){ $score += 3; } return $score; }
Upload File
Create Folder