Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,251 changes: 1,125 additions & 1,126 deletions js/public/spbct-react-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/spbc-admin.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/spbc-admin.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/spbc-scanner-plugin.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/spbc-scanner-plugin.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/spbc-settings.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/spbc-settings.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/spbc-timeline-widget.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/spbc-timeline-widget.min.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default function ScanButton({scannerStatus, scannerError, onScanStarted})
{buttonText}
</button>
{(isStarting || scannerStatus === 'in_progress') && (
<img className='spbc_preloader' src='http://wordpress-security.test/wp-content/plugins/security-malware-firewall/images/preloader.gif' style={{display: 'inline-block'}}/>
<img className='spbc_preloader' src='/wp-content/plugins/security-malware-firewall/images/preloader.gif' style={{display: 'inline-block'}}/>
)}
</div>
</>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export default function ScannerInfo({
</>
)}
&nbsp;
<a href='http://wordpress-security.test/wp-admin/options-general.php?page=spbc&amp;spbc_tab=backups'>
<a href='options-general.php?page=spbc&amp;spbc_tab=backups'>
{__('Backups', 'security-malware-firewall')}
</a>
</p>
Expand Down
43 changes: 36 additions & 7 deletions lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,21 @@
use CleantalkSP\SpbctWP\Scanner\ScanningLog\ScanningLogFacade;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\ScannerFileStatuses;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\ScanningStagesStorage;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\DBTriggerAnalysis;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\AutoCureBackup;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\CleanResults;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\DbTriggerAnalysis;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\FileSystemAnalysis;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\FrontendAnalysis;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\GetApprovedHashes;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\GetCmsHashes;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\GetDeniedHashes;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\GetModulesHashes;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\HeuristicAnalysis;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\OSCronAnalysis;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\ImportantFilesListing;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\OsCronAnalysis;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\OutboundLinks;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\ScheduleSendHeuristicSuspiciousFiles;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\SendResults;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\SignatureAnalysis;
use CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\BinaryAnalysis;
use CleantalkSP\SpbctWP\Scanner\BinaryCheckModule\BinaryCheckModule;
Expand Down Expand Up @@ -812,6 +816,11 @@ public function clean_results($offset = null, $amount = 50000) // phpcs:ignore P

global $spbc;

$scanning_stages_storage = new ScanningStagesStorage();
$scanning_stages_storage->converter->loadCollection();
$scanning_stages_storage->getStage(CleanResults::class);
$scanning_stages_storage->saveToDb();

$result = $this->db->fetchAll(
'SELECT path, fast_hash, full_hash, status'
. ' FROM ' . SPBC_TBL_SCAN_FILES
Expand Down Expand Up @@ -1243,13 +1252,15 @@ public function file_system_analysis($offset = null, $amount = null, $path_to_sc
public function os_cron_analysis() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
{
$version_check = $this->checkWpVersionConsistency();
if ($version_check !== null) {
return $version_check;
}

$scanning_stages_storage = new ScanningStagesStorage();
$scanning_stages_storage->converter->loadCollection();
$stage_data_obj = $scanning_stages_storage->getStage(OSCronAnalysis::class);
$stage_data_obj = $scanning_stages_storage->getStage(OsCronAnalysis::class);
$scanning_stages_storage->saveToDb();

if ($version_check !== null) {
return $version_check;
}

$result = OSCronModel::run();

Expand All @@ -1267,6 +1278,8 @@ public function os_cron_analysis() // phpcs:ignore PSR1.Methods.CamelCapsMethodN
'<b>' . $stage_data_obj::getTitle() . '</b> ' . $stage_data_obj->getDescription()
);

$scanning_stages_storage->saveToDb();

return array('end' => 1);
}

Expand All @@ -1284,7 +1297,8 @@ public function db_trigger_analysis() // phpcs:ignore PSR1.Methods.CamelCapsMeth

$scanning_stages_storage = new ScanningStagesStorage();
$scanning_stages_storage->converter->loadCollection();
$stage_data_obj = $scanning_stages_storage->getStage(DBTriggerAnalysis::class);
$stage_data_obj = $scanning_stages_storage->getStage(DbTriggerAnalysis::class);
$scanning_stages_storage->saveToDb();

$trigger_scanner = new DBTriggerModel();
$result = $trigger_scanner->run();
Expand Down Expand Up @@ -2171,6 +2185,11 @@ public function binary_analysis($offset = null, $amount = null) // phpcs:ignore

public function auto_cure_backup() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
{
$scanning_stages_storage = new ScanningStagesStorage();
$scanning_stages_storage->converter->loadCollection();
$scanning_stages_storage->getStage(AutoCureBackup::class);
$scanning_stages_storage->saveToDb();

$version_check = $this->checkWpVersionConsistency();
if ($version_check !== null) {
return $version_check;
Expand Down Expand Up @@ -2422,6 +2441,11 @@ public function frontend_analysis($offset = null, $amount = null) // phpcs:ignor

public function important_files_listing() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
{
$scanning_stages_storage = new ScanningStagesStorage();
$scanning_stages_storage->converter->loadCollection();
$scanning_stages_storage->getStage(ImportantFilesListing::class);
$scanning_stages_storage->saveToDb();

$version_check = $this->checkWpVersionConsistency();
if ($version_check !== null) {
return $version_check;
Expand Down Expand Up @@ -2507,6 +2531,11 @@ public function important_files_listing() // phpcs:ignore PSR1.Methods.CamelCaps
*/
public function send_results() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
{
$scanning_stages_storage = new ScanningStagesStorage();
$scanning_stages_storage->converter->loadCollection();
$scanning_stages_storage->getStage(SendResults::class);
$scanning_stages_storage->saveToDb();

$version_check = $this->checkWpVersionConsistency();
if ($version_check !== null) {
return $version_check;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages;

use CleantalkSP\SpbctWP\DB\ObjectForOptionsInterface;

class AutoCureBackup extends \CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\ScanningStageAbstract implements ObjectForOptionsInterface
{
public function getName()
{
return __CLASS__;
}

public function getData()
{
return [];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages;

use CleantalkSP\SpbctWP\DB\ObjectForOptionsInterface;

class CleanResults extends ScanningStageAbstract implements ObjectForOptionsInterface
{
public function getName()
{
return __CLASS__;
}

public function getData()
{
return [];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use CleantalkSP\SpbctWP\DB\ObjectForOptionsInterface;

class DBTriggerAnalysis extends ScanningStageAbstract implements ObjectForOptionsInterface
class DbTriggerAnalysis extends ScanningStageAbstract implements ObjectForOptionsInterface
{
public $scanned_count_files = 0;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages;

use CleantalkSP\SpbctWP\DB\ObjectForOptionsInterface;

class ImportantFilesListing extends \CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\ScanningStageAbstract implements ObjectForOptionsInterface
{
public function getName()
{
return __CLASS__;
}

public function getData()
{
return [];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use CleantalkSP\SpbctWP\DB\ObjectForOptionsInterface;

class OSCronAnalysis extends ScanningStageAbstract implements ObjectForOptionsInterface
class OsCronAnalysis extends ScanningStageAbstract implements ObjectForOptionsInterface
{
public $scanned_count_files = 0;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages;

use CleantalkSP\SpbctWP\DB\ObjectForOptionsInterface;

class SendResults extends \CleantalkSP\SpbctWP\Scanner\ScanningStagesModule\Stages\ScanningStageAbstract implements ObjectForOptionsInterface
{
public function getName()
{
return __CLASS__;
}

public function getData()
{
return [];
}
}
Loading