Merge remote-tracking branch 'origin/master'

This commit is contained in:
snoop 2017-08-09 18:02:46 +09:00
commit d99a76ad42
4 changed files with 46 additions and 15 deletions

30
glide.yaml Normal file
View File

@ -0,0 +1,30 @@
package: git.loafle.net/overflow/overflow_probe
import:
- package: github.com/cihub/seelog
- package: github.com/gin-gonic/gin
- package: github.com/golang/protobuf
subpackages:
- proto
- package: github.com/google/gopacket
subpackages:
- layers
- pcap
- package: golang.org/x/crypto
subpackages:
- scrypt
- package: golang.org/x/net
subpackages:
- context
- package: golang.org/x/oauth2
subpackages:
- facebook
- google
- package: google.golang.org/grpc
- package: gopkg.in/yaml.v2
testImport:
- package: github.com/google/uuid
- package: github.com/stretchr/testify
subpackages:
- assert

View File

@ -92,13 +92,13 @@ func (t *CassandraMatcher) Match(index int, packet *packet.Packet, info scaninfo
}
var itemcount uint16
if binary.Read(reader, binary.BigEndian, &itemcount) != nil {
return false
}
if itemcount != 0 && itemcount != 2 {
return false
}
//if binary.Read(reader, binary.BigEndian, &itemcount) != nil {
// return false
//}
//
//if itemcount != 0 && itemcount != 2 {
// return false
//}
return true

View File

@ -11,7 +11,7 @@ func TestCassandra(t *testing.T) {
m := NewCassandraMatcher()
conn, err := net.Dial("tcp", "192.168.1.16:19041")
conn, err := net.Dial("tcp", "192.168.1.16:19042")
if err != nil {
t.Error(err)
return

View File

@ -1,5 +1,6 @@
package dhcp
import (
"bytes"
"encoding/binary"
@ -76,13 +77,13 @@ func sendDHCPDiscovery() error {
var flag uint16 = 0
dhcp.BootpFlags = ^flag // flag = unicast , ^flag = broadcast
//TODO : getting mac addr from zone !!FIXME
dhcp.ClientMacAddr[0] = 0x50
dhcp.ClientMacAddr[1] = 0xe5
dhcp.ClientMacAddr[2] = 0x49
dhcp.ClientMacAddr[3] = 0x46
dhcp.ClientMacAddr[4] = 0x93
dhcp.ClientMacAddr[5] = 0x28
//TODO : getting mac addr from zone
//dhcp.ClientMacAddr[0] = 0x50
//dhcp.ClientMacAddr[1] = 0xe5
//dhcp.ClientMacAddr[2] = 0x49
//dhcp.ClientMacAddr[3] = 0x46
//dhcp.ClientMacAddr[4] = 0x93
//dhcp.ClientMacAddr[5] = 0x28
writer := new(bytes.Buffer)
binary.Write(writer, binary.BigEndian, dhcp)