Skip to content

Commit

Permalink
raw/utils.go created
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalcaliskan committed Apr 7, 2021
1 parent 7a3c703 commit 87740c0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
11 changes: 0 additions & 11 deletions pkg/raw/raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"github.com/google/gopacket/layers"
"github.com/schollz/progressbar/v3"
"golang.org/x/net/ipv4"
"math/rand"
"net"
"time"
)
Expand Down Expand Up @@ -96,14 +95,4 @@ func StartFlooding(dstIpStr string, dstPort, payloadLength int) {
}
time.Sleep(800 * time.Millisecond)
}
}

func getRandomPort() int {
return 0
}

func getRandomPayload(length int) []byte {
payload := make([]byte, length)
rand.Read(payload)
return payload
}
13 changes: 13 additions & 0 deletions pkg/raw/utils.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package raw

import "math/rand"

func getRandomPort() int {
return 0
}

func getRandomPayload(length int) []byte {
payload := make([]byte, length)
rand.Read(payload)
return payload
}

0 comments on commit 87740c0

Please sign in to comment.