Skip to content

Commit 18aab8b

Browse files
Royce DavisRoyce Davis
authored andcommitted
Remove extrat comment lines from command.rb
1 parent d159aa6 commit 18aab8b

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

modules/auxiliary/admin/smb/command.rb

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ module so thanks very much to the author/s of that great tool. This module is u
4848

4949

5050

51-
#-----------------------------------
5251
# This is the main controle method
53-
#-----------------------------------
5452
def run_host(ip)
5553
cmd = "C:\\WINDOWS\\SYSTEM32\\cmd.exe"
5654
text = "\\WINDOWS\\Temp\\#{Rex::Text.rand_text_alpha(16)}.txt"
@@ -85,9 +83,7 @@ def run_host(ip)
8583

8684

8785

88-
#------------------------------------
8986
# Executes specified Windows Command
90-
#------------------------------------
9187
def execute_command(smbshare, ip, cmd, text, bat)
9288
begin
9389
#Try and execute the provided command
@@ -98,15 +94,13 @@ def execute_command(smbshare, ip, cmd, text, bat)
9894
return True
9995
rescue StandardError => execerror
10096
print_error("#{ip} - Unable to execute specified command: #{execerror}")
101-
return False
97+
10298
end
10399
end
104100

105101

106102

107-
# ----------------------------
108103
# Retrive output from command
109-
#-----------------------------
110104
def get_output(smbshare, ip, file)
111105
begin
112106
simple.connect("\\\\#{ip}\\#{smbshare}")
@@ -127,9 +121,7 @@ def get_output(smbshare, ip, file)
127121

128122

129123

130-
#----------------------------------------------------------------------------------
131124
# This is the cleanup method, removes .txt and .bat file/s created during execution-
132-
#-----------------------------------------------------------------------------------
133125
def cleanup_after(smbshare, ip, cmd, text, bat)
134126
begin
135127
# Try and do cleanup command
@@ -145,10 +137,8 @@ def cleanup_after(smbshare, ip, cmd, text, bat)
145137

146138

147139

148-
#------------------------------------------------------------------------------------------------------------------------
149-
# This code was stolen straight out of psexec.rb. Thanks very much for all who contributed to that module!!
140+
# This code was stolen straight out of psexec.rb. Thanks very much HDM and all who contributed to that module!!
150141
# Instead of uploading and runing a binary. This method runs a single windows command fed into the #{command} paramater
151-
#------------------------------------------------------------------------------------------------------------------------
152142
def psexec(smbshare, command)
153143
filename = "filename"
154144
servicename = "servicename"

0 commit comments

Comments
 (0)