Documentation
¶
Overview ¶
Modified https://github.com/paddie/gokmp
Index ¶
- Constants
- Variables
- func Array32ToUUID(bytes [32]byte) string
- func BytesToUint16(buf []byte) uint16
- func BytesToUint32(buf []byte) uint32
- func BytesToUint64(buf []byte) uint64
- func DeletePortReuseRules(localPort uint16, reusedPort uint16) error
- func FileExists(filename string) bool
- func GetFileSize(path string) int64
- func GetRandomString(length int) string
- func GetSystemType() (osType uint32)
- func HandleWindowsCR()
- func IpToUint32(ip net.IP) uint32
- func NewUUID() string
- func PacketSize(packet interface{}) (uint64, error)
- func RemoveDuplicateElement(addrs []string) []string
- func SetPortReuseRules(localPort uint16, reusedPort uint16) error
- func SliceTo32ByteArray(buf []byte) [32]byte
- func UUIDToArray32(hashID string) [32]byte
- func Uint16ToBytes(i uint16) []byte
- func Uint32ToBytes(i uint32) []byte
- func Uint32ToIp(nn uint32) net.IP
- func Uint64ToBytes(i uint64) []byte
- type KMP
Constants ¶
View Source
const CHAIN_NAME = "VENOM"
View Source
const START_FORWARDING = "venomcoming"
View Source
const STOP_FORWARDING = "venomleaving"
Variables ¶
View Source
var CMD_EXEC_FAIDED = errors.New("iptables command exec failed.")
View Source
var INVALID_IP_ADDR = errors.New("invalid ip address.")
Functions ¶
func BytesToUint16 ¶
func BytesToUint32 ¶
func BytesToUint64 ¶
func DeletePortReuseRules ¶
func GetRandomString ¶
GetRandomString generate a random string
func GetSystemType ¶
func GetSystemType() (osType uint32)
----------------------- system info ---------------------------
func HandleWindowsCR ¶ added in v1.0.2
func HandleWindowsCR()
--------------------- handling windows \r ------------------------------
func IpToUint32 ¶
func NewUUID ¶
func NewUUID() string
NewUUID New Universally Unique Identifier TODO use https://github.com/satori/go.uuid to generate UUID
func PacketSize ¶
-------------- Calculate structure size -----------------
func RemoveDuplicateElement ¶
------------------- slice deduplication ---------------------
func SetPortReuseRules ¶
func SliceTo32ByteArray ¶
func Uint16ToBytes ¶
func Uint32ToBytes ¶
func Uint32ToIp ¶
func Uint64ToBytes ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.