Adds some fabric wrappers
This commit is contained in:
parent
81043e8ba1
commit
8d7f3eee20
3 changed files with 80 additions and 0 deletions
40
bin/.bin/fabric/guess-subdomains
Executable file
40
bin/.bin/fabric/guess-subdomains
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
CURRENTLIST=""
|
||||
URL=""
|
||||
|
||||
# Loop through each argument given to the script
|
||||
while [ "${1:0:1}" = "-" ]; do
|
||||
# Use a case statement to set variables based on the value of $arg
|
||||
case $1 in
|
||||
"--url"|"-u")
|
||||
URL="$2"
|
||||
shift
|
||||
;;
|
||||
"--currentlist"|"--current-list"|"-c")
|
||||
CURRENTLIST="$2"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown argument: $arg"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
(
|
||||
if [ -n "$URL" ]; then
|
||||
echo '# PAGE CONTENT'
|
||||
echo ''
|
||||
w3m -dump "$URL"
|
||||
echo ''
|
||||
fi
|
||||
|
||||
if [ -n "$CURRENTLIST" ] && [ -f "$CURRENTLIST" ]; then
|
||||
echo '# CURRENT LIST OF SUBDOMAINS'
|
||||
echo ''
|
||||
cat "$CURRENTLIST"
|
||||
fi
|
||||
) | tee /dev/tty | fabric --stream --pattern guess_subdomains
|
||||
Loading…
Add table
Add a link
Reference in a new issue