CURL doesn't seem to behave correctly here

I am trying to execute the following command in my shell:

curl -b usptoCookies -L -d "patentNum = 6836866 & applicationNum = 10007391 & maintFeeAction = Get + Bibliographic + Data & maintFeeYear = 04" https://ramps.uspto.gov/eram/getMaintFeesInfo.do;jsessionIIq=0000:NmdD1Qmb_YsD9

Pretty hard. It is trying to post multiple variables to the form. You can see the webpage here: https://ramps.uspto.gov/eram/

Try to enter the patent number and application number as: 6836866 and 10007391. Then click the Get Bibliographic Data button.

The web page is returning stuff (a "neatly" formatted table), but the curl call seems to be having "some" problems. I'm at a loss. I used firebug in the browser to confirm that the three vars above are all it takes to fill out the form post.

This is not a problem with https, because I am returning a response. I need help.

Anyone?

Shahib Roshan

0


source to share


2 answers


This form has a bunch of other hidden fields, including the "signature". It seems like every time you request a page there is some kind of unique string. This is probably a function used to ensure that you don't clear all information from your database.



When I released the hidden signature field, it returned an error. If you want to write a program to extract this information, you probably have to do something a little more complicated and get the "signature" page first so you can send that value back to the site to get the correct answer.

+2


source


I thought this might be the case, so on one of my paper clips, I fired the content onto a page that I could open in my browser. This allowed me to manipulate form elements and resubmit to see if removing some of the hidden fields would affect the message. When I opened the page and removed all hidden fields (including sessionId, signature, and load time), I could still submit the form to get a valid response.

Thinking this might indicate some cookie or session related issue, I activated Selenium (via the Testing_Selenium package) and tried to do the same. The idea was that since Selenium is actually using a real browser, any session / cookie issue should be fixed.

When the Selenium run failed as well as curl, I was at my end.



I was hoping that someone would see something strange or unusual on this page that might explain the failure.

Thanks for your input, what do you think?

Shaheeb R.

0


source







All Articles