git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Pfeiffer <harald.pfeiffer _ xmart.de> 2018-09-03 13:14:58 +0200
committerHarald Pfeiffer <harald.pfeiffer _ xmart.de> 2018-09-03 13:14:58 +0200
commit96633f34998c4e702ddeb19fb38c5ff7a47db05d (patch)
tree1c25392e77e20a9256ea51ad6e293c026ec5373f
parentcbfef86795c3161bef7082619cfed74ec9d1f86d (diff)
downloadlinux-scripts-96633f34998c4e702ddeb19fb38c5ff7a47db05d.tar.bz2
Added to -s: verbose output if response_code=0, result if 1
-rwxr-xr-xbin/py/virustotal_cssearch7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/py/virustotal_cssearch b/bin/py/virustotal_cssearch
index ffe2cc0..599333d 100755
--- a/bin/py/virustotal_cssearch
+++ b/bin/py/virustotal_cssearch
@@ -52,8 +52,11 @@ def apiget(myvtquery, myshort):
if myshort == "":
print(json.dumps(myresult, indent=4))
else:
- print("Positives: " + str(myresult["positives"]) + "/" + str(myresult["total"]))
- print("Permalink: " + str(myresult["permalink"]))
+ if str(myresult["response_code"]) == 1:
+ print("Positives: " + str(myresult["positives"]) + "/" + str(myresult["total"]))
+ print("Permalink: " + str(myresult["permalink"]))
+ else:
+ print(str(myresult["verbose_msg"]))
def main(myargv):
"""