S
S
Sergei Erm2017-05-19 11:27:26
Python
Sergei Erm, 2017-05-19 11:27:26

Python requests sending data. How to send the required parameters?

Good day, again problems with authorization on the site with the Oracle engine.
The entrance is carried out by the certificate, and the login is generated by the BIN + IIN from the certificate.
Then you are prompted to enter a password.
With a new session, a link is generated with unique parameters, and in the form
there are many inputs with parameters that are also constantly changing.
I parsed all the parameters, but still throws me on the authorization page.

data ={'usernameField': login,
       'passwordField': password,
       '_AM_TX_ID_FIELD': IdField,
       '_FORM': Form,
       'SubmitButton$$unvalidated': SubButUnval,
       'SubmitButton$$serverUnvalidated': SubButServUnval,
       'SubmitButton$$processFormDataCalled': SubButProcFDataCall,
       'Cancel$$unvalidated': CanUnval,
       'Cancel$$serverUnvalidated': CanSerUnval,
       'Cancel$$processFormDataCalled': CanProcFDataCall,
       'FORM_MAC_LIST': FormMacList,
       '_FORM_SUBMIT_BUTTON': value,
       '_FORMEVENT':'',
       'serverValidate':'',
       'evtSrcRowIdx':'',
       'evtSrcRowId':'',
       'event':'',
       'source':'',
       '_ssoLangCode':'',
       'page': '/oracle/apps/fnd/sso/login/webui/MainLoginPG',
       'requestUrl':'',
       '_ri': ri,
       '_ti': ti,
       'language_code': 'RU',
       'oapc': oapc,
       'oas': oas,

r = s.post(url, cert=cert, headers=headers, data=data, verify=False)

652b3d4512.png
I will be glad for any help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LizardVojd, 2017-06-05
@LizardVojd

Try JSON
r = s.post(url, cert=cert, headers=headers, json=data, verify=False)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question