Skip to content
/ gf-all Public

Run all patterns instantly and generate files.

Notifications You must be signed in to change notification settings

3xyz/gf-all

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

gf-all

Run all patterns instantly and generate files.

Required tools:

  • gau (Gathering data about website from iot)
  • gf (Its like grep but with patterns ideas)
  • gf-patterns (Patterns for gf)

Usage:

bash gf_all.sh gau_output.txt

Screenshot:

gf_all.sh
#!/usr/bin/env bash

gf_patterns="""
debug_logic
img-traversal
interestingEXT
interestingparams
interestingsubs
lfi
rce
redirect
sqli
ssrf
ssti
xss
xss2
"""

# Expected file which contain gau output or same
main() {
  check $@
  create $1
}

check() {
  if (( $# != 1 )); then
    error "required file with gau output or same"
  fi
  path_to_file=''
  if [[ "$1" = /* ]]; then
    path_to_file=$1
  else
    path_to_file="$(pwd)/$1"
  fi
  if ! [[ -f "$path_to_file" ]]; then
    error "no such file"
  fi
}

create() {
  gf_dir="gf_$(echo $1 | rev | cut -d '/' -f 1 | rev | cut -d '.' -f 1)"
  mkdir -p "$gf_dir"
  for pattern in $gf_patterns; do
    cat $1 | gf $pattern > "$gf_dir/$pattern.txt"
  done
}

error() {
  echo "Error: $1" >&2; exit 1
}

main $@

About

Run all patterns instantly and generate files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages