Skip to content

Commit ffe0eca

Browse files
committed
Land rapid7#3609 - Fix gettelnet
2 parents 3e42fcb + c280c25 commit ffe0eca

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

scripts/meterpreter/gettelnet.rb

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,15 @@ def unsupported
150150

151151
unsupported if client.platform !~ /win32|win64/i
152152

153-
if enbl
153+
if enbl or (usr!= nil && pass != nil)
154154
message
155-
insttlntsrv()
156-
enabletlntsrv()
157-
print_status("For cleanup use command: run multi_console_command -rc #{@dest}")
158-
159-
elsif usr!= nil && pass != nil
160-
message
161-
insttlntsrv()
162-
enabletlntsrv()
163-
addrdpusr(usr, pass)
155+
if enbl
156+
insttlntsrv()
157+
enabletlntsrv()
158+
end
159+
if (usr!= nil && pass != nil)
160+
addrdpusr(usr, pass)
161+
end
164162
print_status("For cleanup use command: run multi_console_command -rc #{@dest}")
165163

166164
else

0 commit comments

Comments
 (0)