mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
malwarebazaar
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user