swimlane / pyattck

A Python package to interact with the Mitre ATT&CK Framework
MIT License
468 stars 87 forks source link

Error when trying to iterate through techniques #144

Open TiiTcHY opened 1 year ago

TiiTcHY commented 1 year ago

Describe the bug when using the example for iterating through the techniques i get the a keyword argument "socks_support"

for technique in attack.enterprise.techniques: print(technique.id)

TypeError: attrs_init() got an unexpected keyword argument 'socks_support'

To Reproduce Steps to reproduce the behavior:

Create a python script with the following code: from pyattck import Attck attack = Attck() for technique in attack.enterprise.techniques: print(technique.id) Expected behavior i would expect a print out of the current MITRE Techniques

currently using pyattck 7.1.2

Error is below:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/requests/models.py", line 971, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/simplejson/init.py", line 514, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/simplejson/decoder.py", line 386, in decode obj, end = self.raw_decode(s) ^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/simplejson/decoder.py", line 416, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1833357 (char 1833356)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/.../Desktop/Python/MITRE/pyattckdata.py", line 4, in for technique in attack.enterprise.techniques: ^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyattck/attck.py", line 255, in enterprise from .enterprise import EnterpriseAttck File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyattck/enterprise.py", line 7, in class EnterpriseAttck(Base): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyattck/enterprise.py", line 45, in EnterpriseAttck __attck = MitreAttck(**Base.config.get_data("enterprise_attck_json")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyattck/configuration.py", line 145, in get_data return self._download_url_data(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyattck/configuration.py", line 69, in _download_url_data return response.json() ^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/requests/models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1833357 (char 1833356)

avnerduc commented 1 year ago

I get the same

pr3s0 commented 1 year ago

i get the same