I am trying to write a Perl application to monitor data on a password protected web site. I am using the Perl & LWP book by Sean Burke as a reference. The website uses a https: login page to get a user id/pin. Once logged in one can navigate around and get various kinds of information that is occasionally updated. The problem that I am having is that I am not getting past the login page. Let's say that the address of the login page URL is " The HTML for this page contains a form specification that includes
<form name="loginform" method="post" action="
It also includes Java script, which I am not too familiar with, and one text and password element for the user id & pin. Note the difference in the name of the site (".../login2.asp") vs. the site listed in the action (".../login.asp"). When I try to send a post request to the login2.asp site, I just get the HTML from that site back as a response. I am clearly not effectively attempting to login because I can try it both with a valid and an invalid user id and get the same results (and I know that an invalid user id when manually supplied in a browser causes the site to send HTML that looks different).
One of the things that the Burke book says is that there can be problems when working with a site that contains Java Script because it isn't always clear what the proper form data to submit is. Maybe this is what is going on in my case. What would be helpful is (1) some sort of eavesdropping program that could monitor the traffic between my normal (non Perl) browser and the site so that I could see what 'correct' post request really looks like; (2) the ability to get at the cookies that the site uses to keep track of a user session - that way I could log on manually and then start Perl with the proper Cookie file to keep the session going. I am currently using either IE or FireFox as a browser. However, the Burke book says that Perl can only read NetScape cookies (but the book was written a while ago).
I'm fairly new to this sort of thing, so there may be other ways to handle this better. I'd appreciate any ideas on what to do.
<form name="loginform" method="post" action="
It also includes Java script, which I am not too familiar with, and one text and password element for the user id & pin. Note the difference in the name of the site (".../login2.asp") vs. the site listed in the action (".../login.asp"). When I try to send a post request to the login2.asp site, I just get the HTML from that site back as a response. I am clearly not effectively attempting to login because I can try it both with a valid and an invalid user id and get the same results (and I know that an invalid user id when manually supplied in a browser causes the site to send HTML that looks different).
One of the things that the Burke book says is that there can be problems when working with a site that contains Java Script because it isn't always clear what the proper form data to submit is. Maybe this is what is going on in my case. What would be helpful is (1) some sort of eavesdropping program that could monitor the traffic between my normal (non Perl) browser and the site so that I could see what 'correct' post request really looks like; (2) the ability to get at the cookies that the site uses to keep track of a user session - that way I could log on manually and then start Perl with the proper Cookie file to keep the session going. I am currently using either IE or FireFox as a browser. However, the Burke book says that Perl can only read NetScape cookies (but the book was written a while ago).
I'm fairly new to this sort of thing, so there may be other ways to handle this better. I'd appreciate any ideas on what to do.