|
1 | 1 | <?php |
2 | 2 | /** |
3 | | - * SigTool v1.0.0 (last modified: 2020.03.07). |
| 3 | + * SigTool v1.0.1 (last modified: 2020.12.05). |
4 | 4 | * Generates signatures for phpMussel using main.cvd and daily.cvd from ClamAV. |
5 | 5 | * |
6 | 6 | * Package location: GitHub <https://github.com/phpMussel/SigTool>. |
|
12 | 12 | class SigTool extends \Maikuolan\Common\YAML |
13 | 13 | { |
14 | 14 | /** Script version. */ |
15 | | - public $Ver = '1.0.0'; |
| 15 | + public $Ver = '1.0.1'; |
16 | 16 |
|
17 | 17 | /** Last modified date. */ |
18 | | - public $Modified = '2020.03.07'; |
| 18 | + public $Modified = '2020.12.05'; |
19 | 19 |
|
20 | 20 | /** Script user agent. */ |
21 | 21 | public $UA = 'SigTool v%s (https://github.com/phpMussel/SigTool)'; |
@@ -235,7 +235,6 @@ public function fixPath($Path) |
235 | 235 | { |
236 | 236 | return str_replace(['\/', '\\', '/\\'], '/', $Path); |
237 | 237 | } |
238 | | - |
239 | 238 | } |
240 | 239 |
|
241 | 240 | /** Fetch arguments. */ |
@@ -568,7 +567,6 @@ public function fixPath($Path) |
568 | 567 | echo unlink($SigTool->fixPath(__DIR__ . '/' . $File)) ? $L10N['Done'] : $L10N['Failed']; |
569 | 568 | } |
570 | 569 | } |
571 | | - |
572 | 570 | } |
573 | 571 |
|
574 | 572 | /** NDB sequence. */ |
@@ -744,9 +742,7 @@ public function fixPath($Path) |
744 | 742 | /** Normalise to lower-case. */ |
745 | 743 | $SigHex = strtolower($SigHex); |
746 | 744 |
|
747 | | - /** Assign to the appropriate signature file (regex). */ |
748 | 745 | if (preg_match('/[^a-f\d*]/i', $SigHex)) { |
749 | | - |
750 | 746 | /** Convert from ClamAV's pattern syntax to PCRE syntax. */ |
751 | 747 | $SigHex = preg_replace([ |
752 | 748 | '~^.*\{(?:-?\d{4,}|\d{4,}-)\}.*$~', |
@@ -859,10 +855,7 @@ function ($Matches) use ($Char, $Length) { |
859 | 855 | if (!empty($CorrelationsRegex[$SigType])) { |
860 | 856 | $FileSets[$CorrelationsRegex[$SigType]] .= $ThisLine; |
861 | 857 | } |
862 | | - |
863 | | - /** Assign to the appropriate signature file (non-regex). */ |
864 | 858 | } else { |
865 | | - |
866 | 859 | /** Wildcards and other tricks. */ |
867 | 860 | $SigHex = str_replace('*', '>', $SigHex); |
868 | 861 |
|
|
0 commit comments