Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/auxiliary/client/sms/send_text.rb
19500 views
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Auxiliary
7
include Msf::Auxiliary::Sms
8
9
def initialize(info = {})
10
super(
11
update_info(
12
info,
13
'Name' => 'SMS Client',
14
'Description' => %q{
15
This module sends a text message to multiple phones of the same carrier.
16
You can use it to send a malicious link to phones.
17
18
Please note that you do not use this module to send a media file (attachment).
19
In order to send a media file, please use auxiliary/client/mms/send_mms instead.
20
},
21
'Author' => [ 'sinn3r' ],
22
'License' => MSF_LICENSE,
23
'Notes' => {
24
'Stability' => [CRASH_SAFE],
25
'SideEffects' => [],
26
'Reliability' => []
27
}
28
)
29
)
30
end
31
32
def run
33
phone_numbers = datastore['CELLNUMBERS'].split
34
print_status("Sending text (#{datastore['SMSMESSAGE'].length} bytes) to #{phone_numbers.length} number(s)...")
35
send_text(phone_numbers, datastore['SMSSUBJECT'], datastore['SMSMESSAGE'])
36
print_status('Done.')
37
rescue Rex::Proto::Sms::Exception => e
38
print_error(e.message)
39
end
40
end
41
42