Skip to content

Commit

Permalink
(#103) Add --mining , mining-word options
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Aug 30, 2020
1 parent 9443a18 commit 090caf0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ var cfgFile string
var optionsStr = make(map[string]string)
var optionsBool = make(map[string]bool)
var config, cookie, data, header, p, customPayload, userAgent, blind, output, format, foundAction, proxy, grep string
var ignoreReturn string
var ignoreReturn, miningWord string
var timeout, concurrence, delay int
var onlyDiscovery, silence, followRedirect bool
var onlyDiscovery, silence, followRedirect, mining bool
var options model.Options

// rootCmd represents the base command when called without any subcommands
Expand Down Expand Up @@ -58,6 +58,7 @@ func init() {
rootCmd.PersistentFlags().StringVar(&proxy, "proxy", "", "Send all request to proxy server (e.g --proxy http://127.0.0.1:8080)")
rootCmd.PersistentFlags().StringVar(&grep, "grep", "", "Using custom grepping file (e.g --grep ./samples/sample_grep.json)")
rootCmd.PersistentFlags().StringVar(&ignoreReturn, "ignore-return", "", "Ignore scanning from return code (e.g --ignore-return 302,403,404)")
rootCmd.PersistentFlags().StringVar(&miningWord, "mining-word", "", "custom wordlist file for param mining (e.g --mining-word word.txt")

//Int
rootCmd.PersistentFlags().IntVar(&timeout, "timeout", 10, "Second of timeout")
Expand All @@ -67,6 +68,7 @@ func init() {
//Bool
rootCmd.PersistentFlags().BoolVar(&onlyDiscovery, "only-discovery", false, "Only testing parameter analysis")
rootCmd.PersistentFlags().BoolVar(&silence, "silence", false, "Not printing all logs")
rootCmd.PersistentFlags().BoolVar(&mining, "mining", true, "Using parameter mining, Gf-Patterns > XSS words")
rootCmd.PersistentFlags().BoolVar(&followRedirect, "follow-redirects", false, "Following redirection")

printing.Banner()
Expand Down Expand Up @@ -95,6 +97,8 @@ func initConfig() {
Silence: silence,
FollowRedirect: followRedirect,
Scan: make(map[string]model.Scan),
Mining: mining,
MiningWordlist: miningWord,
}

if grep != "" {
Expand Down

0 comments on commit 090caf0

Please sign in to comment.