chainreactors / gogo

面向红队的, 高度可控可拓展的自动化引擎
https://chainreactors.github.io/wiki/gogo/
GNU General Public License v3.0
1.38k stars 140 forks source link

使用 `-o url`,导出为url格式时,每行末尾有个多余空白符。 #77

Open jjf012 opened 2 months ago

jjf012 commented 2 months ago

保存的文件,用everedit打开可以看到末尾的空白符。 使用其他工具进行接力时,有可能读不出来url了。

M09Ic commented 2 months ago
func (result *GOGOResult) ValuesOutput(outType string) string {
    outs := strings.Split(outType, ",")
    for i, out := range outs {
        outs[i] = result.Get(out)
    }
    return strings.Join(outs, "\t") + "\n"
}
func (result *GOGOResult) GetBaseURL() string {
    return fmt.Sprintf("%s://%s:%s", result.Protocol, result.Ip, result.Port)
}

我检查了这两个函数, 似乎并没有看到输出空白字符的地方. 是否能提供测试用例?