-
๐ I regularly write articles on securihub.com
-
๐ซ How to reach me [email protected]
Bash script to check if a domain or list of domains can be spoofed based in DMARC records
๐ I regularly write articles on securihub.com
๐ซ How to reach me [email protected]
$ ./SpoofThatMail.sh
โโโโโโโโโโโโโโโ โโโโโโโ โโโโโโโ โโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโ โโโโโโ โโโโโโโโโ
โโโโโโโโโโโโโโโ โโโ โโโโโโ โโโโโโโโโ
โโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโ โโโโโโโ โโโโโโโ โโโ
โโโโโโโโโโโโ โโโ โโโโโโ โโโโโโโโโ โโโโ โโโโ โโโโโโ โโโโโโ
โโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโ โโโโโโโโโโโโโโโโโโโ
โโโ โโโโโโโโโโโโโโโโ โโโ โโโโโโโโโโโโโโโโโโโโโโโโโ
โโโ โโโโโโโโโโโโโโโโ โโโ โโโโโโโโโโโโโโโโโโโโโโโโโ
โโโ โโโ โโโโโโ โโโ โโโ โโโ โโโ โโโโโโ โโโโโโโโโโโโโโ
โโโ โโโ โโโโโโ โโโ โโโ โโโ โโโโโโ โโโโโโโโโโโโโโ by securihub.com
Wrong execution\n
Accepted parameters:\n
Use -d along with a domain name, example sh SpoofThatMail.sh -d domain.com
Null string will be detected and ignored\n
Use -f along with a file containing domain names, example sh SpoofThatMail.sh -f domains.txt
Note that the path provided for the file must be a valid one\n
diff --git a/SpoofThatMail.sh b/SpoofThatMail.sh
old mode 100644
new mode 100755
index 80e2397..2e7e05b
--- a/SpoofThatMail.sh
+++ b/SpoofThatMail.sh
@@ -6,11 +6,11 @@ YELLOW='\033[1;33m'
NC='\033[0m' # No Color
help () {
- echo "Accepted parameters:\n"
- echo "Use -d along with a domain name, example sh SpoofThatMail.sh -d domain.com"
- echo "Null string will be detected and ignored\n"
- echo "Use -f along with a file containing domain names, example sh SpoofThatMail.sh -f domains.txt"
- echo "Note that the path provided for the file must be a valid one\n"
+ echo -e "Accepted parameters:\n"
+ echo -e "Use -d along with a domain name, example sh SpoofThatMail.sh -d domain.com"
+ echo -e "Null string will be detected and ignored\n"
+ echo -e "Use -f along with a file containing domain names, example sh SpoofThatMail.sh -f domains.txt"
+ echo -e "Note that the path provided for the file must be a valid one\n"
}
check_url () {
@@ -20,17 +20,17 @@ check_url () {
output=$(nslookup -type=txt _dmarc."$domain")
case "$output" in
*p=reject*)
- echo "$domain is ${GREEN}NOT vulnerable${NC}"
+ echo -e "$domain is ${GREEN}NOT vulnerable${NC}"
;;
*p=quarantine*)
- echo "$domain ${YELLOW}can be vulnerable${NC} (email will be sent to spam)"
+ echo -e "$domain ${YELLOW}can be vulnerable${NC} (email will be sent to spam)"
;;
*p=none*)
- echo "$domain is ${RED}vulnerable${NC}"
+ echo -e "$domain is ${RED}vulnerable${NC}"
retval=1
;;
*)
- echo "$domain is ${RED}vulnerable${NC} (No DMARC record found)"
+ echo -e "$domain is ${RED}vulnerable${NC} (No DMARC record found)"
retval=1
;;
esac
@@ -49,7 +49,7 @@ check_file () {
check_url $line
VULNERABLES=$((VULNERABLES=VULNERABLES+$?))
done < $input
- echo "\n$VULNERABLES out of $COUNTER domains are ${RED}vulnerable ${NC}"
+ echo -e "\n$VULNERABLES out of $COUNTER domains are ${RED}vulnerable ${NC}"
}
@@ -73,7 +73,7 @@ main () {
}
-echo "
+echo -e "
โโโโโโโโโโโโโโโ โโโโโโโ โโโโโโโ โโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโ โโโโโโ โโโโโโโโโ
@@ -90,7 +90,7 @@ echo "
"
if [ $# != 2 ];then
- echo "Wrong execution\n"
+ echo -e "Wrong execution\n"
help
exit 0
fi
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.