Skip to content

Commit

Permalink
Update AdminHack.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mishakorzik authored Oct 16, 2023
1 parent 3f557f3 commit 97852d5
Showing 1 changed file with 37 additions and 33 deletions.
70 changes: 37 additions & 33 deletions AdminHack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,33 @@ trap 'printf "\n";exits;exit 0' INT

# Banner function
banner() {
rand1=$( shuf -i 0-${#colors[@]} -n 1 )
rand2=$( shuf -i 0-${#colors[@]} -n 1 )
sss=''
start=1
end=50
for (( mo=${start}; mo <= ${end}; mo++)); do
if [[ $mo == ${start} ]]; then
sss+="${bd}${w}+"
elif [[ $mo == $end ]]; then
sss+="${bd}${w}+"
elif [[ $mo == $(( (end / 2 ) + 1)) ]]; then
sss+="${bd}${g}+"
elif [[ $mo > 1 ]]; then
sss+="${bd}${r}-"
fi
done
rand1=$( shuf -i 0-${#colors[@]} -n 1 )
rand2=$( shuf -i 0-${#colors[@]} -n 1 )
sss=''
start=1
end=50
for (( mo=${start}; mo <= ${end}; mo++)); do
if [[ $mo == ${start} ]]; then
sss+="${bd}${w}+"
elif [[ $mo == $end ]]; then
sss+="${bd}${w}+"
elif [[ $mo == $(( (end / 2 ) + 1)) ]]; then
sss+="${bd}${g}+"
elif [[ $mo > 1 ]]; then
sss+="${bd}${r}-"
fi
done
echo -e "\t${colors[rand1]} _______ ______ __ __ ___ __ _ __ __ _______ _______ ___ _"
echo -e "\t${colors[rand1]} | _ || | | |_| || || | | | | | | || _ || || | | |"
echo -e "\t${colors[rand1]} | |_| || _ || || || |_| | | |_| || |_| || || |_| |"
echo -e "\t${colors[rand1]} | || | | || || || | | || || || _|"
echo -e "\t${colors[rand1]} | || |_| || || || _ | | || || _|| |_"
echo -e "\t${colors[rand1]} | _ || || ||_|| || || | | | | _ || _ || |_ | _ |"
echo -e "\t${colors[rand1]} |__| |__||______| |_| |_||___||_| |__| |__| |__||__| |__||_______||___| |_|"
echo -e " \t${bd}${g}${w} Author ${b}:${c} ${ul}Mishakorzhik${n} ${g}${n}"
echo -e " \t${bd}${g}${w} Version ${b}:${w} 1.7.6 ${g}${n}"
echo -e " \t${bd}${g}${w} Code ${b}:${w} Bash, python ${g}${n}"
echo -e " \t${bd}${g} ╭──────────────┴${w} Date ${b}:${w} 16 05 2021 ${g}${n}"
echo -e " \t${bd}${g}${w} Author ${b}:${c} ${ul}Mishakorzhik${n} ${g}${n}"
echo -e " \t${bd}${g}${w} Version ${b}:${w} 1.8.2 ${g}${n}"
echo -e " \t${bd}${g}${w} Code ${b}:${w} Bash, python ${g}${n}"
echo -e " \t${bd}${g} ╭──────────────┴${w} Date ${b}:${w} 16 05 2021 ${g}${n}"
}

# Function to check and print the content of robots.txt
Expand All @@ -68,7 +68,7 @@ check_robots() {
if [[ $http_code == "200" && ! -z "$response" && ! "$response" == *"</html>"* ]]; then
echo -e " \t${g}[${w}+${g}]${w} Robots.txt found for ${site}${n}"
if [[ ! -z $output_file ]]; then
echo -e " \t${g}[${w}+${g}]${w} Saving Robots.txt for ${site}${n}"
#echo -e " \t${g}[${w}+${g}]${w} Saving Robots.txt for ${site}${n}"
wget -q -O "${web}/robots.txt" "${site}/robots.txt"
fi
else
Expand Down Expand Up @@ -118,6 +118,17 @@ web=$(echo ${web} | cut -d '/' -f 3)
echo -ne " \t${c}[${w}>${c}] ${w}Enter your wordlist ${g}(${w}Default${g}:${w} wordlist.txt${g}) ${g}:${n} "
read wordlist

echo -ne " \t${c}[${w}>${c}] ${w}Do you want to save the output? (yes/no) ${g}:${n} "
read save_output

if [[ "$save_output" == "yes" ]]; then
# Create directory with target website's name
mkdir -p "${web}"
output_file="${web}/output.txt"
else
output_file=""
fi

wordlist=${wordlist:-wordlist.txt}
if ! [[ -e $wordlist ]]; then
printf "\n"
Expand All @@ -131,27 +142,20 @@ thread=${thrd:-${thread}}

printf "\n"
echo -e " \t${g}[${w}+${g}]${w} Total Wordlist ${g}:${w} $( wc -l $wordlist | cut -d ' ' -f 1 )"
echo -ne " \t${c}[${w}>${c}] ${w}Do you want to save the output? (yes/no) ${g}:${n} "
read save_output

if [[ "$save_output" == "yes" ]]; then
# Create directory with target website's name
mkdir -p "${web}"
output_file="${web}/output.txt"
echo -e " \t${g}[${w}+${g}]${w} Output will be saved in directory: ${web}"
else
output_file=""
fi

echo -ne " \t${g}[${w}+${g}]${w} Start Scanning${n}"
for((;T++<=10;)) { printf '.'; sleep 1; }
printf "\n\n"

# Call the check_robots function here
check_robots "http://${web}"
if [[ "$save_output" == "yes" ]]; then
echo -e " \t${g}[${w}+${g}]${w} Output will be saved in directory: ${web}"
fi
sleep 2

main() {
pids=()
pids=()

for list in $(< $wordlist); do
if [[ ${#pids[@]} -ge $thread ]]; then
Expand Down

0 comments on commit 97852d5

Please sign in to comment.