mirror of
https://github.com/cowrie/cowrie.git
synced 2025-07-01 18:07:27 -04:00
update cuckoo module to fix duplicated check (#626)
This commit is contained in:
committed by
Michel Oosterhof
parent
c47613dcd9
commit
fa8821cfe3
@ -99,7 +99,6 @@ class Output(cowrie.core.output.Output):
|
||||
"""
|
||||
Check if file already was analyzed by cuckoo
|
||||
"""
|
||||
res = ""
|
||||
try:
|
||||
print("Looking for tasks for: {}".format(sha256))
|
||||
res = requests.get(urljoin(self.url_base, "/files/view/sha256/{}".format(sha256)),
|
||||
@ -107,11 +106,17 @@ class Output(cowrie.core.output.Output):
|
||||
auth=HTTPBasicAuth(self.api_user,self.api_passwd),
|
||||
timeout=60)
|
||||
if res and res.ok:
|
||||
print("Sample found in Sandbox, with ID: {}".format(res.json().get("sample", {}).get("id", 0)))
|
||||
if res.statuc_code == 200:
|
||||
print("Sample found in Sandbox, with ID: {}".format(res.json().get("sample", {}).get("id", 0)))
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
return res
|
||||
return False
|
||||
|
||||
def postfile(self, artifact, fileName):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user