This is our old Q&A Site. Please post any new questions and answers at

I am trying to automate the process of getting the nine digit zip code from the US Postal service web site (

To do so I need the message sent when I click on the Submit button at that site. Is this a facility provided by WireShark?



asked 29 Nov '10, 08:07

Jim's gravatar image

accept rate: 0%

No, Wireshark cannot script the retrieval process for you. That is something you might do using wget or some other tool that fetches web pages. Wireshark can help you to get the wget request right though: capture a manual search that works, and then work with the wget parameters until your automated request matches the manual one when you capture it. This should then give you the results as you need them.

You might look into something like "wget --post-data [your query parameters]", because the web page expects the form to be submitted by POST operation. Good luck :-)

permanent link

answered 29 Nov '10, 09:07

Jasper's gravatar image

Jasper ♦♦
accept rate: 18%

Thanks Jasper. I'm not sure I make myself clear--my bad.

I have no trouble fetching web pages for which I have the url. My problem is feeding the USPS the info that is sent via the SUBMIT button on their site. I need to know what it is that I should POST to the USPS site: url "" so that that site will return the 9 digit zip code--actually the himl source code from which I can parse out the zip code.

Is that a little clearer?


(29 Nov '10, 09:31) Jim

Yes, it is. This is what you can use Wireshark for, which is what I meant by capturing manual search: start Wireshark, capture on the network card that you are going to use to fetch the web page manually, and after you run the manual process, stop the capture. Then you need to find the POST request that you made to the page, for example by filtering for http.request.method=="POST". You should then be able to find the packet containing your POST request. Take a look at the decode of that packet: in the last section you can unfold the details of your request, including all name/value pairs.

(29 Nov '10, 13:02) Jasper ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 29 Nov '10, 08:07

question was seen: 6,681 times

last updated: 29 Nov '10, 13:02

p​o​w​e​r​e​d by O​S​Q​A