472,119 Members | 2,101 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

Monitoring/intercepting http traffic for a particular site

Hi,

I'm new to Python and here is the task I want to execute using python:

I'm trying to monitor the http requests send by a client to a particular server
say xxx.com.
I'm interested in a particular URL which the client sends.
I don't want to make any explicit requests to the server but just want to
watch what all being is sent. so I want to establish a connection to the server
and then monitor/intercept the requests/response to/from the server over a certain amount of time. In a way trying to sniff over the network.
How can I use httplib methods to acheive this? Any help is appreciated.
Jul 20 '07 #1
7 5644
bartonc
6,596 Expert 4TB
Sound like malicious mischief to me. Any other opinions or counter points?
Jul 20 '07 #2
Motoma
3,237 Expert 2GB
Hi,

I'm new to Python and here is the task I want to execute using python:

I'm trying to monitor the http requests send by a client to a particular server
say xxx.com.
I'm interested in a particular URL which the client sends.
I don't want to make any explicit requests to the server but just want to
watch what all being is sent. so I want to establish a connection to the server
and then monitor/intercept the requests/response to/from the server over a certain amount of time. In a way trying to sniff over the network.
How can I use httplib methods to acheive this? Any help is appreciated.
There are already programs to do this. Could you explain why you want to do it in Python?
Jul 23 '07 #3
There are already programs to do this. Could you explain why you want to do it in Python?
I need the script/program to work on all three platforms which our product supports: windows/linux and mac
so I wanted to do it in python.
Jul 27 '07 #4
I need the script/program to work on all three platforms which our product supports: windows/linux and mac
so I wanted to do it in python.
As of now, I'm using network sniffers to do this, but that requires manual intervention and automating this would releive me from doing this atleast twice a day across all three platforms.
Jul 27 '07 #5
Motoma
3,237 Expert 2GB
As of now, I'm using network sniffers to do this, but that requires manual intervention and automating this would releive me from doing this atleast twice a day across all three platforms.
tethereal was not sufficient for scripting with?
Jul 27 '07 #6
tethereal was not sufficient for scripting with?
I'm using fiddler to do this, but I have never did scripting with these tools
and I ideally want to do this just with Python (using the default libraries or some extension modules.) so its easy to maintain by any python-familiar person in the team. so I'm wondering if this can be done using urllib,httplib and socket modules?
Aug 1 '07 #7
Motoma
3,237 Expert 2GB
I'm using fiddler to do this, but I have never did scripting with these tools
and I ideally want to do this just with Python (using the default libraries or some extension modules.) so its easy to maintain by any python-familiar person in the team. so I'm wondering if this can be done using urllib,httplib and socket modules?
Yes, but you will need to use the pycap libraries as well.

Honestly though, tethereal provides amazing access (which could easily be scripted in python) to all of the sorts of things you are trying to do. Please do a little research before choosing the tool you use (we will have to answer your future questions after all ;))
Aug 1 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

13 posts views Thread by Scott Hathaway | last post: by
6 posts views Thread by Randal | last post: by
1 post views Thread by MarkWH | last post: by
3 posts views Thread by Webbee | last post: by
2 posts views Thread by Matthew Thorley | last post: by
7 posts views Thread by mojtaba_danai | last post: by
reply views Thread by origami.takarana | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.