-
Notifications
You must be signed in to change notification settings - Fork 5
/
getcleanwordlist.sh
32 lines (21 loc) · 1.01 KB
/
getcleanwordlist.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
#!/bin/bash
echo "WARNING: THIS WILL TAKE APPROX 2-3GB FREE SPACE TEMPORARILY. Just a heads-up"
#download wordlist
echo "Downloading file now"
curl -k -o /tmp/troydump_v1.7z "https://hashes.org/download.php?type=leak&id=6505&list=found"
echo "Download complete. Extracting ... (this WILL take a while) "
7z x -o/tmp/ /tmp/troydump_v1.7z
grep -x '.\{0,24\}' /tmp/6505_found_sorted.txt | tr -dc '[[:alnum:]][[:space:]][[:punct:]]' | perl -nle 'print if m{^[[:ascii:]]+$}' | grep -v -E '^[[:punct:]]{0,}$' | sed -e 's/^[ \t]*//' | grep -v '^ *$' > TROYDUMP.v1.txt
echo "Here is a sample of the text file"
head TROYDUMP.v1.txt
echo "Saved to TROYDUMP.v1.txt"
echo "Would you like to remove the downloaded files?"
read TMPLINE
TMPLINE=`echo "$TMPLINE" | tr '[:upper:]' '[:lower:]' `
if [ "$TMPLINE" == "y" ]; then
rm /tmp/troydump_v1.7z
rm /tmp/6505_found_sorted.txt
echo "Files removed. Operation complete."
else
echo "Operation complete. Original files are stored under /tmp/troydump_v1.7z and /tmp/6505_found_sorted.txt"
fi