@@ -192,7 +192,7 @@ def get_groups_membership(self, username):
192
192
193
193
def get_system_info_page (self ):
194
194
login_url = f'{ self .host } /dologin.action'
195
- auth_url = f'{ self .host } /doauthenticate .action'
195
+ auth_url = f'{ self .host } /admin/websudo .action'
196
196
tsv_auth_url = f'{ self .host } /rest/tsv/1.0/authenticate'
197
197
tsv_login_body = {
198
198
'username' : self .user ,
@@ -202,9 +202,9 @@ def get_system_info_page(self):
202
202
}
203
203
204
204
auth_body = {
205
- 'destination ' : '/admin/systeminfo.action ' ,
206
- 'authenticate ' : 'Confirm' ,
207
- 'password ' : self .password
205
+ 'webSudoDestination ' : '/secure/ admin/ViewSystemInfo.jspa ' ,
206
+ 'webSudoIsPost ' : False ,
207
+ 'webSudoPassword ' : self .password
208
208
}
209
209
210
210
login_page_response = self .session .get (login_url )
@@ -219,12 +219,12 @@ def get_system_info_page(self):
219
219
else :
220
220
self .session .post (url = tsv_auth_url , json = tsv_login_body )
221
221
222
- self . headers [ 'X-Atlassian-Token ' ] = 'no-check'
223
- system_info_html = self .session .post (url = auth_url , data = auth_body , headers = self .headers )
222
+ auth_body [ 'atl_token ' ] = self . session . cookies . get_dict ()[ 'atlassian.xsrf.token' ]
223
+ system_info_html = self .session .post (url = auth_url , data = auth_body , verify = self .verify )
224
224
return system_info_html .content .decode ("utf-8" )
225
225
226
226
def get_deployment_type (self ):
227
- html_pattern = 'com.atlassian.dcapt. deployment=terraform'
227
+ html_pattern = 'deployment=terraform'
228
228
confluence_system_page = self .get_system_info_page ()
229
229
if confluence_system_page .count (html_pattern ):
230
230
return 'terraform'
0 commit comments