-
Notifications
You must be signed in to change notification settings - Fork 33
/
JSfileScanner.sh
60 lines (52 loc) · 1.54 KB
/
JSfileScanner.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
#!/bin/bash
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
CYAN='\033[0;36m'
END='\033[0m'
QUOTES=(
"Activating 1337 mode!"
"Target uses Equifax-grade security."
"ᕕ( ᐛ )ᕗ"
"ᕕ( ᐕ )ᕗ"
"三三ᕕ( ᐛ )ᕗ"
"ᐠ( ᐛ )ᐟ"
"Never gonna give you up."
"Js pls."
"Update pls."
"Sleep is for the weak."
"Grab a cuppa!"
"js, js+ on steroids."
"I am 100 percent natural."
"A bug is never just a mistake. It represents something bigger. An error of thinking that makes you who you are."
"You hack people. I hack time."
"I hope you don't screw like you type."
"Hack the planet!"
"Crypto stands for cryptography."
"PoC||GTFO"
)
rand=$((RANDOM % ${#QUOTES[@]}))
printf "${YELLOW}[i]${END} ${QUOTES[$rand]}\\n"
echo
mkdir js
mkdir db
linkf=~/Tools/LinkFinder/linkfinder.py
for i in $(cat alive.txt)
do
n1=$(echo $i | awk -F/ '{print $3}')
n2=$(echo $i | awk -F/ '{print $1}' | sed 's/.$//')
mkdir js/$n1-$n2
mkdir db/$n1-$n2
timeout 30 python3 $linkf -d -i $i -o cli > js/$n1-$n2/raw.txt
jslinks=$(cat js/$n1-$n2/raw.txt | grep -oaEi "https?://[^\"\\'> ]+" | grep '\.js' | grep "$n1" | sort -u)
if [[ ! -z $jslinks ]]
then
for js in $jslinks
do
python3 $linkf -i $js -o cli >> js/$n1-$n2/linkfinder.txt
echo "$js" >> js/$n1-$n2/jslinks.txt
wget $js -P db/$n1-$n2/ -q
done
fi
printf "${GREEN}[+]${END} $i ${YELLOW}done${END}.\\n"
done
printf "${YELLOW}[+]${END} Script is done.\\n"