Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Maikuolan committed Dec 5, 2020
1 parent 19d11d3 commit 930b497
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
8 changes: 8 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ Versioning guidelines for SemVer can be found at: https://semver.org/

(none)

=== Version/Release 1.0.1 ===
MAINTENANCE RELEASE.

- [2020.12.05; Maikuolan]: Fixed some small code-style issues.

Caleb M (Maikuolan),
December 5, 2020.

=== Version/Release 1.0.0 ===
MAJOR RELEASE (BACKWARDS COMPATIBLE).

Expand Down
13 changes: 3 additions & 10 deletions SigTool.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* SigTool v1.0.0 (last modified: 2020.03.07).
* SigTool v1.0.1 (last modified: 2020.12.05).
* Generates signatures for phpMussel using main.cvd and daily.cvd from ClamAV.
*
* Package location: GitHub <https://github.com/phpMussel/SigTool>.
Expand All @@ -12,10 +12,10 @@
class SigTool extends \Maikuolan\Common\YAML
{
/** Script version. */
public $Ver = '1.0.0';
public $Ver = '1.0.1';

/** Last modified date. */
public $Modified = '2020.03.07';
public $Modified = '2020.12.05';

/** Script user agent. */
public $UA = 'SigTool v%s (https://github.com/phpMussel/SigTool)';
Expand Down Expand Up @@ -235,7 +235,6 @@ public function fixPath($Path)
{
return str_replace(['\/', '\\', '/\\'], '/', $Path);
}

}

/** Fetch arguments. */
Expand Down Expand Up @@ -568,7 +567,6 @@ public function fixPath($Path)
echo unlink($SigTool->fixPath(__DIR__ . '/' . $File)) ? $L10N['Done'] : $L10N['Failed'];
}
}

}

/** NDB sequence. */
Expand Down Expand Up @@ -744,9 +742,7 @@ public function fixPath($Path)
/** Normalise to lower-case. */
$SigHex = strtolower($SigHex);

/** Assign to the appropriate signature file (regex). */
if (preg_match('/[^a-f\d*]/i', $SigHex)) {

/** Convert from ClamAV's pattern syntax to PCRE syntax. */
$SigHex = preg_replace([
'~^.*\{(?:-?\d{4,}|\d{4,}-)\}.*$~',
Expand Down Expand Up @@ -859,10 +855,7 @@ function ($Matches) use ($Char, $Length) {
if (!empty($CorrelationsRegex[$SigType])) {
$FileSets[$CorrelationsRegex[$SigType]] .= $ThisLine;
}

/** Assign to the appropriate signature file (non-regex). */
} else {

/** Wildcards and other tricks. */
$SigHex = str_replace('*', '>', $SigHex);

Expand Down

0 comments on commit 930b497

Please sign in to comment.