Jump to content

Automating HTTP form posts with cookies, etc without plugins


fseipel

This topic is 5369 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Another technique that recently occurred to me relates to injecting JavaScript into an already-loaded web page within webviewer. Interestingly, this can be accomplished without *any* plugins.

The utility in this is that you can submit a form post to a site requiring cookies, previous login, etc, and specify *only* those fields such as login/password, no need to code hidden fields, tokens, session parameter fields, dynamic timestamps, etc.

To achieve this, after, say, loading http://www.google.com, you pause until page loads, then set the url to "javascript:void(document.f.q.value = 'whatyouwant to search for');" this will cause the search field to go to "whatyouwant to search for"; you'll see it in webviewer as if you typed it. Pause again, then set the URL to "javascript:document.f.submit();" and pause again; the form will submit. Goggle isn't the most useful example, since it can be searched with a 'get' request. By setting the javascript to void you are suppressing a return value so the current page is not lost. This should allow you to run Javascripts to click buttons on an external page, etc without plugins.

This technique works because a javascript: in the URL causes the javascript to run immediately.

Link to comment
Share on other sites

  • 1 month later...

This topic is 5369 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.