Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(scoop-virustotal): Migrate to VirusTotal API v3 #4983

Merged
merged 30 commits into from
Jun 15, 2022
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unused codes
  • Loading branch information
ClassicDarkChocolate committed Jun 11, 2022
commit 94bacbc548c96147c4a20ea28aadc8c0582296fe
21 changes: 0 additions & 21 deletions libexec/scoop-virustotal.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -178,27 +178,6 @@ Function Get-VirusTotalResultByUrl ($url, $app) {
}
}

Function Get-VirusTotalResult ($hash, $url, $app) {
if ($hash -match '(?<algo>[^:]+):(?<hash>.*)') {
$hash = $matches.hash
if ($matches.algo -match '(md5|sha1|sha256)') {
Get-VirusTotalResultByHash $hash $app
return
}
Write-Warning "$app`: Unsupported hash $($matches.algo), will search by url instead"
} elseif ($hash) {
Get-VirusTotalResultByHash $hash $app
return
} else {
Write-Warning "$app`: Can't find hash for $url, will search by url instead"
}
$result = Get-VirusTotalResultByUrl $url $app
$hash = $result.'App.Hash'
if ($hash) {
Get-VirusTotalResultByHash $result.'App.Hash' $app
}
}

# Submit-ToVirusTotal
# - $url: where file to check can be downloaded
# - $app: Name of the application (used for reporting)
Expand Down