有人可以提供一個如何循環通過python中的這個對象的例子,並拉出'價值'其中api = 'interesting'
和arguments.name = 'FileName'
?Python對象迭代
這是我到目前爲止所。
該對象有更多的進程和調用....輸出已被省略。
編輯:我要指出,我正在運行此代碼時出現以下錯誤: 「類型錯誤:列表索引必須是整數,而不是STR」
for k, v in object['behavior']['processes']['calls'].items():
if v['api'] == "interesting":
<loop through arguments next>
對象:
{"behavior": {
"processes": [
{
"parent_id": "312",
"process_name": "test.exe",
"process_id": "1184",
"first_seen": "2013-03-02 17:22:48,359",
"calls": [
{
"category": "filesystem",
"status": "FAILURE",
"return": "0xc000003a",
"timestamp": "2013-03-02 17:22:48,519",
"thread_id": "364",
"repeated": 0,
"api": "interesting",
"arguments": [
{
"name": "FileHandle",
"value": "0x00000000"
},
{
"name": "DesiredAccess",
"value": "0x80100080"
},
{
"name": "FileName",
"value": "c:\\cgvi5r6i\\vgdgfd.72g"
}, ...
繼續開展工作是怎麼回事? – lxop 2013-03-11 03:00:52