monaz/vt-php-api3
Composer 安装命令:
composer require monaz/vt-php-api3
包简介
The unofficial PHP client library for VirusTotal Public API v3.0
关键字:
README 文档
README
This is an unofficial PHP client library for VirusTotal. With this library you can interact with the VirusTotal REST API v3 and automate your workflow quickly and efficiently.
This is an upgraded version of Virus Total Public API v2.0 PHP Wrapper.
Things you can do with this sdk:
- Scan files and URLs
- Get information about files, URLs, domains, etc
- And much more ...
Installation:
- You will need composer (http://getcomposer.org/)
- composer search
vt-php-api3or visit the package info on packagist (https://packagist.org/packages/monaz/vt-php-api3)
Install using composer by running:
composer require monaz/vt-php-api3
Or include the following in your composer.json:
{
"require": {
"monaz/vt-php-api3": "dev-master"
}
}
Then run:
composer update
Usage:
<?php require_once 'Vendors/autoload.php'; $apiKey = 'your_api_key'; // Scan file $fileScanner = new \Monaz\VirusTotal\File($apiKey); $resp = $fileScanner->scan('foo.txt'); $result = $fileScanner->getReport($resp['hash']); // Scan Url $urlScanner = new \Monaz\VirusTotal\Url($apiKey); $resp = $urlScanner->scan('foo.txt'); $result = $urlScanner->getReport($resp['hash']); // Get Domain Report $domainScanner = new \Monaz\VirusTotal\Domain($apiKey); $result = $domainScanner->getReport("domain.com"); // Get IP Report $ipScanner = new \Monaz\VirusTotal\Ip($apiKey); $result = $ipScanner->getReport("1.1.1.1"); ?>
Since the helper scanners does not wrap all the available VirusTotal API endpoints, we have created request helpers that you can utilize to make direct requests.
<?php require_once 'Vendors/autoload.php'; $apiKey = 'your_api_key'; $baseClient = new \Monaz\VirusTotal\BaseClient($apiKey); $baseClient->makePostRequest("endpoint", $payload, $type); $baseClient->makeGetRequest("endpoint", $payload); $baseClient->makePatchRequest("endpoint", $payload); $baseClient->makeDeleteRequest("endpoint"); ?>
The $type parameter in makePostRequest can be form_data and multipart. You can choose the required one based on VirusTotal API doc of the desired endpoint.
Contributing
Thank you for considering contributing to the library! Just fork and when you are done make an PR. Just make sure you run the tests before submitting your request.
You can run the phpunit tests using this command:
"vendor/bin/phpunit" --coverage-text --configuration phpunit.xml.dist tests
License
The library is open-sourced software licensed under the MIT license.
monaz/vt-php-api3 适用场景与选型建议
monaz/vt-php-api3 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 501 次下载、GitHub Stars 达 5, 最近一次更新时间为 2022 年 04 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「security」 「api」 「virus」 「virustotal」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 monaz/vt-php-api3 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 monaz/vt-php-api3 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 monaz/vt-php-api3 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Provide a way to secure accesses to all routes of an symfony application.
A PSR-7 compatible library for making CRUD API endpoints
It's a barebone security class written on PHP
Contao CMS integrity check for some files
A PHP security linter to detect insecure functions like var_dump, print_r, and other dangerous functions in your codebase
Alfabank REST API integration
统计信息
- 总下载量: 501
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 15
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-04-13