cleantalk/spbct-signatures-analyser

CleanTalk SPBCT 签名分析器类

安装数1,679

依赖项: 0

建议者: 0

安全性: 0

星标: 0

关注者: 3

分支: 0

公开问题: 0

类型:cleantalk-spbct-scanner

1.2.10 2024-06-25 06:52 UTC

This package is auto-updated.

Last update: 2024-09-25 07:16:29 UTC


README

安装

composer require cleantalk/spbct-signatures-analyser

使用

<?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