-
Notifications
You must be signed in to change notification settings - Fork 46
/
blcscan.sh
69 lines (61 loc) · 2.1 KB
/
blcscan.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
#colors
red=`tput setaf 1`
green=`tput setaf 2`
yellow=`tput setaf 3`
blue=`tput setaf 4`
magenta=`tput setaf 5`
reset=`tput sgr0`
read -p "Enter domain name : " DOM
if [ -d ~/reconizer/ ]
then
echo " "
else
mkdir ~/reconizer
fi
if [ -d ~/reconizer/$DOM/Broken_Links ]
then
echo " "
else
mkdir ~/reconizer/$DOM/Broken_Links
fi
echo "${red}
=================================================
| ____ _____ ____ ___ _ _ _ |
| | _ \|___ / / ___/ _ \| \ | (_)_______ _ __ |
| | |_) | |_ \| | | | | | \| | |_ / _ \ '__| |
| | _ < ___) | |__| |_| | |\ | |/ / __/ | |
| |_| \_\____/ \____\___/|_| \_|_/___\___|_| |
| |
================== Anon-Artist ==================
${reset}"
echo "${blue} [+] Started Scanning for Broken Links ${reset}"
echo " "
#blc
if [ -f /usr/local/bin/blc ]
then
echo "${magenta} [+] Running BLC for checking Broken links ${reset}"
for domains in $(cat ~/reconizer/$DOM/Subdomains/all-alive-subs.txt);
do
blc $domains -ro > ~/reconizer/$DOM/Broken_Links/blc.txt && cat ~/reconizer/$DOM/Broken_Links/blc.txt | grep BROKEN > ~/reconizer/$DOM/Broken_Links/Broken_Links.txt
done
else
echo "${blue} [+] Installing BLC ${reset}"
sudo apt-get install -y npm -qq > /dev/null
npm install broken-link-checker -g
echo "${magenta} [+] Running BLC for checking Broken links${reset}"
for domains in $(cat ~/reconizer/$DOM/Subdomains/all-alive-subs.txt);
do
blc $domains -ro > ~/reconizer/$DOM/Broken_Links/blc.txt && cat ~/reconizer/$DOM/Broken_Links/blc.txt | grep BROKEN > ~/reconizer/$DOM/Broken_Links/Broken_Links.txt
done
fi
echo " "
echo "${yellow} ---------------------------------- xxxxxxxx ---------------------------------- ${reset}"
echo " "
echo "${blue} [+] Succesfully saved the results ${reset}"
echo " "
echo "${yellow} ---------------------------------- xxxxxxxx ---------------------------------- ${reset}"
echo " "
echo "${red} [+] Thank you for using R3C0Nizer${reset}"
echo ""
echo "${yellow} ---------------------------------- xxxxxxxx ---------------------------------- ${reset}"