CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/auxiliary/client/sms/send_text.rb
Views: 11623
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(update_info(info,
11
'Name' => 'SMS Client',
12
'Description' => %q{
13
This module sends a text message to multiple phones of the same carrier.
14
You can use it to send a malicious link to phones.
15
16
Please note that you do not use this module to send a media file (attachment).
17
In order to send a media file, please use auxiliary/client/mms/send_mms instead.
18
},
19
'Author' => [ 'sinn3r' ],
20
'License' => MSF_LICENSE
21
))
22
end
23
24
def run
25
phone_numbers = datastore['CELLNUMBERS'].split
26
print_status("Sending text (#{datastore['SMSMESSAGE'].length} bytes) to #{phone_numbers.length} number(s)...")
27
begin
28
res = send_text(phone_numbers, datastore['SMSSUBJECT'], datastore['SMSMESSAGE'])
29
print_status("Done.")
30
rescue Rex::Proto::Sms::Exception => e
31
print_error(e.message)
32
end
33
end
34
end
35
36