malwarebazaar

This commit is contained in:
Jackson
2023-12-15 03:00:43 -05:00
parent b59896bb47
commit d41daa37f1
2 changed files with 27 additions and 24 deletions

View File

@@ -7,6 +7,7 @@ import sys
# usage is as follows:
# python3 malwarebazaar.py '{"artifactType":"x", "value":"y"}'
def buildReq(observ_type, observ_value):
# determine correct query type to send based off of observable type
unique_types = {'gimphash': 1, 'telfhash': 1, 'tlsh': 1}
@@ -27,11 +28,10 @@ def sendReq(meta, query):
def isInJson(data, target_string, maxdepth):
# searches a JSON object for an occurance of a string
# recursively.
# depth limiter (arbitrary value of 1000)
if maxdepth > 1000:
return False
if isinstance(data, dict):
for key, value in data.items():
if isinstance(value, (dict, list)):
@@ -154,4 +154,4 @@ def main():
if __name__ == '__main__':
main()
main()