aedart / athenaeum-antivirus
Laravel 的防病毒扫描器
8.10.0
2024-09-23 07:54 UTC
Requires
- php: ^8.2
- ext-sockets: *
- aedart/athenaeum-contracts: ^8.10
- aedart/athenaeum-streams: ^8.10
- aedart/athenaeum-support: ^8.10
- aedart/athenaeum-validation: ^8.10
- illuminate/events: ^v11.23.5
- xenolope/quahog: ^3.0
- dev-main
- 8.10.0
- 8.9.0
- 8.8.0
- 8.7.0
- 8.6.0
- 8.5.0
- 8.4.0
- 8.3.0
- 8.2.0
- 8.1.0
- 8.0.0
- 7.33.0
- 7.32.0
- 7.31.0
- 7.30.1
- 7.30.0
- 7.29.0
- 7.28.0
- 7.27.0
- 7.26.0
- 7.25.0
- 7.24.0
- 7.23.0
- 7.22.1
- 7.22.0
- 7.21.0
- 7.20.0
- 7.19.0
- 7.18.1
- 7.18.0
- 7.17.0
- 7.16.0
- 7.15.0
- 7.14.0
- 7.13.0
- 7.12.0
- 7.11.3
- 7.11.2
- 7.11.1
- 7.11.0
- 7.10.1
- 7.10.0
- 7.9.1
- 7.9.0
- 7.8.0
- 7.7.2
- 7.7.1
- 7.7.0
- 7.6.0
- 7.5.0
- 7.4.0
This package is auto-updated.
Last update: 2024-09-23 07:55:38 UTC
README
防病毒包提供了一种基于“配置文件”的方法来扫描文件,查找感染,如病毒、恶意软件或其他有害代码。
use Aedart\Antivirus\Facades\Antivirus; $result = Antivirus::scan($file); if (!$result->isOk()) { // File may contain harmful code... do something! }
该包还包含一个默认验证规则,以防止上传受感染的文件。
use Aedart\Antivirus\Validation\Rules\InfectionFreeFile; use Illuminate\Support\Facades\Route; use Illuminate\Http\Request; Route::post('/pictures', function (Request $request) { $request->validate([ 'picture' => [ 'required', 'file', new InfectionFreeFile() ] ]); $file = $request->file('picture'); // ... do something with uploaded file... });
支持的扫描器
- ClamAV
- 空扫描器(仅用于测试)
- (您的自定义扫描器)
文档
请阅读官方文档以获取更多信息。
仓库
单一代码库位于 github.com/aedart/athenaeum
版本管理
此包遵循 语义版本控制 2.0.0
许可证
BSD-3-Clause,阅读包含在此包中的LICENSE文件