Skip to content

Commit ddb2566

Browse files
committed
Remove duplicate options, set less suspicious client_id
1 parent cf21d13 commit ddb2566

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/msf/core/auxiliary/mqtt.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ def initialize(info = {})
1010

1111
register_options(
1212
[
13-
Opt::RPORT(Rex::Proto::MQTT::DEFAULT_PORT),
14-
OptString.new('USERNAME', [false, 'The user to authenticate as']),
15-
OptString.new('PASSWORD', [false, 'The password to authenticate with'])
13+
Opt::RPORT(Rex::Proto::MQTT::DEFAULT_PORT)
1614
]
1715
)
1816

@@ -39,7 +37,7 @@ def read_timeout
3937
end
4038

4139
def client_id
42-
datastore['CLIENT_ID'] || Rex::Text.rand_text_alpha(1 + rand(10))
40+
datastore['CLIENT_ID'] || 'mqtt-' + Rex::Text.rand_text_alpha(1 + rand(10))
4341
end
4442

4543
# creates a new mqtt client for use against the connected socket

0 commit comments

Comments
 (0)