Simulating Javascript 'doPostBack()' in C# -
I am writing a web scanner for my company, our client gives us access to his website for this purpose, but Our customer's IT team does not communicate with us, so I have no program to help with this source.
Their website uses Javascript at all to send postdata to the server of your button / dropdown menu so that the screen is updated to show the right information to the end user.
I am trying to click on my program on 'Next Page'. The 'Next Page' button is an onclick event that reads like this ...
onclick = "javascript: WebForm_DoPostBackWithOptions (New WebForm_PostBackOptions (& quot; ctl00 $ ContentPlaceHolder1 $ ucTaxQueueListView $ lviewOrderQueue $ DataPager2 $ Ctl00 $ btnNextPage & amp; quot ;, & amp; quot; & amp; quot ;, Truth, & amp; quot ;, & quot;, & amp; quot; & amp; quot ;, False, False)) "
In my C # program, I'm using the HttpWebRequest class and HTMLAgilityPack to my request / finish respectively.
All I can do is try in my code and try to get it to work. The only thing to work on is to use the filler to make a copy of the postdate and paste that verbatim into my webravquest function. This is very impractical when I probably have to go to 1000 'next page'.
I also remove ViewState from the page and using that, but it always gives me an 'error' page. Have tried.
Any help or guidance will be appreciated and compensation will also be ... My boss wants to complete this project at the end of this week !!!
The last time I had to do a project like this, I took a very different approach.
I used the Greasamkey - although you can use the html
file with the same effect -
and I run the grayscopy script and the pages are one-by-one Let me move forward one by one. DoPostBack
I just assumed the handler applied click on the appropriate elements.
I was going to store many data.
A datagram has covered every menu item that I "clicked" to avoid duplication of things.
Another datastore page was a raw HTML (taken by body.innerHTML
)
Once I had cloned all the pages, I To load the saved page and to write the Greek-Monkey script, and whatever I want to close it. I am making a third datastore of resources (images and CSS) and then pulled with small pictures that were piped in QRL.
Comments
Post a Comment