monaz/vt-php-api3 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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:

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 monaz/vt-php-api3 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 501
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 15
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-04-13