forked from mateeuslinno/msf-funny
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgmail_checker.rb
46 lines (36 loc) · 1.05 KB
/
gmail_checker.rb
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
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'net/http'
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report
def initialize(info = {})
super(update_info(info,
'Name' => 'Check e-mail valid by gmail',
'Description' => %q{
This module check valid e-mail by gmail
},
'Author' => [ 'Mateus Lino <[email protected]>' ],
'License' => MSF_LICENSE))
register_options(
[
OptString.new('CHEK_GMAIL', [true, 'check emails valid by gmail']),
])
end
def check_gmail(targetdom)
print_status(". . . CHECKING . . . ")
clnt = URI("https://mail.google.com/mail/gxlu?email=#{targetdom}@gmail.com")
resp = Net::HTTP.get_response(clnt)
if (resp['Set-Cookie'])
print_status("E-mail valid")
else
print_status("E-mail invalid")
end
end
def run
print_status("Checking email")
target = datastore['CHEK_GMAIL']
check_gmail(target) if datastore['CHEK_GMAIL']
end
end