-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathleaksearch.sh
27 lines (26 loc) · 1 KB
/
leaksearch.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
#go install -v github.com/tomnomnom/anew@latest && pip3 install leakcheck && go install -v github.com/BountyStrike/emissary@latest
#To run: /root/tools/scanwithleak.sh /root/tools/leakdomains.txt
# add to ~/.config/emissary.ini
#[Discord]
#webhook=https://discord.com/api/webhooks/ID
#textField=content
#* 11,21 * * * /root/tools/scanwithleak.sh /root/tools/leakdomains.txt
LINES=$(cat $1)
APIKEY=
TMP="/root/tools/tmp/"
for LINE in $LINES
do
sleep 5
leakcheck --key "$APIKEY" "$LINE" --type domain_email -lo | sort -u >> "$TMP"newlines.txt
cat "$TMP"newlines.txt | anew "$TMP"allresults.txt > "$TMP"added-lines.txt
if [ -e "$TMP"added-lines.txt ]
then
file_size=$(wc -c < "$TMP"added-lines.txt)
# Check if file is empty
if [ "$file_size" -gt 1 ]
then
cat "$TMP"added-lines.txt >> "$TMP"added-linesBackup.txt
cat "$TMP"added-lines.txt | grep -i '.*:.*' | emissary --channel Discord -si -r 0
fi
fi
done