experimental: add smart(fast, minimum ports, silently) TCP port scanner (#1060)

* add struct ListenPorts

* change parse to models.ListenPorts from string

* change support models.ListenPorts in TUI

* add scanPort template , detectScanDest

* add Test_detectScanDest

* change impl scanPorts template

* fix build error

* change collect scan success address

* add Test_matchListenPorts

* add Test_updatePortStatus

* change display port scan result on tui

* change display scan emoji on report

* Revert "change display scan emoji on report"

This reverts commit e281882cc6.

* add continue

* change display format

* change no use loop label

* remove comment code

* change display

* fix padding

* change refactoring var , fn name

* fix var name

* fix var name

* change eye icon

* change icon

* delete unuse mod
This commit is contained in:
Norihiro NAKAOKA
2020-10-19 17:47:20 +09:00
committed by GitHub
parent a124518d78
commit 83bcca6e66
8 changed files with 427 additions and 10 deletions

View File

@@ -1294,14 +1294,14 @@ func (o *debian) dpkgPs() error {
pidLoadedFiles[pid] = append(pidLoadedFiles[pid], ss...)
}
pidListenPorts := map[string][]string{}
pidListenPorts := map[string][]models.ListenPort{}
stdout, err = o.lsOfListen()
if err != nil {
return xerrors.Errorf("Failed to ls of: %w", err)
}
portPid := o.parseLsOf(stdout)
for port, pid := range portPid {
pidListenPorts[pid] = append(pidListenPorts[pid], port)
pidListenPorts[pid] = append(pidListenPorts[pid], o.parseListenPorts(port))
}
for pid, loadedFiles := range pidLoadedFiles {