Dr.Web VxCube API客户端

vxcube-api的Python项目详细描述


Build StatusCoverage StatusPyPI - Python Version

vxcube api包

vxcube api是一个用于与web博士vxcube交互的api客户端。

安装

Python2.7或更高版本需要提前安装。 从python包索引(pypi)安装vxcube api:

$ pip install -U vxcube-api

或来源:

$ python setup.py install

使用命令行

Dr.WebVxCubeAPI客户端支持命令行。要获取有关可用命令的信息,请使用--help

$ vxcube_client --help

“命令列表:

CommandDescription
loginGet an API key which must be specified in all other commands
configSave or delete ^{}, ^{}, or ^{} parameter values
uploadUpload sample to Dr.Web vxCube server
analyseAnalyse uploaded file
deleteDelete analysis results
download sampleDownload sample
download archiveDownload archive with analysis results
subscribe_analysisGet real-time data about analysis progress

示例:

$ vxcube_client config  --api-key aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
$ vxcube_client upload /path/to/sample
Sample uploaded successful:
    sample_path [id: 2342]
        - format: exe
        - platforms: ['winxpx86', 'win7x86', 'win7x64', 'win10x64']
$ vxcube_client analyse 2342 -p win7x86 -p win10x64 --time 30
$ vxcube_client subscribe_analysis 1516
... 
[win7x86 ][50%] Waiting for the 3580(0xdfc) process to be dumped...
[win10x64][20%] File is running (19 of 30 sec remaining)...
...
All tasks finished:
Task[48151]-win7x86 [successful] maliciousness: 0
Task[62342]-win10x64 [successful] maliciousness: 25

vxcubeapi类

您可以编写自己的脚本,用vxcubeapi类处理文件。

fromvxcube_apiimportVxCubeApiAPI_KEY="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"defmain():# Сreate VxCubeApivxcube=VxCubeApi(api_key=API_KEY)# Upload samplesample=vxcube.upload_sample("sample_path")msg="Sample uploaded successfully: {sample.id}, {sample.format_name}, {sample.platforms}"print(msg.format(sample=sample))# Start analysisanalysis=vxcube.start_analysis(sample_id=sample.id,platforms=sample.platforms[0:2],analysis_time=30)formsg_objinanalysis.subscribe_progress():print(msg_obj)# Print resultsprint("Analysis finished")msg="Task[{task.id}] is {task.status}. Maliciousness: {task.maliciousness}"fortaskinanalysis.tasks:print(msg.format(task=task))if__name__=='__main__':main()

更多示例

还有更多的用法示例here

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java RxJava很适合分支工作流吗?   java如何映射SAP FileOpenDialog?   java部署的应用程序无法将oauth2代码交换为令牌   java如何将JTable数据读入具有特殊字符(如中文)的ArrayList?   Eclipse下Java中的不可访问代码错误与死代码警告?   JavaEclipse生成的方法参数final   Android NDK错误:java。lang.UnsatifiedLinkError:未找到void的实现   使用regex[Java]按域分组电子邮件登录数据   java错误:无法解析:安卓。支持:支持。v7:29.0.2   从单链表Java中删除特定元素   java如何将多个枚举数据写入单个pojo并将其作为列表返回   JAVAsql。SQLException:数据库连接已关闭   在Java中使用什么策略来实现分层可重入读/写锁定?   java如何用Selenium测试图形   java如何正确地将Node、Edge和Dijkstra类链接到Main方法   500 != 请解释一下