fixed test

This commit is contained in:
snoop 2017-08-09 12:26:20 +09:00
parent e2c14584b6
commit b0364107df
2 changed files with 33 additions and 33 deletions

View File

@ -1,34 +1,34 @@
package netbios package netbios
//
//import ( import (
// "git.loafle.net/overflow/overflow_probe/collector/core/scan/service/matcher/packet" "git.loafle.net/overflow/overflow_probe/matcher/packet"
// "net" "net"
// "testing" "testing"
//) )
//
//func TestNBSS(t *testing.T) { func TestNBSS(t *testing.T) {
//
// m := NewNetBiosMatcher() m := NewNetBiosMatcher()
//
// conn, _ := net.Dial("tcp", "192.168.1.106:139") conn, _ := net.Dial("tcp", "192.168.1.106:139")
//
// defer conn.Close() defer conn.Close()
//
// for i := 0; i < m.PacketCount(); i++ { for i := 0; i < m.PacketCount(); i++ {
//
// pack := m.Packet(i) pack := m.Packet(i)
// conn.Write(pack.Buffer) conn.Write(pack.Buffer)
// bytes := make([]byte, 1024) bytes := make([]byte, 1024)
// n, _ := conn.Read(bytes) n, _ := conn.Read(bytes)
// p := packet.NewPacket(bytes, n) p := packet.NewPacket(bytes, n)
//
// if m.Match(i, p, nil) { if m.Match(i, p, nil) {
// t.Log("NBSS found") t.Log("NBSS found")
// return return
// } }
//
// t.Error("NBSS not found") t.Error("NBSS not found")
// } }
//
//} }

View File

@ -7,7 +7,7 @@ import (
) )
const ( const (
ADDR string = "192.168.1.106:139" ADDR string = "192.168.1.106:445"
) )
func TestSMBMatcher(t *testing.T) { func TestSMBMatcher(t *testing.T) {