Understanding Java code and make it jQuery. (loginpage) -


i'm trying understand login-procedure balance-only login page @ bank. there project has procedure in java, i'm not familiar cant understand it. (https://github.com/liato/android-bankdroid/blob/master/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/okq8.java)

i make in jquery.

my attempt is:

<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> </head> <script> var user_id="8312345678"; var password="secret"; var pemurl="https://nettbank.edb.com/logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8"; var loginurl="https://nettbank.edb.com/logon/logon/step1"; var epochtime=date.now(); $.ajax({     async: false,     cache: false,     type: 'post',     data: ({         'p_tranid':epochtime,         'p_errorscreen':'logon_repost_error',         'n_bank':'',         'empty_pwd':'',         'username': user_id,         'password': password     }),     url: loginurl,     success: function (response) {         console.log(response);     },     error: function (xmlhttprequest, textstatus, errorthrown) {         console.log(xmlhttprequest.responsetext);         console.log(xmlhttprequest);         console.log(textstatus);         console.log(errorthrown);     } }); </script> </html> 

the response should include "logon_ok", not.

i've seen in java-code, there certificate-file (https://github.com/liato/android-bankdroid/blob/master/bankdroid-legacy/src/main/res/raw/cert_okq8.pem) code i'm talking below. procedure i'm missing?

protected loginpackage prelogin() throws bankexception, ioexception {     urlopen = new urllib(context, certificatereader.getcertificates(context, r.raw.cert_okq8));     date d = new date();     list<namevaluepair> postdata = new arraylist<namevaluepair>();     response = urlopen             .open("https://nettbank.edb.com/logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8");     //p_tranid epoch time in milliseconds     postdata.add(new basicnamevaluepair("p_tranid", long.tostring(d.gettime())));     postdata.add(new basicnamevaluepair("p_errorscreen", "logon_repost_error"));     postdata.add(new basicnamevaluepair("n_bank", ""));     postdata.add(new basicnamevaluepair("empty_pwd", ""));     postdata.add(new basicnamevaluepair("user_id", getusername().touppercase()));     postdata.add(new basicnamevaluepair("password", getpassword()));     return new loginpackage(urlopen, postdata, response,             "https://nettbank.edb.com/logon/logon/step1"); } 


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -