Skip to content

Commit

Permalink
Fix:修复ObserverWard不能正确被调用的Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hanc00l committed Jul 23, 2022
1 parent 07d4f8d commit e7cebff
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Tested on [ubuntu18.04/20.04 LTS](docs/install_linux.md)、[macOS](docs/install_

## 版本更新

- 2.5.4:2022-7-23,修复ObserverWard不能正确被调用的Bug(2.5.3只需要替换worker_linux_amd64即可)。
- 2.5.3:2022-7-20,增加导入Naabu和Httpx扫描结果导入到平台,以方便在内网渗透时的信息收集和协同;支持IP任务时跳过端口扫描,读取资产已探测的全部端口进行指纹和信息收集;去除效果不太用好的Wappalyzer功能;修复ObserverWard设置工作目录以正确加载指纹库,升级到2022年7月最新版本。
- 2.5.2:2022-7-14,增加域名的Whois查询。注意:由2.5.1版本升级时,需在thirdparty中增加whois目录用于存放whois查询的缓存信息。
- 2.5.1:2022-6-12,更新beego框架至v2.0.3,sessionOn属性修改至app.conf中,更新chromedp至v0.8.2;增加version.txt,记录每次更新后的版本号并在web的“系统设置”-“配置管理”中显示当前的version;导入fscan扫描结果时将结果中的poc-yaml-*漏洞加入到vulnerability中。注意:由2.5.0版本升级时,需在conf/app.conf中增加对应的sessionOn属性。
Expand Down
19 changes: 15 additions & 4 deletions pkg/task/fingerprint/fingerprinthub.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,27 @@ func (f *FingerprintHub) RunObserverWard(url string) []FingerprintHubReult {
resultTempFile := utils.GetTempPathFileName()
defer os.Remove(resultTempFile)

observerWardBinPath := filepath.Join(conf.GetRootPath(), "thirdparty/fingerprinthub", "observer_ward_darwin")
observerWardBin := "observer_ward_darwin"
if runtime.GOOS == "linux" {
observerWardBinPath = filepath.Join(conf.GetRootPath(), "thirdparty/fingerprinthub", "observer_ward_amd64")
observerWardBin = "observer_ward_amd64"
}
//Fix:要指定绝对路径
observerWardBinPath, err := filepath.Abs(filepath.Join(conf.GetRootPath(), "thirdparty/fingerprinthub", observerWardBin))
if err != nil {
logging.RuntimeLog.Error(err.Error())
return nil
}
var cmdArgs []string
cmdArgs = append(cmdArgs, "-t", url, "-j", resultTempFile)
cmd := exec.Command(observerWardBinPath, cmdArgs...)
//Fix:指定当前路径,这样才会正确调用web_fingerprint_v3.json
cmd.Dir = filepath.Join(conf.GetRootPath(), "thirdparty/fingerprinthub")
_, err := cmd.CombinedOutput()
//Fix:必须指定绝对路径
cmd.Dir, err = filepath.Abs(filepath.Join(conf.GetRootPath(), "thirdparty/fingerprinthub"))
if err != nil {
logging.RuntimeLog.Error(err.Error())
return nil
}
_, err = cmd.CombinedOutput()
if err != nil {
logging.RuntimeLog.Error(err.Error())
return nil
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.3
2.5.4

0 comments on commit e7cebff

Please sign in to comment.