@@ -105,7 +105,7 @@ def check
105105 return CheckCode ::Unknown ( 'Unable to determine version' ) unless version
106106
107107 return CheckCode ::Safe ( "Detected WSO2 API Manager #{ version } which is not vulnerable" ) unless version . between? (
108- Rex ::Version . new ( '3.1.0' ) , Rex ::Version . new ( '4.2.0 ' )
108+ Rex ::Version . new ( '3.1.0' ) , Rex ::Version . new ( '4.2.9 ' )
109109 )
110110
111111 if target . name == 'Automatic'
@@ -124,7 +124,7 @@ def check
124124 datastore [ 'TARGET' ] = selected_target_index
125125 vprint_status ( "Automatically selected target: #{ target . name } for version #{ version } " )
126126 else
127- print_error ( "Mismatch between version found (#{ version } ) and module target version (#{ target . name } )" ) unless version . between? (
127+ vprint_error ( "Mismatch between version found (#{ version } ) and module target version (#{ target . name } )" ) unless version . between? (
128128 Rex ::Version . new ( target . opts [ 'min_version' ] ) , Rex ::Version . new ( target . opts [ 'max_version' ] )
129129 )
130130 end
@@ -228,7 +228,7 @@ def list_product_api
228228 api_list = res . get_json_document [ 'list' ]
229229
230230 if api_list . empty?
231- print_error ( 'No Proucts API available' )
231+ print_error ( 'No Products API available' )
232232 print_status ( 'Trying to create an API...' )
233233 api_list = create_product_api
234234 end
@@ -256,7 +256,7 @@ def create_api
256256 'endpointConfig' => {
257257 'endpoint_type' => 'http' ,
258258 'sandbox_endpoints' => {
259- 'url' => "https://#{ target_uri . host } :9443 /am/#{ Faker ::Internet . slug } /v1/api/"
259+ 'url' => "https://#{ target_uri . host } :#{ datastore [ 'RPORT' ] } /am/#{ Faker ::Internet . slug } /v1/api/"
260260 } ,
261261 'production_endpoints' => {
262262 'url' => "https://#{ target_uri . host } :9443/am/#{ Faker ::Internet . slug } /v1/api/"
0 commit comments