Skip to content

Commit

Permalink
mod: csv导出加入http指纹
Browse files Browse the repository at this point in the history
  • Loading branch information
XinRoom committed Nov 6, 2023
1 parent a4d828b commit 9a0b5f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/go-portScan.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func run(c *cli.Context) error {
}
defer csvFile.Close()
csvWrite = csv.NewWriter(csvFile)
csvWrite.Write([]string{"IP", "PORT", "SERVICE", "HTTP_TITLE", "HTTP_STATUS", "HTTP_SERVER", "HTTP_TLS"})
csvWrite.Write([]string{"IP", "PORT", "SERVICE", "HTTP_TITLE", "HTTP_STATUS", "HTTP_SERVER", "HTTP_TLS", "HTTP_FINGERS"})
}

go func() {
Expand All @@ -191,12 +191,13 @@ func run(c *cli.Context) error {
}
myLog.Println(ret.String())
if csvWrite != nil {
line := []string{ret.Ip.String(), strconv.Itoa(int(ret.Port)), ret.Service, "", "", "", ""}
line := []string{ret.Ip.String(), strconv.Itoa(int(ret.Port)), ret.Service, "", "", "", "", ""}
if ret.HttpInfo != nil {
line[3] = ret.HttpInfo.Title
line[4] = strconv.Itoa(ret.HttpInfo.StatusCode)
line[5] = ret.HttpInfo.Server
line[6] = ret.HttpInfo.TlsCN
line[7] = strings.Join(ret.HttpInfo.Fingers, ",")
}
csvWrite.Write(line)
csvWrite.Flush()
Expand Down

0 comments on commit 9a0b5f8

Please sign in to comment.