daniesy/virus-scanner

为 Laravel 5.5+ 提供一个简单且更新的 Virus Total 包装器

安装次数: 6,764

依赖项: 0

建议者: 0

安全: 0

星标: 2

关注者: 2

分支: 0

开放问题: 0

类型:laravel

1.0.1 2017-09-20 13:02 UTC

This package is auto-updated.

Last update: 2024-09-10 00:42:15 UTC


README

为 Laravel 5.5+ 提供一个简单且更新的 Virus Total 包装器

信息

本软件包旨在与 Laravel 5.5 一起使用,但您也可以将其作为独立软件包使用。

Laravel Virus Scanner 提供一个服务提供者和一个门面,但由于 Laravel 的软件包自动发现,您无需编辑 app.php。 :)

安装

3步快速入门

  1. 安装软件包:composer require daniesy/virus-scanner
  2. 发布供应商设置:php artisan vendor:publish
  3. config/virus_scanner.php 中设置您的 api_key

用法

Laravel Virus Scanner 实现了 Virus Total Api 提供的所有功能。

扫描文件

扫描过程可能需要一些时间,因为通过 Virus Total Api 扫描的文件以最低优先级处理。

use VirusScanner;

$scanner = VirusScanner::scanFile('/path/to/file');
$result = $scanner->checkResult();

echo $result->total;         // The total number of scans
echo $result->positives;     // The number of positive detections
echo $result->permalink;     // Url of the scan page
var_dump($result->scans);    // Array of results for each individual scan

扫描 URL

use VirusScanner;

$scanner = VirusScanner::scanUrl('http://url/to/file.exe');
$result = $scanner->checkResult();

检查域名

use VirusScanner;

$report = VirusScanner::checkDomain("https://danutflorian.com");
var_dump($report);

检查 IP 地址

use VirusScanner;

$report = VirusScanner::checkIp('192.168.1.1');
var_dump($report);