monaz/vt-laravel-rules
最新稳定版本:v0.1-beta
Composer 安装命令:
composer require monaz/vt-laravel-rules
包简介
Set of useful validation rules using VirusTotal API for Laravel
README 文档
README
This package provides a set of useful validation rule to get scan reports of files, urls, domains and ips.
This is based on my other library PHP client library for VirusTotal Public API v3.0.
Installation:
- You will need composer (http://getcomposer.org/)
- composer search
vt-laravel-rulesor visit the package info on packagist (https://packagist.org/packages/monaz/vt-laravel-rules)
Install using composer by running:
composer require monaz/vt-laravel-rules
Or include the following in your composer.json:
{
"require": {
"monaz/vt-laravel-rules": "dev-master"
}
}
Then run:
composer update
Then publish the package assets including the config and translation files:
php artisan vendor:publish --tag=vt-laravel
By publishing the assets you will see a virus-total.php in your
default config dir. Make sure to acquire a suitable API key from
VirusTotal and put it in the config page.
Instead of always changing the config file, you can also set the
VIRUS_TOTAL_API_KEY key in your .env file.
Usage:
See the following basic usage example
<?php use Monaz\LaravelVirusTotal\Rules\File; use Monaz\LaravelVirusTotal\Rules\Url; use Monaz\LaravelVirusTotal\Rules\Ip; use Monaz\LaravelVirusTotal\Rules\Domain; // somewhere in your validators public function rules() { return [ 'my_file' => ['file', new File()], 'my_url' => ['url', new Url()], 'my_ip' => ['ip', new Ip()], 'my_domain' => ['string', new domain()] ]; } ?>
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.
统计信息
- 总下载量: 379
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-04-14