cleantalk/spbct-signatures-analyser

CleanTalk SPBCT Signatures Analyser classes

Installs: 1 229

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:cleantalk-spbct-scanner

1.2.8 2024-04-12 09:02 UTC

This package is auto-updated.

Last update: 2024-04-12 09:04:19 UTC


README

Install

composer require cleantalk/spbct-signatures-analyser

Using

<?php

// Require composer autoloader
require_once 'vendor/autoload.php';

use CleantalkSP\Common\Scanner\SignaturesAnalyser\Controller;
use CleantalkSP\Common\Scanner\SignaturesAnalyser\Structures\FileInfo;

$file_path = '/bad/index.php';
$root_dir_patn = __DIR__;
$sigantures = []; // Get signatures from the cloud

// Instantiate the scanner module
$signatures_scanner = new Controller();

// Prepare files information
$file_to_check = new FileInfo(
    $file_path,
    'full_hash'
);

// $res will contain the scanning result
$res = $signatures_scanner->scanFile($file_to_check, $root_dir_patn, $sigantures);

var_dump($res); // $res will contain the scanning result