From add06ef9a492e8e6c77041aeaab34278d655018f Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Sat, 12 Oct 2019 08:16:41 -0600 Subject: [PATCH] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9454e8e2..014a8f3e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -48,10 +48,22 @@ steps: hashingAlgorithm: 'SHA256' description: 'Wabbajack Modlist Installer' -- task: CmdLine@2 +- task: PythonScript@0 inputs: + scriptSource: 'inline' script: | - curl --request POST --url 'https://www.virustotal.com/vtapi/v2/file/scan' --form 'apikey=$(VirusTotalAPIKey)' --form 'file=@"$(System.DefaultWorkingDirectory)\Wabbajack\bin\x64\Debug\Wabbajack.exe"' + import requests, sys + + url = 'https://www.virustotal.com/vtapi/v2/file/scan' + + params = {'apikey': sys.argv[1]} + + files = {'file': ('Wabbajack.exe', open(sys.argv[2], 'rb'))} + + response = requests.post(url, files=files, params=params) + + print(response.json()) + arguments: '$(VirusTotalAPIKey) $(System.DefaultWorkingDirectory)/Wabbajack/bin/x64/Debug/Wabbajack.exe' - task: PublishBuildArtifacts@1 inputs: