Fix misspelling and format using the -s option
This commit is contained in:
committed by
Brendan Le Glaunec
parent
71679691c4
commit
c1ea6b167c
@@ -177,7 +177,7 @@ func AttackCredentials(targets []Stream, credentials Credentials, timeout time.D
|
|||||||
}
|
}
|
||||||
|
|
||||||
attackResults := []Stream{}
|
attackResults := []Stream{}
|
||||||
for _ = range targets {
|
for range targets {
|
||||||
attackResults = append(attackResults, <-attacks)
|
attackResults = append(attackResults, <-attacks)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,7 +217,7 @@ func AttackRoute(targets []Stream, routes Routes, timeout time.Duration, log boo
|
|||||||
}
|
}
|
||||||
|
|
||||||
attackResults := []Stream{}
|
attackResults := []Stream{}
|
||||||
for _ = range targets {
|
for range targets {
|
||||||
attackResults = append(attackResults, <-attacks)
|
attackResults = append(attackResults, <-attacks)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+30
-30
@@ -120,14 +120,14 @@ func TestNmapParseResults(t *testing.T) {
|
|||||||
expectedStreams: []Stream{validStream1, validStream2},
|
expectedStreams: []Stream{validStream1, validStream2},
|
||||||
streamsXML: &nmapResult{
|
streamsXML: &nmapResult{
|
||||||
Hosts: []host{
|
Hosts: []host{
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: validStream1.Address,
|
Addr: validStream1.Address,
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: validStream1.Port,
|
PortID: validStream1.Port,
|
||||||
State: state{
|
State: state{
|
||||||
State: "open",
|
State: "open",
|
||||||
@@ -140,14 +140,14 @@ func TestNmapParseResults(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: validStream2.Address,
|
Addr: validStream2.Address,
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: validStream2.Port,
|
PortID: validStream2.Port,
|
||||||
State: state{
|
State: state{
|
||||||
State: "open",
|
State: "open",
|
||||||
@@ -171,14 +171,14 @@ func TestNmapParseResults(t *testing.T) {
|
|||||||
expectedStreams: []Stream{invalidStreamNoPort, invalidStreamNoAddress},
|
expectedStreams: []Stream{invalidStreamNoPort, invalidStreamNoAddress},
|
||||||
streamsXML: &nmapResult{
|
streamsXML: &nmapResult{
|
||||||
Hosts: []host{
|
Hosts: []host{
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: invalidStreamNoAddress.Address,
|
Addr: invalidStreamNoAddress.Address,
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: invalidStreamNoAddress.Port,
|
PortID: invalidStreamNoAddress.Port,
|
||||||
State: state{
|
State: state{
|
||||||
State: "open",
|
State: "open",
|
||||||
@@ -191,14 +191,14 @@ func TestNmapParseResults(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: invalidStreamNoPort.Address,
|
Addr: invalidStreamNoPort.Address,
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: invalidStreamNoPort.Port,
|
PortID: invalidStreamNoPort.Port,
|
||||||
State: state{
|
State: state{
|
||||||
State: "open",
|
State: "open",
|
||||||
@@ -225,14 +225,14 @@ func TestNmapParseResults(t *testing.T) {
|
|||||||
expectedStreams: []Stream{},
|
expectedStreams: []Stream{},
|
||||||
streamsXML: &nmapResult{
|
streamsXML: &nmapResult{
|
||||||
Hosts: []host{
|
Hosts: []host{
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: "Camera with closed ports",
|
Addr: "Camera with closed ports",
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: 0,
|
PortID: 0,
|
||||||
State: state{
|
State: state{
|
||||||
State: "closed",
|
State: "closed",
|
||||||
@@ -245,7 +245,7 @@ func TestNmapParseResults(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: "Camera with closed ports",
|
Addr: "Camera with closed ports",
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
@@ -365,14 +365,14 @@ func TestDiscover(t *testing.T) {
|
|||||||
expectedStreams: []Stream{validStream1, validStream2},
|
expectedStreams: []Stream{validStream1, validStream2},
|
||||||
streamsXML: &nmapResult{
|
streamsXML: &nmapResult{
|
||||||
Hosts: []host{
|
Hosts: []host{
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: validStream1.Address,
|
Addr: validStream1.Address,
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: validStream1.Port,
|
PortID: validStream1.Port,
|
||||||
State: state{
|
State: state{
|
||||||
State: "open",
|
State: "open",
|
||||||
@@ -385,14 +385,14 @@ func TestDiscover(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: validStream2.Address,
|
Addr: validStream2.Address,
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: validStream2.Port,
|
PortID: validStream2.Port,
|
||||||
State: state{
|
State: state{
|
||||||
State: "open",
|
State: "open",
|
||||||
@@ -419,14 +419,14 @@ func TestDiscover(t *testing.T) {
|
|||||||
expectedStreams: []Stream{},
|
expectedStreams: []Stream{},
|
||||||
streamsXML: &nmapResult{
|
streamsXML: &nmapResult{
|
||||||
Hosts: []host{
|
Hosts: []host{
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: validStream1.Address,
|
Addr: validStream1.Address,
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: validStream1.Port,
|
PortID: validStream1.Port,
|
||||||
State: state{
|
State: state{
|
||||||
State: "open",
|
State: "open",
|
||||||
@@ -439,14 +439,14 @@ func TestDiscover(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: validStream2.Address,
|
Addr: validStream2.Address,
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: validStream2.Port,
|
PortID: validStream2.Port,
|
||||||
State: state{
|
State: state{
|
||||||
State: "open",
|
State: "open",
|
||||||
@@ -476,14 +476,14 @@ func TestDiscover(t *testing.T) {
|
|||||||
expectedStreams: []Stream{validStream1, validStream2},
|
expectedStreams: []Stream{validStream1, validStream2},
|
||||||
streamsXML: &nmapResult{
|
streamsXML: &nmapResult{
|
||||||
Hosts: []host{
|
Hosts: []host{
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: validStream1.Address,
|
Addr: validStream1.Address,
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: validStream1.Port,
|
PortID: validStream1.Port,
|
||||||
State: state{
|
State: state{
|
||||||
State: "open",
|
State: "open",
|
||||||
@@ -496,14 +496,14 @@ func TestDiscover(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: validStream2.Address,
|
Addr: validStream2.Address,
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: validStream2.Port,
|
PortID: validStream2.Port,
|
||||||
State: state{
|
State: state{
|
||||||
State: "open",
|
State: "open",
|
||||||
@@ -532,14 +532,14 @@ func TestDiscover(t *testing.T) {
|
|||||||
expectedStreams: []Stream{invalidStreamNoPort, invalidStreamNoAddress},
|
expectedStreams: []Stream{invalidStreamNoPort, invalidStreamNoAddress},
|
||||||
streamsXML: &nmapResult{
|
streamsXML: &nmapResult{
|
||||||
Hosts: []host{
|
Hosts: []host{
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: invalidStreamNoAddress.Address,
|
Addr: invalidStreamNoAddress.Address,
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: invalidStreamNoAddress.Port,
|
PortID: invalidStreamNoAddress.Port,
|
||||||
State: state{
|
State: state{
|
||||||
State: "open",
|
State: "open",
|
||||||
@@ -552,14 +552,14 @@ func TestDiscover(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: invalidStreamNoPort.Address,
|
Addr: invalidStreamNoPort.Address,
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: invalidStreamNoPort.Port,
|
PortID: invalidStreamNoPort.Port,
|
||||||
State: state{
|
State: state{
|
||||||
State: "open",
|
State: "open",
|
||||||
@@ -596,14 +596,14 @@ func TestDiscover(t *testing.T) {
|
|||||||
expectedStreams: []Stream{},
|
expectedStreams: []Stream{},
|
||||||
streamsXML: &nmapResult{
|
streamsXML: &nmapResult{
|
||||||
Hosts: []host{
|
Hosts: []host{
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: "Camera with closed ports",
|
Addr: "Camera with closed ports",
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
},
|
},
|
||||||
Ports: ports{
|
Ports: ports{
|
||||||
Ports: []port{
|
Ports: []port{
|
||||||
port{
|
{
|
||||||
PortID: 0,
|
PortID: 0,
|
||||||
State: state{
|
State: state{
|
||||||
State: "closed",
|
State: "closed",
|
||||||
@@ -616,7 +616,7 @@ func TestDiscover(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
host{
|
{
|
||||||
Address: address{
|
Address: address{
|
||||||
Addr: "Camera with closed ports",
|
Addr: "Camera with closed ports",
|
||||||
AddrType: "ipv4",
|
AddrType: "ipv4",
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ func (gf *GorillaFactory) NewIncomingWebSocket(w http.ResponseWriter, req *http.
|
|||||||
return g, nil
|
return g, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewWebSocket attemps to connect to a ws server using Gorilla library
|
// NewWebSocket attempts to connect to a ws server using Gorilla library
|
||||||
func (gf *GorillaFactory) NewWebSocket(url string) (adaptor.WebSocket, error) {
|
func (gf *GorillaFactory) NewWebSocket(url string) (adaptor.WebSocket, error) {
|
||||||
fmt.Printf("opening new ws connection to %v\n", url)
|
fmt.Printf("opening new ws connection to %v\n", url)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user