parse

package
v0.0.0-...-8ceafa1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const IMPACKET_TARGET_RE = "(?:(?:([^/@:]*)/)?([^@:]*)(?::([^@]*))?@)?(.*)"

Currently not implemented DOMAIN USER PASSWORD TARGET

View Source
const IMPACKET_USER_RE = "(?:(?:([^/:]*)/)?([^:]*)(?::(.*))?)?"

IMPACKET Regex for Creds DOMAIN USER PASSWORD

Variables

This section is empty.

Functions

func ParseCIDR

func ParseCIDR(cidrString string) ([]string, error)

Parse a CIDR notation and returns a slice of IP address with in that CIDR

func ParseParameterStringTarget

func ParseParameterStringTarget(target string) ([]string, error)

TODO make unit test for this. Similar to crackmapexecs target parameter. Will detect if the target is a file, IP string, FQDN string and returns a slice of targets.

func ParseTagetsFromFile

func ParseTagetsFromFile(filepath string) ([]string, error)

Parse targets divieded by new line from the specificed file and returns a slice of network targets (IP/FQDN).

func ParseTargetString

func ParseTargetString(target string) ([]string, error)

ParseTargetString will parse the target string and extract a slice of FQDN/IPs that can be used in a network attacks. Currently support CIDRv4, IP address, URL, FQDN.

Types

type ImpacketAuth

type ImpacketAuth struct {
	Username string
	Password string
	Domain   string
}

func ParseParameterCredentialImpacket

func ParseParameterCredentialImpacket(userstring string) (ImpacketAuth, error)

ParseParameterCredentialImpacket will parse the string to extract a domain,user,password in a fashion similar to impacket. Returns a ImpacketAuth struc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL