Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wireshark does not capture python POST request

I have a python script which triggers a http POST request using standard libraries. I'm trying to view and debug the requests content by capturing in wireshark.

The request is sucesfull because I recieve the correct server response. In wireshark I listen on all available interfaces but cannot find the request.

I have also tried some filtering options like http filter but the request was still not found.

I have Ubuntu installed and the server host is not localhost

How can I find the request?

like image 530
Jacob Avatar asked Mar 11 '15 09:03

Jacob


1 Answers

You are unable to capture HTTP POST request because you are using Wireshark http filters. Do not filter traffic with HTTP filters, instead of that use website/URL IP address.

I have just tried to filter the traffic with the help of Wireshark and found that I can filter it with the help of IP address.

Refer below link, https://www.w3schools.com/python/ref_requests_post.asp

enter image description here

enter image description here

Use Filter : "ip.addr==192.229.133.221"

enter image description here

I can filter the packets, but its TCP encrypted traffic and we cannot get additional information without decryption.

enter image description here

Refer below answer, it will help you to find the IP address of your URL.

How to use filters in the wireshark?

If you are not comfortable with it, use “Microsoft Network Monitor” tool. It shows applications name along with IP address and ports.

enter image description here

Once you know the IP address and ports used, you can filter the traffic with the help of Wireshark easily.

Note:- I will suggest instead of "Wireshark" or "Microsoft Network Monitor”, please use fiddler. Refer below link,

How to capture Visual Studio Code traffic through Fiddler?

like image 125
Prasad 14723312 Avatar answered Nov 02 '22 17:11

Prasad 14723312