jayzeng/virustotalapi

VirusTotal 公共API v2.0 PHP包装器

0.1.9 2017-01-29 06:21 UTC

README

Total Downloads Latest Stable Version Scrutinizer Code Quality Build Status

项目网站: (http://jayzeng.github.io/virustotal_apiwrapper/)

这是一个与VirusTotal公共API v2.0交互的PHP SDK,有关详细信息,请参阅https://www.virustotal.com/en/documentation/public-api

我想表达我的感激之情!

如果您觉得这个项目很有用,并愿意表达您的感激之情,太棒了!

Support via Gittip

##使用方法

在您的composer.json中包含以下内容

{
  "require": {
    "jayzeng/virustotalapi": "dev-master"
  }
}
composer update -v -o

快速入门

<?php
require_once 'Vendors/autoload.php';

$apiKey = 'your_api_key';

$file = new VirusTotal\File($apiKey);
$resp = $file->scan('foo.txt');

var_dump($resp);
?>

示例输出

[jayzeng] ~/Projects/virustotal_apiwrapper/Example] (master)>  php file.php |more
array(8) {
  ["scan_id"]=>
  string(75) "1afc739de16163a80380326ce05e1e69edfc99b7a931329ab127b5099377f076-1370244536"
  ["sha1"]=>
  string(40) "da9ed61e1bfa981c545acad4136e8a05f0602e45"
  ["resource"]=>
  string(64) "1afc739de16163a80380326ce05e1e69edfc99b7a931329ab127b5099377f076"
  ["response_code"]=>
  int(1)
  ["sha256"]=>
  string(64) "1afc739de16163a80380326ce05e1e69edfc99b7a931329ab127b5099377f076"
  ["permalink"]=>
  string(117) "https://www.virustotal.com/file/1afc739de16163a80380326ce05e1e69edfc99b7a931329ab127b5099377f076/analysis/1370244536/"
  ["md5"]=>
  string(32) "b2f301b40a5fb752b19ae0e5c7f679b4"
  ["verbose_msg"]=>
  string(64) "Scan request successfully queued, come back later for the report"
}

##示例:仍然感到困惑?请参阅Examples/ (https://github.com/jayzeng/virustotal_apiwrapper/tree/master/Examples)

我还制作了一个演示应用程序,源代码可在https://github.com/jayzeng/virustotal_demoapp上找到

##如何运行测试?

phpunit --configuration Tests/Conf/phpunit.xml Tests

或者

Vendors/bin/phpunit --configuration Tests/Conf/phpunit.xml Tests

##问题和开发

##如何发布新版本?

  • RELEASE_VERSION - 版本号
  • RELEASE_MESSAGE - 发布信息
make release RELEASE_VERSION="0.1" RELEASE_MESSAGE="v0.1 is released"

##如何贡献?太棒了!请遵循以下步骤

  • GitHub Issues中创建一个问题,解释您想做什么
  • 将存储库分叉到您的GitHub账户
  • 创建一个新分支(最好使用与问题编号相关的描述性名称,例如:feature/issue1_add_urlendpoint)
  • 添加/重构测试
  • 在本地运行测试(请参阅如何运行测试),并确保它们在本地通过
  • 发送拉取请求
  • 通过测试和travis构建

##作者: Jay Zeng,电子邮件: jayzeng@jay-zeng.com