mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-05-06 09:42:29 +00:00
Enable MD5 & SHA1: VirusTotal allows to query those hashes, too
This commit is contained in:
@@ -26,8 +26,14 @@ Function Navigate-ToHash($hash) {
|
||||
}
|
||||
|
||||
Function Start-VirusTotal ($h, $app) {
|
||||
if ($h -match "(?<algo>[sm][hda]*[125]):.*") {
|
||||
write-host -f darkred "$app uses a $($matches['algo']) hash and VirusTotal only supports SHA256"
|
||||
if ($h -match "(?<algo>[^:]+):(?<hash>.*)") {
|
||||
$hash = $matches["hash"]
|
||||
if ($matches["algo"] -match "(md5|sha1|sha256)") {
|
||||
Navigate-ToHash $hash
|
||||
}
|
||||
else {
|
||||
write-host -f darkred "$app uses $($matches['algo']) hash and VirusTotal only supports md5, sha1 or sha256"
|
||||
}
|
||||
}
|
||||
else {
|
||||
Navigate-ToHash $h
|
||||
|
||||
Reference in New Issue
Block a user