Skip to content

Commit 662552a

Browse files
committed
fix: exploit lite mode
1 parent b9d27ed commit 662552a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/Exploits.php

+8-3
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,14 @@ public static function getAll()
451451
public static function getLite()
452452
{
453453
$exploits = self::$default;
454-
$exploits['execution'] = '/\b(eval|assert|passthru|exec|include|system|pcntl_exec|shell_exec|`|array_map|ob_start|call_user_func(_array)?)\s*\(\s*(base64_decode|php:\/\/input|str_rot13|gz(inflate|uncompress)|getenv|pack|\\?\$_(GET|REQUEST|POST|COOKIE|SERVER)).*?(?=\))\)/';
455-
$exploits['concat_vars_with_spaces'] = '/(\$([a-zA-Z0-9]+)[\s\r\n]*\.[\s\r\n]*){8}/'; // concatenation of more than 8 words, with spaces
456-
$exploits['concat_vars_array'] = '/(\$([a-zA-Z0-9]+)(\{|\[)([0-9]+)(\}|\])[\s\r\n]*\.[\s\r\n]*){8}.*?(?=\})\}/i'; // concatenation of more than 8 words, with spaces
454+
455+
// Function that takes a callback as 1st parameter
456+
$exploits['execution']['pattern'] = '/\b(eval|assert|passthru|exec|include|system|pcntl_exec|shell_exec|`|array_map|ob_start|call_user_func(_array)?)\s*\(\s*(base64_decode|php:\/\/input|str_rot13|gz(inflate|uncompress)|getenv|pack|\\?\$_(GET|REQUEST|POST|COOKIE|SERVER)).*?(?=\))\)/';
457+
// Concatenation of more than 8 words, with spaces
458+
$exploits['concat_vars_with_spaces']['pattern'] = '/(\$([a-zA-Z0-9]+)[\s\r\n]*\.[\s\r\n]*){8}/';
459+
// Concatenation of more than 8 words, with spaces
460+
$exploits['concat_vars_array']['pattern'] = '/(\$([a-zA-Z0-9]+)(\{|\[)([0-9]+)(\}|\])[\s\r\n]*\.[\s\r\n]*){8}.*?(?=\})\}/i';
461+
457462
unset(
458463
$exploits['nano'],
459464
$exploits['double_var2'],

0 commit comments

Comments
 (0)