473,597 Members | 2,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Monitoring/intercepting http traffic for a particular site

7 New Member
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 5807
bartonc
6,596 Recognized Expert Expert
Sound like malicious mischief to me. Any other opinions or counter points?
Jul 20 '07 #2
Motoma
3,237 Recognized Expert Specialist
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
deepthi82
7 New Member
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
deepthi82
7 New Member
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 Recognized Expert Specialist
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
deepthi82
7 New Member
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 Recognized Expert Specialist
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

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

Similar topics

13
3954
by: Scott Hathaway | last post by:
I want to write an NT service that will intercept any outgoing smtp traffic, like Norton Antivirus does. Can anyone tell me how I can do something like this in Python? I do not know how to intercept the outgoing traffic, specifically. Any help is greatly appreciated. Thanks, Scott
6
6217
by: Randal | last post by:
Does anyone have a code sample of how one would "listen" to a TCP/IP session between an application on the local machine and a remote host. I'm looking for code that would allow me to specify a local IP and a local port which is already in use by another application (outside of my control) and simply watch the traffic. I know there are open source packet analyzers available
1
5561
by: MarkWH | last post by:
I am writing a simple reverse proxy using .Net. The basic design is to capture all traffic (from all URL's) in an HttpHandler and the respond accordingly. The problem is that I when a URL is received that contains a "`" character I get the exception listed above; and the call stack listed below. Questions; 1) Where can I find more documentation on the FileChangesMonitor class?
3
2783
by: Webbee | last post by:
What would be the recommended way to monitor a high traffic message queue? I need to import data from the que into another program via the other programs API. When a message is added to the que I want it read by my app and then the app will take care of the rest. I read about triggers but is running my .exe a whole lot the best way to do this? Should I use a timmer and have my program poll the que at set time intervals? Also, what is...
2
1249
by: Matthew Thorley | last post by:
Greetings, I have a question I hope some one with more back ground can give me a little help with. I want to write a simple internet monitoring script for windows that watches out bound http traffic and keeps a list of all the site visited. I am thinking that I might be able to use pywin32 and COM to listen on open ports (e.g. 80) and watch for http headers. But I'm not sure if there is a better way to do it.
5
2391
by: Björn Olsson | last post by:
Hello All. If I where to capture network traffic, dropping packets and modifying packets. I.e write firewall functionality. Which API or SDK would be the correct choice? I would prefer to do it in .net. Do I have to use the DDK package or is there any other way? Im quite lost here. --
7
4345
by: mojtaba_danai | last post by:
Hi Hope that some one can help with the following. I wish to write a Visual C++ program, which monitors 3-4 other services (process/programs also written in VC++). The program shall monitor, if the other processes are alive and to see, if they are sending heartbeat messages. I wish to do this for exampel via socket programming. Can any one tell me, the structure og guideline for this?
0
1325
by: mystraightroad | last post by:
hello, i am very new to sockets and finding it far from easy. Please treat me like a complete idiot when replying :-) When I use a program like httplook I get a whole lot of GET statements like: GET http://www.whatever.com/graphics/logo.gif 200 ok
0
1207
by: origami.takarana | last post by:
Dear Reader, Designing for Detection ---------------------------- - Get the right equipment from the start. Make sure all of the features you need, or will need, are available from the start. - Know your environment. Identify potential physical barriers and
0
7970
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8381
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5434
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3886
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3930
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2404
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1241
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.