[
{
"asset_id": 49,
"status": "success",
"name": "de1",
"app": "CCid",
"action_results": [
{
"status": "success",
"data": [
{
"report": {
"status": {
"origin": "sa",
"status": "Up.",
"sha1": "4a",
"sample_started_at": 159,
"running_on": "mt",
"ran": true,
"auto": true,
"vm": "w"
},
"artifacts": {
"1": {
"size": 599518,
"mime-type": "applic=binary",
"antivirus": {
"reversing_labs": {
"status": "UNKNOWN",
"scanner_count": 0,
"scanner_match": 0,
"threat_name": "",
"query_hash": {
"sha256": "029"
},
"last_seen": "0001-01-01T00:00:00Z"
}
},
"entropy": 7.9870740440306
},
"10": {
"size": 599518,
"mime-type": "applic=binary",
"antivirus": {
"reversing_labs": {
"status": "UNKNOWN",
"scanner_count": 0,
"scanner_match": 0,
"threat_name": "",
"query_hash": {
"sha256": "d38"
},
"last_seen": "0001-01-01T00:00:00Z"
}
},
"entropy": 1
}
}
}
}
],
"app_id": 15
}
]
}
]
Я пытаюсь получить доступ к значениям счетчика сканеров и совпадений сканеров, используя python, но не получаю требуемый результат.
action_results = results[0].get('action_results', [])
action_status = action_results[0].get('status', 'failed')
results_data = action_results[0].get('data', [])
sandbox_report = results_data[0].get('report', {})
for key,value in sandbox_report.items():
if key == "artifacts":
artifacts = list()
for each_key, each_value in value.items():
for i in each_value:
if i == "antivirus":
artifact_item = dict()
reversing_labs = i.get('reversing_labs', {})
artifact_item['scanner_count'] = reversing_labs.get('scanner_count', 0)
Может ли кто-нибудь указать, что не так?