Python ThreatKB API¶
Python library and command-line tool for InQuest ThreatKB.
Contributing¶
PRs and Issues are always welcome. The library is released under a “BSD-New” (aka “BSD 3-Clause”) license.
Module Documentation¶
Client class.
Usage:
import threatkb
api = threatkb.ThreatKB('http://127.0.0.1:9000', 'user@email.tld', 'password')
api.create('c2dns', {'domain_name': 'example.com', ... })
dns = api.get('c2dns')
-
class
threatkb.ThreatKB(host, token, secret_key, filter_on_keys=[], base_uri='ThreatKB/', use_https=True, log=<logging.RootLogger object>)¶ -
create(endpoint, json_data={}, files={})¶
-
delete(endpoint, id_)¶ True if ‘200 OK’ else False
-
filter_output(output)¶
-
get(endpoint, id_=None, params={})¶ If index is None, list all; else get one
-
update(endpoint, id_, json_data)¶
-
-
threatkb.attach(params)¶
-
threatkb.comment(params)¶
-
threatkb.configure()¶
-
threatkb.help(params, extra_text='', exit=True)¶
-
threatkb.initialize()¶
-
threatkb.main()¶
-
threatkb.release(params)¶
-
threatkb.search(params)¶