Solved

Is a request more than headers and get/post data?

Posted on 2003-11-29
3
237 Views
Last Modified: 2008-02-01
There is a specific website with a lot of information. I want that information in my database.
The information on that site is organized as follows:

You start at one (the 1st) of the Main pages. From each Main page, you can click to the next Main page, or to one of the ten Sub pages belonging to that Main Page.

From each Sub page, you can click to one of its ten Leaf pages. The leaf pages contain the information I want.

When I said "click", I actually meant "submitting a form". Whereever you submit, you are always submitting the same form to the same location (an aspx file, don't know what that is), only the submitted data differs. This means that you can get any Main, Sub or Leaf page by submitting the same form, only the hidden data differs.
(I think it's no use trying to understand the data, because one important hidden value is 12k of alphanumerical characters and plus signs).

My first attempt, I think it's a dead end:
open the 1st Main page in a frame, change it's content and submit the form using javascript. Problem: For browser security reasons this won't work. Maybe it's possible to get the content from screen using Windows functions (in Delphi or C), please let me know if you know how.

Second attempt:
Save one of the pages on my hard disk. Change it's form.action so that it works correctly.
(This is a check that I can still get to any of the pages manually).
Now, change its action so that it posts to my PHP file. In the PHP, display $_REQUEST and $_SERVER. Use the $_REQUEST data to post using a library called Snoopy, sending the headers from $_SERVER using Snoopy's rawheader variable. (i remove the HOST and CONNECTION headers).

There are basically 3 things that can happen when you post the form:
1. You get the page you wanted
2. You get an error indicating that the submitted data or headers or whatever is malformed (it's always exactly the same error). it's a runtime error of the content management system application.
3. You get the 1st main page, which means that the data was not that malformed.

Posting with Snoopy, I can get the Main and Subpages, but when trying to access a leaf page I get happening 3.

This means that there is a difference between posting the above data and posting the form on my local drive by clicking on it with a mouse, although as I described I caught the headers and posted data from the mouse click and sent that almost exactly. Does this mean there's more information than Headers and Posted data?

I think the problem is not in Snoopy, which can be downloaded at http://sourceforge.net using the search form on the left.
0
Comment
Question by:alberthendriks
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
petoskey-001 earned 255 total points
ID: 9877304
It's probably setup like this to prevent the very thing your trying to achieve - the download of their databases.  For instance the Kelly Blue Book does something like this when searching for the value of a car.  It would be hard to automate, and they could also have something on their site to only allow a certain user a few hundred uses per day.

They could use Javascript to create hidden input variables, or modify the cookie info.  This would let them check that a real client with Javascript turned on was running.  Can you give us the URL of the site your looking at?
0
 
LVL 7

Expert Comment

by:petoskey-001
ID: 10429801
Do you still need help with this?
0
 
LVL 2

Author Comment

by:alberthendriks
ID: 10430021
It was difficult because it uses sessions. We worked it around the dirty way by creating a Windows macro that mouseclicks to all the data and copy-pastes it into a database.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article discusses four methods for overlaying images in a container on a web page
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now