swimlane / pyattck

A Python package to interact with the Mitre ATT&CK Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSONDecodeError: Expecting value: line 1 column 1

TiiTcHY opened this issue · comments

when running the module i get the following error JSONDecodeError: Expecting value: line 1 column 1 when getting data from app.eu.elastica.net when running 5.3.0

i am running the following:

from pyattck import Attck

attack = Attck()

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

@TiiTcHY I am unable to reproduce this issue - can you explain what you mean by

when getting data from app.eu.elastica.net

I'm not sure I'm following.

Hello, sorry I think that was an error on my part as that is is what comes up for the SSL Cert things. But for some reason I'm getting the Json Errors

Traceback (most recent call last):
File "script.py", line 22, in
for technique in attck.enterprise.techniques:
File "blah\AppData\Roaming\Python\Python39\site-packages\pyattck\attck.py", line 263, in enterprise
from .enterprise.enterprise import Enterprise
File "blah\AppData\Roaming\Python\Python39\site-packages\pyattck\enterprise_init_.py", line 1, in
from .enterprise import Enterprise
File "blah\AppData\Roaming\Python\Python39\site-packages\pyattck\enterprise\enterprise.py", line 1, in
from .technique import AttckTechnique
File "blah\AppData\Roaming\Python\Python39\site-packages\pyattck\enterprise\technique.py", line 1, in
from .attckobject import AttckObject
File "blah\AppData\Roaming\Python\Python39\site-packages\pyattck\enterprise\attckobject.py", line 4, in
class AttckObject(object):
File "blah\AppData\Roaming\Python\Python39\site-packages\pyattck\enterprise\attckobject.py", line 16, in AttckObject
generated_attck_json = Configuration.get_data('generated_attck_json')
File "blah\AppData\Roaming\Python\Python39\site-packages\pyattck\configuration.py", line 115, in get_data
return cls.__download_url_data(cls.config_data.get(value))
File "blah\AppData\Roaming\Python\Python39\site-packages\pyattck\configuration.py", line 18, in _download_url_data
return response.json()
File "blah\AppData\Roaming\Python\Python39\site-packages\requests\models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "blah\AppData\Roaming\Python\Python39\site-packages\simplejson_init
.py", line 525, in loads
return _default_decoder.decode(s)
File "blah\AppData\Roaming\Python\Python39\site-packages\simplejson\decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "blah\AppData\Roaming\Python\Python39\site-packages\simplejson\decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
File "blah\AppData\Roaming\Python\Python39\site-packages\simplejson\scanner.py", line 79, in scan_once
return _scan_once(string, idx)
File "blah\AppData\Roaming\Python\Python39\site-packages\simplejson\scanner.py", line 70, in _scan_once
raise JSONDecodeError(errmsg, string, idx)
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)