From 97a1ff48a0cc3d37221dd9be4960b6574246c35f Mon Sep 17 00:00:00 2001 From: jcz Date: Tue, 26 Mar 2019 16:07:39 +0100 Subject: [PATCH] Use VirusTotal with python3 --- analyzers/VirusTotal/virustotal.py | 2 +- analyzers/VirusTotal/virustotal_api.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/analyzers/VirusTotal/virustotal.py b/analyzers/VirusTotal/virustotal.py index 413bc1a52..087e53a6b 100755 --- a/analyzers/VirusTotal/virustotal.py +++ b/analyzers/VirusTotal/virustotal.py @@ -46,7 +46,7 @@ def check_response(self, response): self.error('Bad status : ' + str(status)) results = response.get('results', {}) if 'verbose_msg' in results: - print >> sys.stderr, str(results.get('verbose_msg')) + print (str(results.get('verbose_msg')), sys.stderr) if 'Missing IP address' in results.get('verbose_msg', ''): results['verbose_msg'] = 'IP address not available in VirusTotal' return results diff --git a/analyzers/VirusTotal/virustotal_api.py b/analyzers/VirusTotal/virustotal_api.py index f457c2d3c..c69c60f11 100644 --- a/analyzers/VirusTotal/virustotal_api.py +++ b/analyzers/VirusTotal/virustotal_api.py @@ -22,10 +22,11 @@ """ import os -import StringIO try: import requests + import StringIO except ImportError: + from io import StringIO pass