I am working on an android app which helps the user login. The site which I want to login is this
I have been now searching for 2 days straight but haven't found myself any answer as to what all I should post.
The problem that I am facing is what all parameters should I post ? I have tried every possible combination of hidden and non-hidden and also tried with cookies.
It would be really kind of you if you could give me the list of the parameters that I should include in my request.
As of now , this is my code
Document docl = Jsoup.connect("http://erp.mitpune.com/AdminLogin.aspx")
.data("__VIEWSTATE","/wEPDwUINDA4MDU2ODdkZGYVkCI+Zarbu9B42es/RUu7ZNbD")
.data("txtPassword","*******")
.data("__LASTFOCUS","")
.data("__EVENTTARGET","")
.data("__EVENTARGUMENT","")
.data("__VIEWSTATE","/wEPDwUINDA4MDU2ODdkZGYVkCI+Zarbu9B42es/RUu7ZNbD")
.data("__VIEWSTATEGENERATOR","B8B84CAE")
.data("hdnMsg","")
.data("txtUserId","********")
.data("btnLogin","Login")
.method(Connection.Method.POST).post();
I am using jsoup,on android studio, but just the list would help me a lot.
Thanks in advance
txtUserId and txtPassword
posted to Adminlogin.aspx
inside form1
so form1.txtUserId and form1.txtPassword
This is a quick output of data variables by Fiddler Chrome Extension
ScriptManager1: UpdatePanel1|btnLogin
__ASYNCPOST: true
__EVENTARGUMENT:
__EVENTTARGET: btnLogin
__LASTFOCUS:
__VIEWSTATE: /wEPDwUINDA4MDU2ODdkZGYVkCI+Zarbu9B42es/RUu7ZNbD
__VIEWSTATEGENERATOR: B8B84CAE
hdnMsg:
txtPassword: sasasa
txtUserId: jajas
Seems like _ASYNCPOST and ScriptManager1 are not in your post variables .
Related
I'm trying to make the SwaggerUi interface not ask for authorization every time I boot.
I tried to enter in my Configure class:
.authorizeRequests().antMatchers("/actuator/**","/mypath/**").permitAll()
and
.authorizeRequests().antMatchers("/mypath/**").permitAll()
but without success.
Actuator on the other hand works fine without authorization with this code structure
Thanks everyone for a possible answer!
The basic problem is that even in the Sprinc-doc documentation they put you the case that you entered too. In order to make the code work you have to enter multiple permissions, one for each path. In your case it will have to be something like this:
.authorizeRequests().antMatchers("/actuator/**","/v2/**","/mypath/**","/swagger.yml","/anypath/").permitAll()
Try this:
.authorizeRequests().antMatchers("/swagger-ui/**").permitAll()
Then just go here:
http://localhost:[YOUR PORT]/swagger-ui/
p.s Don't forget the / at the end of the URL :)
Reading from this link, link, link, link, link and this SO answer about Microstrategy URL API, I want to pass the answer to one or more prompts in the request to that the report document is executed automatically without requiring the user to enter information.
When I tried to use valuePromptAnswer method for multiple prompt, Microstrategy only take the first argument. The other argument doensn't works. Here are the URL
http://111.222.333.444/MicroStrategy/servlet/mstrWeb?Server=******&Project=*****&Port=0&evt=4001&src=mstrWeb.4001&reportID=226F3C76422512B0E56995939C230DF1&visMode=0&reportViewMode=1&valuePromptAnswers=12^11
The microstrategy only takes the first argument.
Using elementsPromptAnswers generate the same result, only the first prompt receive the value
http://111.222.333.444/MicroStrategy/servlet/mstrWeb?Server=****&Project=***&Port=0&evt=4001&src=mstrWeb.4001&reportID=226F3C76422512B0E56995939C230DF1&visMode=0&reportViewMode=1&elementsPromptAnswers=F9365CA24CFDFD394F3D01ACB4EA5F21:1;474209F94C5C6140979F31848D01E40F:2
Using objectPromptAnswer generate the same result
http://111.222.333.444/MicroStrategy/servlet/mstrWeb?Server=****&Project=****&Port=0&evt=4001&src=mstrWeb.4001&reportID=226F3C76422512B0E56995939C230DF1&visMode=0&reportViewMode=1&objectsPromptAnswers=474209F94C5C6140979F31848D01E40F~12~DistChl
I've read the documentation carefully for each step by step. What I'm missed out? Is there any configuration on server side to accept all argument / parameters?
Thanks in advance.
We had did the thing you talk about using the next url:
mstrWeb?port=0&evt=2048001&src=mstrWeb.2048001&documentID=YOURDOCUMENTID&valuePromptAnswers={&Prompt1&}^{&Prompt2&}^{&Prompt3&}^{&Prompt4&}^{&Prompt5&}^{&Prompt6&}&promptAnswerMode=2
In the previous example, {&Prompt1&}, {&Prompt2&}, etc. are responses of a previous prompt. In your case, the url to create should be the next url:
mstrWeb?port=0&evt=2048001&src=mstrWeb.2048001&documentID=226F3C76422512B0E56995939C230DF1&valuePromptAnswers=12^11&promptAnswerMode=2
I think that your problem could be on the evt or promptAnswerMode parameters, because if these are not correctly configured it can get in troubles.
Hope that this answer solves your problem.
Greetings.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Change the URL in the browser without loading the new page using JavaScript
i want just add url in address bar of browser Note: dont want redirect
e.i i have a url www.example.com/index.html
i want set url on 'address bar' like www.example.com/index/page2.html
i use document.location.hash = 'foo';
but it is add only # data
like www.example.com/index.html#foo
note : i dont want to redirect only want to add url in address bar so don't answer document.location like that
any solution for that ?
Have a read here.
http://badassjs.com/post/840846392/location-hash-is-dead-long-live-html5-pushstate
Might help.
window.history.pushState('abc', "Title", "/new-url");
Can't be done. This is a security feature to make it harder to spoof a site (e.g. for phishing attacks)
I'm not sure if you can do this without using a redirect.
Here's a way to achieve your goal though.
Create page for www.example.com/index/page2.html that contains of a frame of www.example.com/index.html
In www.example.com/index.html redirect the user to www.example.com/index/page2.html if the www.example.com/index.html isn't inside a frame.
I'm trying to log into facebook, I'm new to this so I hope you can give me some pointers.
I'm trying spring social, because is the only one I found with a complete example, which logs in successfully, but it doesn't delete the cookie once I log out(even when I tried to set the cookie max age to 0).
So please can anyone tell me how to fix this or maybe a better(or easier) way to do this [log in]?
I thank your help in advance
I doubt that setting the max age to 0 will work in this case. Try to use method removeCookie from the class UserCookieGenerator instead - https://github.com/SpringSource/spring-social-samples/commit/431be39b3132ed8f5e2ebe377515f7da20c8ef17#diff-5
Hope it helps
My HTMLUnit tests are failing, and I've got a feeling it's because I'm entering a password using the setValueAttribute() method and that for some reason doesn't work. Any ideas? Am I supposed to pass HTMLUnit the encrypted form of the password?
EDIT:
The code to set the pass:
loginForm.getInputByName("loginPassword").setValueAttribute("1234");
This should work, can you please submit a test case to HtmlUnit user-list, so we investigate further?
Yours,
Ahmed Ashour
http://asashour.blogspot.com/
The password field is not encrypted. It is just not rendered as plain text in the browser (dots or stars instead). You can make it visible with a tool, such as Webdeveloper toolbar for Firefox. So this should not be the problem. I am using HtmlUnit myself and it works.
It does work, I have it working.
I would check to make sure you getting the correct input field name. If not, can you post the stacktrace.
The below code works for me.
form.getInputByName("password").setValueAttribute("1234");