MailChecker是一款功能强大的跨语言临时电子邮件安全检测工具,该工具可以帮助广大研究人员快速对目标电子邮件进行安全检测和内容验证。该工具后端由一个包含了超过55000个的虚假电子邮件提供商的数据库驱动,当你需要使用电子邮件与你的用户进行联系时,该工具可以有效地防止邮件被丢到“垃圾收件箱”中。
当前版本的MailChecker支持以下功能:
1、验证电子邮件的格式:底层使用validator.js电子邮件正则式验证工具和FILTER_VALIDATE_EMAIL(PHP);
2、验证电子邮件是否是一份临时邮件(类似yopmail);
当前版本的MailChecker支持检测以下语言:
NodeJS
JavaScript
PHP
Python
Ruby
Rust
Elixir
Clojure
Go
go get https://github.com/FGRibreau/mailchecker
npm install mailchecker
gem install ruby-mailchecker
composer require fgribreau/mailchecker
var MailChecker = require('mailchecker');
if(!MailChecker.isValid('[email protected]')){
console.error('O RLY !');
process.exit(1);
}
if(!MailChecker.isValid('myemail.com')){
console.error('O RLY !');
process.exit(1);
}
<script type="text/javascript" src="MailChecker/platform/javascript/MailChecker.js"></script>
<script type="text/javascript">
if(!MailChecker.isValid('[email protected]')){
console.error('O RLY !');
}
if(!MailChecker.isValid('myemail.com')){
console.error('O RLY !');
}
</script>
use Fgribreau\MailChecker;
require __DIR__ . '/vendor/autoload.php';
if(!MailChecker::isValid('[email protected]')){
die('O RLY !');
}
if(!MailChecker::isValid('myemail.com')){
die('O RLY !');
}
我们需要使用pip工具直接安装MailChecker:
pip install mailchecker
然后在你的代码中引入MailChecker.py文件即可:
from MailChecker import MailChecker
if not MailChecker.is_valid('[email protected]'):
print "O RLY !"
Django验证器:https://github.com/jonashaag/django-indisposable
require 'mail_checker'
unless MailChecker.valid?('[email protected]')
fail('O RLY!')
end
(向右滑动,查看更多)
extern crate mailchecker;
assert_eq!(true, mailchecker::is_valid("plop@plop.com"));
assert_eq!(false, mailchecker::is_valid("\nok@gmail.com\n"));
assert_eq!(false, mailchecker::is_valid("ok@guerrillamailblock.com"));
(向右滑动,查看更多)
Code.require_file("mail_checker.ex", "mailchecker/platform/elixir/")
unless MailChecker.valid?("[email protected]") do
raise "O RLY !"
end
unless MailChecker.valid?("myemail.com") do
raise "O RLY !"
end
; no package yet; just drop in mailchecker.clj where you want to use it.
(load-file "platform/clojure/mailchecker.clj")
(if (not (mailchecker/valid? "[email protected]"))
(throw (Throwable. "O RLY!")))
(if (not (mailchecker/valid? "myemail.com"))
(throw (Throwable. "O RLY!")))
package main
import (
"log"
"github.com/FGRibreau/mailchecker/platform/go"
)
if !mail_checker.IsValid('[email protected]') {
log.Fatal('O RLY !');
}
if !mail_checker.IsValid('myemail.com') {
log.Fatal("O RLY !")
}
如需为该工具部署开发环境,请先在本地设备上安装并配置好Docker。
使用下列命令将该项目源码克隆至本地:
git clone https://github.com/FGRibreau/mailchecker.git
然后在Docker中安装并配置对应语言的依赖组件:
npm install
执行环境安装:
npm run setup
运行测试:
npm test
本项目的开发与发布遵循MIT开源许可证协议。
MailChecker:https://github.com/FGRibreau/mailchecker
https://github.com/chriso/validator.js/blob/master/validator.js#L38
https://www.hook0.com/
https://image-charts.com/?gh_mailchecker
https://github.com/jonashaag/django-indisposable