Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概述
启动全局伪造的时候对已占用端口的检测不正确,当端口被释放时不能及时检测。
问题复现
先启动Sheas-Cealer,再占用80或443端口(如启动Nginx模拟端口占用的情况),然后点击启动全局伪造,此时端口占用不能被正确检测到。
同样,先占用80或443端口,然后再启动Sheas-Cealer,点击启动全局伪造,此时可以正确检测端口占用,但停止对80或443端口的占用后,再点击启动全局伪造,此时依然提示端口占用。
问题分析
观察有关源码发现,变量
NginxHttpPort
和NginxHttpsPort
依靠触发NginxConfWatcher_Changed
来更新,但是NginxConfWatcher_Changed
在上述问题中只在MainWin_Loaded
中触发。需要在合适的时机添加对NginxConfWatcher_Changed
的触发,例如NginxButtonHoldTimer_Tick
。修改建议
*开Nginx忘关再使用Sheas-Cealer的时候发现的。