-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package syn | ||
|
||
import ( | ||
"errors" | ||
"github.com/XinRoom/go-portScan/core/port" | ||
) | ||
|
||
var ErrorNoSyn = errors.New("no syn support") | ||
|
||
var DefaultSynOption = port.Option{ | ||
Rate: 2000, | ||
Timeout: 800, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//go:build nosyn | ||
|
||
package syn | ||
|
||
import ( | ||
"github.com/XinRoom/go-portScan/core/port" | ||
"net" | ||
) | ||
|
||
type synScanner struct { | ||
} | ||
|
||
// NewSynScanner firstIp: Used to select routes; retChan: Result return channel | ||
func NewSynScanner(firstIp net.IP, retChan chan port.OpenIpPort, option port.Option) (ss *synScanner, err error) { | ||
return nil, ErrorNoSyn | ||
} | ||
|
||
func (ss *synScanner) Scan(dstIp net.IP, dst uint16) error { | ||
return nil | ||
} | ||
func (ss *synScanner) WaitLimiter() error { | ||
return nil | ||
} | ||
func (ss *synScanner) Wait() {} | ||
func (ss *synScanner) Close() {} | ||
|
||
func GetAllDevs() (string, error) { | ||
return "", ErrorNoSyn | ||
} |