Skip to content

Commit

Permalink
[*]修改PortInfomation结构体,新增errorMsg字段~
Browse files Browse the repository at this point in the history
  • Loading branch information
lcvvvv committed Apr 17, 2021
1 parent b6beb71 commit 3253466
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gonmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (n *Nmap) getPortInfo(p *probe, target *target, tls bool) *PortInfomation {
data, err := p.scan(target, tls)
//fmt.Println(data,err)
if err != nil {
portinfo.errorMsg = err
portinfo.ErrorMsg = err
if strings.Contains(err.Error(), "STEP1") {
return portinfo.CLOSED()
}
Expand Down
4 changes: 2 additions & 2 deletions type-portinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ type PortInfomation struct {
response *response
finger *Finger
status string
errorMsg error
ErrorMsg error
}

func newPortInfo() *PortInfomation {
return &PortInfomation{
response: newResponse(),
finger: newFinger(),
status: "UNKNOWN",
errorMsg: nil,
ErrorMsg: nil,
}
}

Expand Down

0 comments on commit 3253466

Please sign in to comment.