Merge pull request #280 from dksslq/main

输出格式调整
This commit is contained in:
影舞者 2023-06-29 21:26:32 +08:00 committed by GitHub
commit 4cc65afe14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -18,7 +18,7 @@ func NetBIOS(info *common.HostInfo) error {
netbios, _ := NetBIOS1(info) netbios, _ := NetBIOS1(info)
output := netbios.String() output := netbios.String()
if len(output) > 0 { if len(output) > 0 {
result := fmt.Sprintf("[*] NetBios: %-15s %s ", info.Host, output) result := fmt.Sprintf("[*] NetBios: %-15s %s", info.Host, output)
common.LogSuccess(result) common.LogSuccess(result)
return nil return nil
} }
@ -237,7 +237,7 @@ func (info *NetBiosInfo) String() (output string) {
} }
if text == "" { if text == "" {
} else if info.DomainControllers != "" { } else if info.DomainControllers != "" {
output = fmt.Sprintf("[+]DC %-24s", text) output = fmt.Sprintf("[+] DC:%-24s", text)
} else { } else {
output = fmt.Sprintf("%-30s", text) output = fmt.Sprintf("%-30s", text)
} }

View File

@ -38,7 +38,7 @@ func InfoCheck(Url string, CheckData *[]CheckDatas) []string {
infoname = removeDuplicateElement(infoname) infoname = removeDuplicateElement(infoname)
if len(infoname) > 0 { if len(infoname) > 0 {
result := fmt.Sprintf("[+] InfoScan:%-25v %s ", Url, infoname) result := fmt.Sprintf("[+] InfoScan: %-25v %s ", Url, infoname)
common.LogSuccess(result) common.LogSuccess(result)
return infoname return infoname
} }

View File

@ -627,7 +627,7 @@ func DoRequest(req *http.Request, redirect bool) (*Response, error) {
defer oResp.Body.Close() defer oResp.Body.Close()
resp, err := ParseResponse(oResp) resp, err := ParseResponse(oResp)
if err != nil { if err != nil {
common.LogError("[-]ParseResponse error: " + err.Error()) common.LogError("[-] ParseResponse error: " + err.Error())
//return nil, err //return nil, err
} }
return resp, err return resp, err

View File

@ -57,8 +57,8 @@ func Flag(Info *HostInfo) {
flag.StringVar(&Passfile, "pwdf", "", "password file") flag.StringVar(&Passfile, "pwdf", "", "password file")
flag.StringVar(&PortFile, "portf", "", "Port File") flag.StringVar(&PortFile, "portf", "", "Port File")
flag.StringVar(&PocPath, "pocpath", "", "poc file path") flag.StringVar(&PocPath, "pocpath", "", "poc file path")
flag.StringVar(&RedisFile, "rf", "", "redis file to write sshkey file (as: -rf id_rsa.pub) ") flag.StringVar(&RedisFile, "rf", "", "redis file to write sshkey file (as: -rf id_rsa.pub)")
flag.StringVar(&RedisShell, "rs", "", "redis shell to write cron file (as: -rs 192.168.1.1:6666) ") flag.StringVar(&RedisShell, "rs", "", "redis shell to write cron file (as: -rs 192.168.1.1:6666)")
flag.BoolVar(&IsWebCan, "nopoc", false, "not to scan web vul") flag.BoolVar(&IsWebCan, "nopoc", false, "not to scan web vul")
flag.BoolVar(&IsBrute, "nobr", false, "not to Brute password") flag.BoolVar(&IsBrute, "nobr", false, "not to Brute password")
flag.IntVar(&BruteThread, "br", 1, "Brute threads") flag.IntVar(&BruteThread, "br", 1, "Brute threads")