· 8 years ago · Jan 28, 2018, 06:26 AM
1python $ScriptDir/bin/panafapi.py -K fa7ac362-413c-465b-9192-cb1e8fbf6111 --samples -j -r "{\"query\":{\"operator\":\"all\",\"children\":[{\"field\":\"alias.ip_address\",\"operator\":\"contains\",\"value\":\"$ResultFile\"},{\"operator\":\"any\",\"children\":[{\"field\":\"sample.update_date\",\"operator\":\"is in the range\",\"value\":[\"${CheckDATE}T00:00:00\",\"${NOWDATE}T23:59:59\"]},{\"field\":\"sample.create_date\",\"operator\":\"is in the range\",\"value\":[\"${CheckDATE}T00:00:00\",\"${NOWDATE}T23:59:59\"]},{\"operator\":\"any\",\"children\":[{\"field\":\"sample.malware\",\"operator\":\"is\",\"value\":1},{\"field\":\"sample.malware\",\"operator\":\"is\",\"value\":4}]}]}]},\"scope\":\"global\",\"size\":1,\"from\":0,\"sort\":{\"create_date\":{\"order\":\"desc\"}}}" > $ResultDir/$ResultFile-$ToDay.json
2
3
4progToRun = 'python ' + ScriptDir + '/bin/panafapi.py -K ' + secretkey + ' --samples -j -r "{\\"query\\":{\\"operator\\":\\"all\\",\\"children\\":[{\\"field\\":\\"alias.ip_address\\",\\"operator\\":\\"contains\\",\\"value\\":\\"' + ResultFile + '\\"},{\\"operator\\":\\"any\\",\\"children\\":[{\\"field\\":\\"sample.update_date\\",\\"operator\\":\\"is in the range\\",\\"value\\":[\\"' + CheckDATE + 'T00:00:00\\",\\"' + NOWDATE + 'T23:59:59\\"]},{\\"field\\":\\"sample.create_date\\",\\"operator\\":\\"is in the range\\",\\"value\\":[\\"' + CheckDATE + 'T00:00:00\\",\\"' + NOWDATE + 'T23:59:59\\"]},{\\"operator\\":\\"any\\",\\"children\\":[{\\"field\\":\\"sample.malware\\",\\"operator\\":\\"is\\",\\"value\\":1},{\\"field\\":\\"sample.malware\\",\\"operator\\":\\"is\\",\\"value\\":4}]}]}]},\\"scope\\":\\"global\\",\\"size\\":1,\\"from\\":0,\\"sort\\":{\\"create_date\\":{\\"order\\":\\"desc\\"}}}" > ' + ResultDir + 'srciplist-' + ToDay + '.json'