473,761 Members | 3,187 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ISO simple debugging sniffer for HTTP

Hi everybody,

I'm looking for a very simple HTTP debugging sniffer in Python--
hopefully 200 lines of less--that allows me to write simple methods to
inspect requests and responses. It would ideally work like this:

sniffer = SimpleHttpDebug gingSniffer(act ual_host_addres s,
actual_host_por t)
sniffer.listeni ng_port = SOME_PORT_ON_MY _DESKTOP
sniffer.inbound _inspector = some_method_i_w rite
sniffer.outboun d_inspector = some_other_meth od_i_write
sniffer.run()

I would launch it from a Linux desktop terminal and use it help debug
a Java application I'm maintaining that uses an opaque library to hit
an opaque service. I can configure the client app to connect to the
sniffer, and apart from inspecting packets, I just want it to pass
data along to the real server. I'm not using any complicated part of
the HTTP protocol--it's mostly simple request, simple response, but
the payloads are not plain text, so I need some Python code to make
sense of them.

I've googled a bit, and I've come up with a lot of noise, so I'm
hoping some one can point me in the direction of some simple code that
they have confidence in, which is free and all that good stuff.

Thanks,

Steve
Sep 16 '08 #1
0 1069

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1300
by: Gavin Bauer | last post by:
My DOS window (running in windows ME) closes the second it finishes running my programs. As you can imagine, this makes it hard to see the results. I've gotten in the habit of putting raw_input("Press enter to exit") at the end of every program, and in addition to being pain in the butt, it often fails to work. Being new to programming in general, I make more mistakes than most people. My programs often have errors before they get to my...
12
2039
by: AMC | last post by:
Hi, I need to code an asp based browser sniffer. It needs to detect if a browser can support css and if not redirect to a different site. Does anyone have sample code that does this? thx
5
3176
by: David Baker | last post by:
Hi all I am very new to ASP.Net. I am trying to create a sniffer for our program. We want our users to click our sniffer and hopefully the sniffer will check their computer against our requirements. I would like to ask experts like you to see which items are actually doable with ASP.Net. Below I listed all of the items we are looking for but I can understand if some of the items are impossible to check/sniff. We would like to create a sniffer...
2
3086
by: Laurent Laporte | last post by:
hello, I'm using cvs standard module under Python 2.3 / 2.4 to read a CSV file. The file is opened in binary mode, so I keep the end of line terminator. It appears that the csv.Sniffer force the line terminator to be '\r\n'. It's fine under Windows but wrong under Linux or Macintosh.
2
8567
by: kali | last post by:
this is kali a new member to this forum.. iam an undergrad studd and wrking with a opacket sniffer to capture data transmitted using a hardware... the file saved in the sniffer is a binary file with the following format: the first bytes is the packet count the enxt bytes are time stamp the next bytes is payload.. iam interested in decoding or rather parsing the time stamp which is in microseconds. any help in the form a C code wud be...
4
2196
by: cHacker | last post by:
Hello, there are some ICQ sniffers available on Internet, i am curious about how to get ICQ talk(text)? someone has any idea to get the icq talks(texts)? thanks
4
4705
by: chazzy69 | last post by:
Hello i am a little new c++, i know most of the basics now and im interest in making a sniffer for my router to see any and all connections made to the router from the outside world, my router does not log connections. First i was wondering if it is possible to make a sniffer from inside a network to log connections to a router from outside the network. Also the sniffer would have to work off either ip address or mac address. Second if...
3
3661
by: haribuvanesh | last post by:
Im working with a packet sniffer program and i get following exception on compilation. Plz help me out.... Exception in thread "main" java.lang.Error: Unresolved compilation problem: The method loopPacket(int, PacketReceiver) in the type JpcapCaptor is not applicable for the arguments (int, JpcapTip)
6
28872
kenobewan
by: kenobewan | last post by:
Congratulations! You are one of the few who realise that over 80% of errors are simple and easy to fix. It is important to realise this as it can save a lot of time. Time that could be wasted making unnecessary changes, that in turn can cause further problems. Programming is a humbling experience. An experience that causes one to reflect on human error. One major cause of these errors is syntax, syntax, syntax. We tend not to notice when we...
0
9353
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10123
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...
1
9909
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
8794
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7342
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6623
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
5241
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...
3
3481
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2765
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.