Skip to content
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

使用sdk包创建的并发安全的引擎,因共享资源的释放无法正常执行完全部任务 #5202

Closed
ti4nly opened this issue May 20, 2024 · 3 comments · Fixed by #5148
Assignees
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Milestone

Comments

@ti4nly
Copy link

ti4nly commented May 20, 2024

本次使用的 v3.2.7版本
我在测试使用sdk包并发对多个目标进行扫描任务时发现一个问题,在第一个任务结束的时候在en.ExecuteNucleiWithOptsCtx函数中有一个defer tmpEngine.Close(),在其中的protocolstate.Close()会将一些共享资源释放,这样就会对其他正在执行且没有执行完成的任务收到影响,导致其他任务被中断。

image

原始逻辑,只扫描出一次漏洞,第二次并没有进行正常的发包扫描
image

将protocolstate.Close()注释掉,正常扫描出两次漏洞

image

@ti4nly ti4nly added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label May 20, 2024
@ti4nly ti4nly changed the title 使用sdk包创建的engine没有办法复用 使用sdk包创建并发多个任务时,共享资源的释放导致其他正在执行的任务中断 May 20, 2024
@ti4nly ti4nly changed the title 使用sdk包创建并发多个任务时,共享资源的释放导致其他正在执行的任务中断 使用sdk包创建的并发安全的引擎,因共享资源的释放无法正常执行完全部任务 May 20, 2024
@ti4nly
Copy link
Author

ti4nly commented May 20, 2024

要想要sdk足够好用就得避免全局共享变量的存在,应当检查整个项目中使用到的全局变量,将其绑定到特定的对象上

@ti4nly
Copy link
Author

ti4nly commented May 20, 2024

这里主要是涉及到protocolstate.Dialer 调用了Close()方法将其中的数据清除掉了,这个数据如果不清除的话对程序会造成什么危害呢,这个bug影响了正常的功能使用,希望能早日修复

@tarunKoyalwar tarunKoyalwar self-assigned this May 22, 2024
@Mzack9999
Copy link
Member

Potentially already fixed in #5187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants