File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
modules/auxiliary/admin/http Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,10 @@ def check
53
53
54
54
return CheckCode ::Unknown unless res && res . code == 200
55
55
56
- data = res . body
57
- version = data . match ( /"path":"app-(.*?)\. js"/ ) [ 1 ]
58
-
56
+ data = res . get_json_document
57
+ data_js = data [ 'js' ]
58
+ version_path = data_js . find { |item | item [ "path" ] =~ /app-/ } [ "path" ]
59
+ version = version_path [ /app-(.*)\. js/ , 1 ]
59
60
if version . nil?
60
61
return CheckCode ::Unknown
61
62
else
@@ -97,8 +98,7 @@ def run
97
98
range : rand ( 1 ..9 ) . to_s ,
98
99
n : rand ( 1 ..9 ) . to_s ,
99
100
start : rand ( 1 ..9 ) . to_s ,
100
- end : rand ( 1 ..9 ) . to_s ,
101
- businesdsHoursId : rand ( 1 ..9 ) . to_s
101
+ end : rand ( 1 ..9 ) . to_s
102
102
} . to_json
103
103
104
104
res = send_request_cgi (
@@ -133,7 +133,7 @@ def run
133
133
json_body = JSON . parse ( body )
134
134
135
135
result = json_body . find { |item | item [ 'DisplayName' ] . start_with? ( marker . to_s ) }
136
- unless result || result . nil
136
+ unless result
137
137
fail_with ( Failure ::UnexpectedReply , 'Coud not find DisplayName match with marker.' )
138
138
end
139
139
@@ -150,8 +150,7 @@ def run
150
150
range : rand ( 1 ..9 ) . to_s ,
151
151
n : rand ( 1 ..9 ) . to_s ,
152
152
start : rand ( 1 ..9 ) . to_s ,
153
- end : rand ( 1 ..9 ) . to_s ,
154
- businesdsHoursId : rand ( 1 ..9 ) . to_s
153
+ end : rand ( 1 ..9 ) . to_s
155
154
} . to_json
156
155
157
156
res = send_request_cgi (
You can’t perform that action at this time.
0 commit comments