Documentation
¶
Index ¶
- Constants
- Variables
- func CheckVersion() (bool, error)
- func DisableConfigFile() error
- func DownloadVulnWordlist(url, path string, silent bool, vuln string) error
- func EnableConfigFile() error
- func IsDNSServer(server string) bool
- func OutputResults(results []Result, cfg Config)
- func ParseHeaders(headers []string) map[string]string
- func ParseIPRange(cidr string) ([]string, error)
- func ParseStatusRange(value string) ([]int, error)
- func PrintMainHelp()
- func PrintSubcommandGuide(subcommand string) bool
- func PrintSubcommandHelp(subcommand string) bool
- func ReadWordlist(path string, silent bool, mode string) ([]string, int, error)
- func ResetConfigFile() error
- func ResolveSubdomain(subdomain string, servers []string) (bool, error)
- func SetupProxyTransport(transport *http.Transport, proxy string) error
- func ShowConfigFile() error
- func ShowVersion() (string, error)
- func UpdateBinary() error
- func ValidateAPIPath(path string) error
- func ValidateDomain(cfg *Config) error
- func ValidateListFile(path, mode string) error
- func ValidateMethod(method string) error
- func ValidatePacket(path string) error
- func ValidateProxy(proxy string) error
- func ValidateScanMethod(method string) error
- func ValidateThreads(threads int) error
- func ValidateVulnInputs(packet, apiPath string) error
- func ValidateWordlist(path string, mode string) error
- type Config
- type ResolverConfig
- type Result
- type VersionInfo
- type YAMLConfig
Constants ¶
const ( XSSWordlistURL = "https://raw.githubusercontent.com/Nowafen/Raven/refs/heads/main/wl/xss.txt" XSSWordlistPath = "/tmp/.raven/wordlists/xss.txt" SSTIWordlistURL = "https://raw.githubusercontent.com/Nowafen/Raven/refs/heads/main/wl/ssti.txt" SSTIWordlistPath = "/tmp/.raven/wordlists/ssti.txt" SQLiWordlistURL = "https://raw.githubusercontent.com/Nowafen/Raven/refs/heads/main/wl/sqli.txt" SQLiWordlistPath = "/tmp/.raven/wordlists/sqli.txt" CmdInjectionWordlistURL = "https://raw.githubusercontent.com/Nowafen/Raven/refs/heads/main/wl/ci.txt" CmdInjectionWordlistPath = "/tmp/.raven/wordlists/ci.txt" CacheDeceptionWordlistURL = "https://raw.githubusercontent.com/Nowafen/Raven/refs/heads/main/wl/wcd.txt" CacheDeceptionWordlistPath = "/tmp/.raven/wordlists/wcd.txt" )
Vulnerability wordlist URLs and paths
const DefaultBackupPath = "/tmp/.raven/backup.txt"
const DefaultBackupURL = "https://raw.githubusercontent.com/Nowafen/Raven/refs/heads/main/backup.txt"
DefaultBackupURL is the URL to download the default backup paths wordlist
const DefaultFilterWordsPath = "/tmp/.raven/filter_words.json"
const DefaultFilterWordsURL = "https://raw.githubusercontent.com/Nowafen/Raven/refs/heads/main/Config/filter_words.json"
DefaultFilterWordsURL is the URL to download the default filter words JSON
const DefaultWordlistPath = "/tmp/.raven/wordlist.txt"
const DefaultWordlistURL = "https://raw.githubusercontent.com/Nowafen/Raven/refs/heads/main/wordlist.txt"
DefaultWordlistURL is the URL to download the default wordlist for subdomain discovery
const Version = "0.1.6"
Version is the current version of the Raven tool
const VersionURL = "https://raw.githubusercontent.com/Nowafen/Raven/refs/heads/main/Version.json"
VersionURL is the URL to check the latest version and binary URL
Variables ¶
var DefaultDNSServers = []string{
"8.8.8.8:53",
"8.8.4.4:53",
"1.1.1.1:53",
"1.0.0.1:53",
"9.9.9.9:53",
}
DefaultDNSServers defines a list of default public DNS servers
var HeaderSlice []string
Functions ¶
func CheckVersion ¶
CheckVersion checks if the current version is outdated
func DisableConfigFile ¶ added in v0.1.4
func DisableConfigFile() error
DisableConfigFile sets activation: false in the YAML config file
func DownloadVulnWordlist ¶ added in v0.1.6
DownloadVulnWordlist downloads a vulnerability-specific wordlist
func EnableConfigFile ¶ added in v0.1.4
func EnableConfigFile() error
EnableConfigFile sets activation: true in the YAML config file
func IsDNSServer ¶ added in v0.1.4
IsDNSServer checks if a server is a valid and responsive DNS server
func OutputResults ¶
OutputResults is a placeholder for compatibility (no longer used for printing)
func ParseHeaders ¶
ParseHeaders parses header flag values
func ParseIPRange ¶ added in v0.1.5
ParseIPRange extracts all IP addresses from a CIDR range
func ParseStatusRange ¶ added in v0.1.4
ParseStatusRange parses a status code or range
func PrintMainHelp ¶ added in v0.1.6
func PrintMainHelp()
PrintMainHelp displays the main help message for `raven` or `raven -h`
func PrintSubcommandGuide ¶ added in v0.1.6
PrintSubcommandGuide displays detailed guide for a specific subcommand
func PrintSubcommandHelp ¶ added in v0.1.6
PrintSubcommandHelp displays short help for a specific subcommand
func ReadWordlist ¶
ReadWordlist reads the wordlist from the given path or downloads the default based on mode
func ResetConfigFile ¶ added in v0.1.4
func ResetConfigFile() error
ResetConfigFile downloads the default config file from GitHub and saves it
func ResolveSubdomain ¶ added in v0.1.4
ResolveSubdomain checks if a subdomain resolves using the configured DNS servers
func SetupProxyTransport ¶ added in v0.1.4
SetupProxyTransport configures the HTTP transport with the given proxy
func ShowConfigFile ¶ added in v0.1.4
func ShowConfigFile() error
ShowConfigFile displays the content of the YAML config file without any comments
func ShowVersion ¶
ShowVersion returns the latest version and checks if the current version is outdated
func UpdateBinary ¶
func UpdateBinary() error
UpdateBinary updates the Raven binary to the latest version using curl
func ValidateAPIPath ¶ added in v0.1.6
ValidateAPIPath validates the API path
func ValidateDomain ¶
ValidateDomain validates the domain, IP, or CIDR range and extracts protocol
func ValidateListFile ¶ added in v0.1.5
ValidateListFile validates the list file
func ValidateMethod ¶
ValidateMethod validates the HTTP method
func ValidatePacket ¶ added in v0.1.6
ValidatePacket validates the packet file
func ValidateProxy ¶
ValidateProxy validates the proxy URL format and content
func ValidateScanMethod ¶ added in v0.1.6
ValidateScanMethod validates the scan-method flag
func ValidateThreads ¶
ValidateThreads validates the threads flag
func ValidateVulnInputs ¶ added in v0.1.6
ValidateVulnInputs ensures only one of packet or API path is provided
func ValidateWordlist ¶
ValidateWordlist validates the wordlist path for the given mode
Types ¶
type Config ¶
type Config struct {
Target string
Wordlist string
List string
Headers map[string]string
Method string
Output string
Silent bool
FilterCode []int
MatchCode []int
Proxy string
Threads int
Rate float64
Validate bool
DNS string
ResolverCfg ResolverConfig
UseDNS bool
ConfigFile YAMLConfig
ConfigAction string
Progress bool
Protocol string
IPRange []string
Vuln string
Packet string
API string
Debug bool
Version bool
Update bool
}
Config holds all configuration options
type ResolverConfig ¶ added in v0.1.4
type ResolverConfig struct {
Servers []string
}
ResolverConfig holds DNS resolver configuration
func ValidateResolver ¶ added in v0.1.4
func ValidateResolver(resolver string) (ResolverConfig, error)
ValidateResolver validates the resolver input (IP or file)
type VersionInfo ¶ added in v0.1.3
VersionInfo holds the version and binary URL from version.json
func GetVersionInfo ¶ added in v0.1.3
func GetVersionInfo() (VersionInfo, error)
GetVersionInfo fetches the version and binary URL from VersionURL
type YAMLConfig ¶ added in v0.1.4
type YAMLConfig struct {
Info struct {
Name string `yaml:"name"`
Author string `yaml:"author"`
Version string `yaml:"version"`
} `yaml:"info"`
Project struct {
GitHub string `yaml:"github"`
Default string `yaml:"default"`
} `yaml:"project"`
FlagConfig struct {
SyntaxTypes []string `yaml:"Syntax-1 types"`
Wordlist struct {
Path string `yaml:"path"`
ConfigUsing *bool `yaml:"Wordlist-config-using"`
} `yaml:"Wordlist"`
Resolvers struct {
Path string `yaml:"path"`
DNSServer string `yaml:"dns-server"`
ConfigUsing *bool `yaml:"Resolvers-config-using"`
} `yaml:"Resolvers"`
Proxy struct {
URL string `yaml:"url"`
Port string `yaml:"port"`
ConfigUsing *bool `yaml:"Proxy-config-using"`
} `yaml:"Proxy"`
Method struct {
GET string `yaml:"GET"`
POST string `yaml:"POST"`
HEAD string `yaml:"HEAD"`
TRACE string `yaml:"TRACE"`
ConfigUsing *bool `yaml:"Method-config-using"`
} `yaml:"Method"`
Header struct {
Items []struct {
Key string `yaml:"key"`
Value string `yaml:"value"`
} `yaml:"items"`
ConfigUsing *bool `yaml:"Header-config-using"`
} `yaml:"Header"`
} `yaml:"Flag config"`
Syntax struct {
SyntaxTypes []string `yaml:"Syntax-2 Types"`
MethodTypes []struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
} `yaml:"Method Types"`
Body struct {
Filters []string `yaml:"filters"`
Matchers []string `yaml:"matchers"`
} `yaml:"body"`
Header struct {
Filters []struct {
Key string `yaml:"key"`
Value string `yaml:"value"`
} `yaml:"filters"`
Matchers []struct {
Key string `yaml:"key"`
Value string `yaml:"value"`
} `yaml:"matchers"`
} `yaml:"header"`
Status struct {
Filters []string `yaml:"filters"`
Matchers []string `yaml:"matchers"`
All *string `yaml:"all"`
} `yaml:"status"`
ConfigUsing *bool `yaml:"Syntax-config-using"`
} `yaml:"Syntax"`
Active bool `yaml:"activation"`
}
YAMLConfig holds the parsed YAML configuration