new: syn.scan will now perform basic tcp banner grabbing

This commit is contained in:
evilsocket 2019-04-21 15:45:32 +02:00
commit aea68460c8
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
5 changed files with 160 additions and 3 deletions

View file

@ -0,0 +1,18 @@
package syn_scan
import (
"bufio"
"fmt"
"net"
"strings"
)
func tcpGrabber(mod *SynScanner, ip string, port int) string {
if conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", ip, port)); err == nil {
defer conn.Close()
msg, _ := bufio.NewReader(conn).ReadString('\n')
return strings.Trim(msg, "\r\n\t ")
}
return ""
}