crowdstrike falcon API脚本

2024-06-14 22:24:17 发布

您现在位置:Python中文网/ 问答频道 /正文

新crowdstrike api学习

我试图使用python脚本crowdstrike模块检查所有恶意域和ip详细信息,SHA256

我有一个域和IP地址列表SHA256,那么如何使用scriptI测试crowdstrike API的恶意状态呢?我使用了这个crowdstrike模块,但没有得到json响应,它只显示一个空列表,没有

代码

from CrowdClient.crowdclient import CrowdClient
client_id='id'
client_secret='secret' 
falcon_client = CrowdClient(client_id, client_secret,'https://api.us-2.crowdstrike.com')
falcon_client.authenticate()
host_count = falcon_client.indicator_upload(['26147561abf4614ee049f859cad9228b5346e32f81e3ed04616abc308a353124'],'sha256')
print(host_count)
host_count1 = falcon_client.indicator_info('26147561abf4614ee049f859cad9228b5346e32f81e3ed04616abc308a353124','sha256')
print(host_count1)

结果:

None
[]

Tags: 模块clientapiidhost列表secretcount