Skip to content

Instantly share code, notes, and snippets.

@haxcited
Created July 5, 2020 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haxcited/1052cdf6a1601568b85ea272facf218c to your computer and use it in GitHub Desktop.
Save haxcited/1052cdf6a1601568b85ea272facf218c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
echo "Enter name of the program: "
read progname
echo "progname is $progname"
echo "enter name of the seed domain for amass "
read seed
echo "seed domain is: $seed"
# create project directory
# ascr auto screenshot ,mscr manual screenshot
mkdir -p ~/bounty/$progname/{amass,masscan,nmap,chknts,ascr,mscr} &&
cd ~/bounty/$progname &&
# copy and create some files
cp ~/bounty/skellfs/amass-conf-template.ini ~/bounty/$progname/amass/amass-conf-$progname.ini &&
cp ~/bounty/skellfs/checks-template.org ~/bounty/$progname/chknts/checks-$progname.org
cp ~/bounty/skellfs/notes-template.org ~/bounty/$progname/chknts/notes-$progname.org
# sr array
declare -A srarray
srarray=(
[%%PROG_NAME%%]=$progname
[%%SEED_DOMA%%]=$seed
)
# sr loop
sr() {
# Loop the sr array
for i in "${!srarray[@]}"
do
search=${i}
replace=${srarray[$i]}
sed -i "s/${search}/${replace}/g" ~/bounty/$progname/amass/amass-conf-$progname.ini
done
}
# search and replace function call
sr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment