-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdm.sh
112 lines (97 loc) · 3.83 KB
/
dm.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
#!/bin/bash
# Function to print slow output
slow() {
for c in $1; do
echo -n "$c"
sleep 0.04
done
echo
}
# Function to print medium output
med() {
for c in $1; do
echo -n "$c"
sleep 0.02
done
echo
}
# Function to print fast output
fast() {
for c in $1; do
echo -n "$c"
sleep 0.006
done
echo
}
# Clear the terminal screen
clear() {
if [ "$(uname)" == "Darwin" ]; then
clear
else
clear
fi
}
# Function to display the banner
banner() {
slow "██████╗ ██████╗ ██████╗ ██╗ ██╗ ███╗ ███╗ █████╗ ███████╗████████╗███████╗██████╗ "
slow "██╔══██╗██╔═══██╗██╔══██╗██║ ██╔╝ ████╗ ████║██╔══██╗██╔════╝╚══██╔══╝██╔════╝██╔══██╗"
slow "██║ ██║██║ ██║██████╔╝█████╔╝█████╗██╔████╔██║███████║███████╗ ██║ █████╗ ██████╔╝"
slow "██║ ██║██║ ██║██╔══██╗██╔═██╗╚════╝██║╚██╔╝██║██╔══██║╚════██║ ██║ ██╔══╝ ██╔══██╗"
slow "██████╔╝╚██████╔╝██║ ██║██║ ██╗ ██║ ╚═╝ ██║██║ ██║███████║ ██║ ███████╗██║ ██║"
slow "╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝"
}
# Function to validate Python version (Shifting to shell equivalent)
validate_python_version() {
python_version=$(python3 --version 2>&1)
if [[ $python_version != *"Python 3"* ]]; then
slow "[x] This script requires Python 3. Exiting..."
exit 1
fi
slow "[!] Python 3 detected. Proceeding..."
sleep 1
}
# Function to save results to a file
save_to_file() {
echo "$1" >> "$2.txt"
}
# Function to perform Google search
perform_search() {
slow "[+] Performing Google search..."
query="https://www.google.com/search?q=$1&num=$2"
links=$(curl -s "$query" | grep -oP '/url\?q=\K[^&]+')
count=0
for link in $links; do
echo "[*] $link"
count=$((count + 1))
if [ "$3" == "true" ]; then
save_to_file "$link" "$4"
fi
if [ "$count" -ge "$2" ]; then
break
fi
done
fast "[!] Total results found: $count"
}
# Main function
main() {
clear
banner
med "=============================================================================== "
med "[*] Coded by ROOT@ANONYMIZER"
med "[*] Copyright 2024 HACKINTER"
med "[*] Simple tool to enhance your Google search capabilities"
med "[*] Thanks to ALLAH, Free Palestine"
med "==============================================================================="
read -p "[?] Save results to a file? (Y/N): " save_option
save_results=false
if [[ "$save_option" == "Y" || "$save_option" == "y" ]]; then
save_results=true
read -p "[?] Enter filename (without extension): " filename
fi
read -p "[?] How many results do you need? " num_results
read -p "[?] Enter your dork query: " dork
perform_search "$dork" "$num_results" "$save_results" "$filename"
slow "[!] Search completed successfully. Exiting..."
}
# Call main function
main