Wednesday, April 13, 2011

Generating possible URLs from forms

Hi,

I am trying to get all the URLs (and then get the data) that are generated by the form on this page - http://www.vodafone.in/_layouts/servicecallertunes.aspx with little success.

I have installed HTTP Headers(0.14) addon on Firefox 3.0.5, Ubuntu. But the resultant URL is very weird and pretty long. Eg:

POST /_layouts/servicecallertunes.aspx __EVENTTARGET=CTTunes1%24ddlTunesSubCategories&__EVENTARGUMENT=&__LASTFOCUS=&__VIEWSTATE=M0ZAMFvA%2Baq58jd57T84z0fdR%2B1tju00M3YD5nagIHQB48ihJiAoFxS%2B%2Ff8CvaAigdH2a4

(goes on for more than 5000 characters)

What are the possible programmable options to get data from the above form? My only idea currently is to generate all the possible URLs and then get the data.

Thanks in advance. Bart J

From stackoverflow
  • This is an ASP.NET page, which is why you see the __VIEWSTATE in there.

    As the name suggests, the viewstate encodes information about the state of the view to try to make a stateless HTTP connection "feel" stateful to the programmers who created the form.

    Looks like there's actually a firefox plugin out there that will let you decode the viewstate and view the information inside if it. You might be able to use that to figure out what is really getting submitted and craft your own viewstate to get the behavior you want.

    Or you could just generate all the possible URLs - which might be easier :)

    Bart J : Thank you for your answer, Eric. I have installed Viewstate addon but, I expected to see a URL but, I get some weird string. Were you able to view an URL in the ViewState addon?
    Colin Pickard : the viewstate is encrypted on the vodafone website. this plugin won't be able to help
  • You can get the same data in 250 sequential pages here:

    http://www.vodafone.in/existingusers/services/pages/callertunes_searching.aspx?cttrack=1

    Bart J : Thanks Colin. But, the same problem of iterating through all the result pagesstill exists because the pagination is a postback.
    Colin Pickard : Well at least you've reduced the complexity a little, you might be able identify the proper POST easier. Of course there's always swivel chair integration :)

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.