<commit_before>#!/bin/sh
#
# based on a script by <NAME> <<EMAIL>>
#
echo
echo "Welcome to the Hydra Wizard"
echo
read -p "Enter the service to attack (eg: ftp, ssh, http-post-form): " service
test -z "$service" && { echo Error: service may not be empty ; exit 1 ; }
read -p "Enter the target to attack (or filename with targets): " target
test -z "$target" && { echo Error: target may not be empty ; exit 1 ; }
read -p "Enter a username to test or a filename: " user
test -z "$user" && { echo Error: user may not be empty ; exit 1 ; }
read -p "Enter a password to test or a filename: " pass
test -z "$pass" && { echo Error: pass may not be empty ; exit 1 ; }
read -p "If you want to test for passwords (s)ame as login, (n)ull or (r)everse login, enter these letters without spaces (e.g. \"sr\") or leave empty otherwise: " pw
read -p "Port number (press enter for default): " port
echo
echo The following options are supported by the service module:
hydra -U $service
echo
read -p "If you want to add module options, enter them here (or leave empty): " opt
echo

ports=""
pws=""
opts=""
test -e "$target" && targets="-M $target"
test -e "$target" || targets="$target"
test -e "$user" && users="-L $user"
test -e "$user" || users="-l $user"
test -e "$pass" && passs="-P $pass"
test -e "$pass" || passs="-p $pass"
test -n "$port" && ports="-s $port"
test -n "$pw" && pws="-e $pw"
test -n "$opt" && opts="-m '$opt'"

echo The following command will be executed now:
echo " hydra $users $passs -u $pws $ports $opts $targets $service"
echo
read -p "Do you want to run the command now? [Y/n] " yn
test "$yn" = "n" -o "$yn" = "N" && { echo Exiting. ; exit 0 ; }
echo
hydra $users $passs -u $pws $ports $opts $targets $service<commit_msg>fix wizard script<commit_after>#!/bin/sh
#
# based on a script by <NAME> <<EMAIL>>
#
echo
echo "Welcome to the Hydra Wizard"
echo
read -p "Enter the service to attack (eg: ftp, ssh, http-post-form): " service
test -z "$service" && { echo Error: service may not be empty ; exit 1 ; }
read -p "Enter the target to attack (or filename with targets): " target
test -z "$target" && { echo Error: target may not be empty ; exit 1 ; }
read -p "Enter a username to test or a filename: " user
test -z "$user" && { echo Error: user may not be empty ; exit 1 ; }
read -p "Enter a password to test or a filename: " pass
test -z "$pass" && { echo Error: pass may not be empty ; exit 1 ; }
read -p "If you want to test for passwords (s)ame as login, (n)ull or (r)everse login, enter these letters without spaces (e.g. \"sr\") or leave empty otherwise: " pw
read -p "Port number (press enter for default): " port
echo
echo The following options are supported by the service module:
hydra -U $service
echo
read -p "If you want to add module options, enter them here (or leave empty): " opt
echo

ports=""
pws=""
opts=""
test -e "$target" && targets="-M $target"
test -e "$target" || targets="$target"
test -e "$user" && users="-L $user"
test -e "$user" || users="-l $user"
test -e "$pass" && passs="-P $pass"
test -e "$pass" || passs="-p $pass"
test -n "$port" && ports="-s $port"
test -n "$pw" && pws="-e $pw"
test -n "$opt" && { opts="-m $opt" ; dopts="-m '$opt'" ; }

echo The following command will be executed now:
echo " hydra $users $passs -u $pws $ports $dopts $targets $service"
echo
read -p "Do you want to run the command now? [Y/n] " yn
test "$yn" = "n" -o "$yn" = "N" && { echo Exiting. ; exit 0 ; }
echo
hydra $users $passs -u $pws $ports $opts $targets $service
{'fraction_non_alphanumeric': 0.16184474362646806, 'fraction_numerical': 0.002864508736751647, 'mean_word_length': 3.6684491978609626, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5851682', 'n_tokens_mistral': 1194, 'n_tokens_neox': 1158, 'n_words': 557}