This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuscanner.sh
129 lines (93 loc) · 3.61 KB
/
uscanner.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/bash
trap 'echo ""; ctrl_c; exit 1' 2
source $(pwd)/lib/utils.sh; MAIN="MAIN"
function print_banner() {
clear
echo -e ${B}" ____ "
echo -e ${B}" __ __/ __/______ ____ ___ ___ ____ "
echo -e ${B}"/ // /\ \/ __/ _ / _ \/ _ \/ -_) __/ "
echo -e ${B}"\_,_/___/\__/\_,_/_//_/_//_/\__/_/ ${W}v1.0"
echo
}
function ctrl_c () {
print_banner
echo -e ${Y}"[uScanner] ${W}Keyboard interrupt detected, exiting."; exit
}
function create_logfile() {
echo "uScanner username LOG file." > ${USERNAME}.txt
echo " " >> ${USERNAME}.txt
echo "[INFO] Scan taken on $DATE" >> ${USERNAME}.txt
echo "[INFO] Username ${USERNAME} found on..." >> ${USERNAME}.txt
echo " " >> ${USERNAME}.txt
}
function scan_username() {
create_logfile; print_banner
SOCIALMEDIA=(instagram facebook youtube twitter github codecademy pinterest soundcloud patreon canva bitbucket mixcloud)
declare -i FOUND=0
echo -e ${B}"[uScanner] ${W}Searching username ${B}${USERNAME}${W} on..."; echo
for SOCIAL in "${SOCIALMEDIA[@]}"; do
CHECK=$(curl -s "https://www.${SOCIAL}.com/${USERNAME}" -L -H "Accept-Language: en" | grep -owie '404 Not Found' -owie 'Page not found' -owie 'This page is not available' -owie 'This account does not exist' -owie 'HTTP/2 404'; echo $?)
echo -ne "Checking https://www.${SOCIAL}.com/${USERNAME}... "
if [[ $CHECK == *'0'* ]]; then
echo -e ${Y}"[Not Found!]${W}"
else
echo -e ${GRE}"[Found!]${W}"
FOUND=$FOUND+1
echo "[Found!] https://www.${SOCIAL}.com/${USERNAME}" >> ${USERNAME}.txt
fi
done
echo
echo -e ${B}"[uScanner] ${W}Username ${GRE}${USERNAME}${W} found on ${GRE}${FOUND}${W} pages."
}
function main() {
cd $HERE/lib; python3 wifi.py
source $HERE/lib/wifi.sh
if [ $wifi == "false" ]; then
print_banner
echo -e ${R}"[uScanner] ${W}Please, check your internet connection."
echo; exit
fi; cd $HERE/usernames; scan_username
}
if [ -z "$1" ]; then
print_banner
echo -ne ${GRE}"[uScanner] ${W}Input username: "; read USERNAME
clear
elif [ "$1" == "--help" ]||[ "$1" == "-h" ]; then
print_banner
echo -e ${W}"Usage: ./uscanner.sh [username] or [-h] [-a] [-u]"
echo
echo -e ${C}" -h, --help ${W}Print this help menu"
echo -e ${C}" -a, --about ${W}Print information about this program"
echo -e ${C}" -u, --update ${W}Update this tool automatically"
echo -e ${C}" --uninstall ${W}Uninstall the tool"
echo
echo -e ${W}"Report bugs to (t.me/TrollSkull)"
echo; exit
elif [ "$1" == "--update" ]||[ "$1" == "-u" ]; then
print_banner
echo -e ${B}"[uScanner] ${W}Updating tool..."
cd $HERE; cd ..
rm -rf "$HERE"
git clone https://github.com/TrollSkull/uScanner &> /dev/null
cd $HERE; chmod 777 uscanner.sh
print_banner
echo -e ${GRE}"[uScanner] ${W}The tool has been successfully updated."; exit
elif [ "$1" == "--about" ]||[ "$1" == "-a" ]; then
print_banner
echo -e ${GRE}"Name: ${W}uScanner"
echo -e ${GRE}"Author: ${W}TrollSkull"
echo -e ${GRE}"Version: ${W}v1.0"
echo
echo -e ${GRE}"Follow me: ${W}https://github.com/TrollSkull"
echo; exit
elif [ "$1" == "--uninstall" ]; then
print_banner
echo -e ${B}"[uScanner] ${W}Uninstalling..."
rm -rf "$HERE"
echo -e ${GRE}"[uScanner] ${W}The tool has been uninstalled."; exit
else
USERNAME=$1
fi
if [ "$MAIN" == "MAIN" ]; then
main
fi