You must not import a class. For Laravel, You can simply use the VirusTotal
Facade.
Add the VIRUS_TOTAL_API_KEY
variable in your .env
file with VirusTotal API key.
# ...
VIRUS_TOTAL_API_KEY=<YOUR-API_KEY>
# ...
Optional: Publish the config
php artisan vendor:publish --provider="NormanHuth\VirusTotal\Providers\ServiceProvider"
$upload = VirusTotal::scanFile('/path/to-file');
$analysisId = $upload['data']['id'];
$result = VirusTotal::analyseUrlOrFile($analysisId);
$url = VirusTotal::scanURL('https://huth.it/coffee');
$analysisId = $url['data']['id'];
$result = VirusTotal::analyseUrlOrFile($analysisId);
$result = VirusTotal::scanDomain('huth.it');
return $result['data'];
$result = VirusTotal::scanDomain('huth.it');
return $result['data'];
Reference: https://developers.virustotal.com/reference/ip-info
VirusTotal::getAnIPAddressReport(string $ip): array
Reference: https://developers.virustotal.com/reference/ip-comments-get
VirusTotal::getCommentsOnAnIPAddress(string $ip, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/ip-comments-post
VirusTotal::addACommentToAnIPAddress(string $ip, string $text): array
Reference: https://developers.virustotal.com/reference/ip-relationships
VirusTotal::getObjectsRelatedToAnIPAddress(string $ip, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/ip-relationships-ids
VirusTotal::getObjectDescriptorsRelatedToAnIPAddress(string $ip, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/ip-votes
VirusTotal::getVotesOnAnIPAddress(string $ip): array
Reference: https://developers.virustotal.com/reference/ip-votes-post
VirusTotal::addAVoteToAnIPAddress(string $ip, string $verdict): array
Reference: https://developers.virustotal.com/reference/domain-info
VirusTotal::getADomainReport(string $domain): array
Reference: https://developers.virustotal.com/reference/domains-comments-get
VirusTotal::getCommentsOnADomain(string $domain, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/domains-comments-post
VirusTotal::addACommentToADomain(string $domain, string $text): array
Reference: https://developers.virustotal.com/reference/domains-relationships
VirusTotal::getObjectsRelatedToADomain(string $domain, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/domains-relationships-ids
VirusTotal::getObjectDescriptorsRelatedToADomain(string $domain, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/get-resolution-by-id
VirusTotal::getADNSResolutionObject(string $id): array
Reference: https://developers.virustotal.com/reference/domains-votes-get
VirusTotal::getVotesOnADomain(string $domain): array
Reference: https://developers.virustotal.com/reference/domain-votes-post
VirusTotal::addAVoteToADomain(string $domain, string $verdict): array
Reference: https://developers.virustotal.com/reference/files-scan
VirusTotal::uploadAFile(string $file, ?string $password): array
Reference: https://developers.virustotal.com/reference/files-upload-url
VirusTotal::getAURLForUploadingLargeFiles(): array
Reference: https://developers.virustotal.com/reference/files-upload-url
VirusTotal::uploadALargeFile(string $url, string $file, ?string $password): array
Reference: https://developers.virustotal.com/reference/files-analyse
VirusTotal::requestAFileRescan(string $id): array
Reference: https://developers.virustotal.com/reference/files-download-url
VirusTotal::getAFilesDownloadURL(string $id): array
Reference: https://developers.virustotal.com/reference/files-download
VirusTotal::downloadAFile(string $id, string $target): \Psr\Http\Message\ResponseInterface
Reference: https://developers.virustotal.com/reference/files-comments-get
VirusTotal::getCommentsOnAFile(string $id, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/ip-comments-post
VirusTotal::addACommentToAFile(string $id, string $text): array
Reference: https://developers.virustotal.com/reference/files-relationships
VirusTotal::getObjectsRelatedToAFile(string $id, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/files-relationships-ids
VirusTotal::getObjectDescriptorsRelatedToAFile(string $id, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/get-sigma-rules
VirusTotal::getACrowdsourcedSigmaRuleObject(string $id): array
Reference: https://developers.virustotal.com/reference/get-yara-rulesets
VirusTotal::getACrowdsourcedYARARuleset(string $id): array
Reference: https://developers.virustotal.com/reference/files-votes-get
VirusTotal::getVotesOnAFile(string $id): array
Reference: https://developers.virustotal.com/reference/files-votes-post
VirusTotal::addAVoteOnAFile(string $id, string $verdict): array
Reference: https://developers.virustotal.com/reference/scan-url
VirusTotal::scanURL(string $url): array
Reference: https://developers.virustotal.com/reference/url-info
VirusTotal::getAURLAnalysisReport(string $id): array
Reference: https://developers.virustotal.com/reference/urls-analyse
VirusTotal::requestAURLRescan(string $id): array
Reference: https://developers.virustotal.com/reference/urls-comments-get
VirusTotal::getCommentsOnAURL(string $id, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/urls-comments-post
VirusTotal::addACommentOnAURL(string $ip, string $text): array
Reference: https://developers.virustotal.com/reference/urls-relationships
VirusTotal::getObjectsRelatedToAURL(string $id, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/ip-relationships-ids
VirusTotal::getObjectDescriptorsRelatedToAURL(string $id, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/urls-votes-get
VirusTotal::getVotesOnAURL(string $id): array
Reference: https://developers.virustotal.com/reference/urls-votes-post
VirusTotal::addAVoteOnAURL(string $id, string $verdict): array
Reference: https://developers.virustotal.com/reference/get-comments
VirusTotal::getLatestComments(?string $filter, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/get-comment
VirusTotal::getACommentObject(string $id, ?string $relationships): array
Reference: https://developers.virustotal.com/reference/comment-id-patch
VirusTotal::updateAComment(string $id, mixed $data): array
Reference: https://developers.virustotal.com/reference/comment-id-delete
VirusTotal::deleteAComment(string $id): array
Reference: https://developers.virustotal.com/reference/comments-relationships
VirusTotal::getObjectsRelatedToAComment(string $id, string $relationship): array
Reference: https://developers.virustotal.com/reference/comments-relationships-ids
VirusTotal::getObjectDescriptorsRelatedToAComment(string $id, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/vote-comment
VirusTotal::addAVoteToAComment(string $id, mixed $data): array
Reference: https://developers.virustotal.com/reference/analysis
VirusTotal::getAURLOrFileAnalysis(string $id): array
Reference: https://developers.virustotal.com/reference/analysesidrelationship-1
VirusTotal::getObjectsRelatedToAnAnalysis(string $id, string $relationship): array
Reference: https://developers.virustotal.com/reference/analysesidrelationshipsrelationship-1
VirusTotal::getObjectDescriptorsRelatedToAnAnalysis(string $id, string $relationship): array
Reference: https://developers.virustotal.com/reference/get-submission
VirusTotal::getASubmissionObject(string $id): array
Reference: https://developers.virustotal.com/reference/get-operations-id
VirusTotal::getAnOperationObject(string $id): array
Reference: https://developers.virustotal.com/reference/attack_tacticsid
VirusTotal::getAnAttackTacticObject(string $id): array
Reference: https://developers.virustotal.com/reference/attack_tacticsidrelationship
VirusTotal::getObjectsRelatedToAnAttackTactic(string $id, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/attack_tacticsidrelationshipsrelationship
VirusTotal::getObjectDescriptorsRelatedToAnAttackTactic(string $id, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/attack_techniqueid
VirusTotal::getAnAttackTechniqueObject(string $id): array
Reference: https://developers.virustotal.com/reference/attack_techniqueidrelationship
VirusTotal::getObjectsRelatedToAnAttackTechnique(string $id, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/attack_techniquesidrelationshipsrelationship
VirusTotal::getObjectDescriptorsRelatedToAnAttackTechnique(string $id, string $relationship, ?string $cursor, int $limit): array
Reference: https://developers.virustotal.com/reference/popular_threat_categories
VirusTotal::getAListOfPopularThreatCategories(): array