-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PoC编写pocsuite3是否存在当全部扫描结束后回调的方法 #18
Comments
尝试最新版本,在按下CTRL+C之后会显示已经扫描完成的信息 |
有没有想在pocbase中增加回调结束的接口,在task_done时候通知注册过结束回调的poc |
这个是最终汇总处理的,跟我想的似乎不一样。在poc模块中可以自己及时决定写入一些中间值到数据库或者文件中进行记录,如果此时能有个结束关闭的回调就可能更好了。 |
尝试 https://github.com/knownsec/pocsuite3/tree/new-feature-%2318 看看有什么问题吗,Demo |
差不多是这功能了. 其实我之前想的本是 在POC文件中 执行类似register_poc的方法存入kb.registered_pocs来注册一个结束回调方法"end" ,同时像plugins.file_record.FileRecord.init一样的openfile, 然后handle就写在自己_verify方法中,这样节省了每一次的output传值封装 扫描结束的时候遍历pocmodule在end方法中像plugins.file_record.FileRecord.start一样再去关闭 |
封装到POC里我觉得不太”优雅“,作为插件可以通用于任何POC,你可以在自己的版本里做这些事情 |
比如在初始化的时候打开文件/数据库进行记录
然后在扫描过程按下CTRL+C或者所有扫描结束时能够在回调方法中关闭数据库连接
也能即时将已经处理过的信息输出显示,做好一些关闭资源收尾工作
The text was updated successfully, but these errors were encountered: