commons_go/matcher/telnet/telnet_test.go

34 lines
696 B
Go
Raw Permalink Normal View History

2017-04-10 11:14:12 +00:00
package telnet
//import (
// "fmt"
// "loafle.com/overflow/collector/core/scan/service/matcher/packet"
// "loafle.com/overflow/collector/discovery/types"
// "net"
// "testing"
//)
//
//func TestTelnetMatcher_Match(t *testing.T) {
//
// port := types.NewPort("23", types.NewHost("192.168.1.210"), types.TYPE_TCP)
// telnet := NewTelnetMatcher()
//
// var ipport string
// ipport = port.Host.Ip + ":" + string(port.Port)
//
// client, _ := net.Dial("tcp", ipport)
//
// defer client.Close()
//
// bytes := make([]byte, 512)
//
// l, _ := client.Read(bytes)
//
// fmt.Println("length :", l)
// fmt.Println(bytes)
//
// b := telnet.Match(0, packet.NewPacket(bytes, l), nil)
//
// fmt.Println(b)
//}