Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to iterate through techniques #144

Open
TiiTcHY opened this issue Jun 30, 2023 · 2 comments
Open

Error when trying to iterate through techniques #144

TiiTcHY opened this issue Jun 30, 2023 · 2 comments

Comments

@TiiTcHY
Copy link

TiiTcHY commented Jun 30, 2023

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
Copy link

I get the same

@pr3s0
Copy link

pr3s0 commented Sep 8, 2023

i get the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants