JSONDecodeError with pyattck version 4.0.0 and 4.0.1
See original GitHub issueHi,
Started getting JSONDecodeError in version 4.0.0 and 4.0.1:
>>>from pyattck import Attck
>>>attack = Attck()
>>>attack.enterprise.techniques
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../venv/lib/python3.9/site-packages/pyattck/attck.py", line 266, in enterprise
from .enterprise.enterprise import Enterprise
File ".../venv/lib/python3.9/site-packages/pyattck/enterprise/__init__.py", line 1, in <module>
from .enterprise import Enterprise
File ".../venv/lib/python3.9/site-packages/pyattck/enterprise/enterprise.py", line 1, in <module>
from .technique import AttckTechnique
File ".../venv/lib/python3.9/site-packages/pyattck/enterprise/technique.py", line 1, in <module>
from .attckobject import AttckObject
File ".../venv/lib/python3.9/site-packages/pyattck/enterprise/attckobject.py", line 4, in <module>
class AttckObject(object):
File ".../venv/lib/python3.9/site-packages/pyattck/enterprise/attckobject.py", line 17, in AttckObject
nist_controls_json = Configuration.get_data(Configuration.config_data.get('nist_controls_json'))['objects']
File ".../venv/lib/python3.9/site-packages/pyattck/configuration.py", line 108, in get_data
data = cls.__download_url_data(value)
File ".../venv/lib/python3.9/site-packages/pyattck/configuration.py", line 16, in __download_url_data
return request('GET', url, **cls.requests_kwargs).json()
File ".../venv/lib/python3.9/site-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 4 (char 3)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
swimlane/pyattck: A Python package to interact with ... - GitHub
A Python package to interact with MITRE ATT&CK Frameworks. Current Version is 7.0.0. pyattck is a light-weight framework for MITRE ATT&CK Frameworks.
Read more >json.decoder.jsondecodeerror: extra data: line 1 column 4 (char 3 ...
Started getting JSONDecodeError in version 4.0.0 and 4.0.1 : >>>from pyattck import Attck >>>attack = Attck() >>>attack.enterprise.techniques Traceback ...
Read more >Why am I getting a JSONDecodeError when trying to load a ...
I'm trying to load a JSON file in to Python, but it's giving me an JSONDecodeError error which seems to suggest the file...
Read more >pyattck Documentation
Current Version is 5.0.0 pyattck is a light-weight framework for MITRE ATT&CK Frameworks. This package extracts details from the.
Read more >Top 5 pyattck Code Examples - Snyk
def techniques(self): '''Returns all technique objects as a list that this tool has been identified or used''' from .technique import AttckTechnique ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@lime2992 @amirjalali65 I just pushed an update to the 4_1_0 branch and it’s running through CI now. If all goes well it will be published soon.
I just looked at the reference NIST control JSON is gone https://raw.githubusercontent.com/center-for-threat-informed-defense/attack-control-framework-mappings/master/frameworks/nist800-53-r4/stix/nist800-53-r4-controls.json
I’ll try and see why later this evening - currently AFK