LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-09-2007, 04:27 PM   #1
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Question Slackware 11 (1DVD version) - intercept and modify HTTP requests.


Hello!
I have a specific closed-source (a traffic compression utility) program, that communicate with remote machine via TCP using tunnels. The only acceptable way for me to establish tunnel is to establish it through external http proxy-server.
Unfortunately, this program tries to use "CONNECT" with a port that proxy doesn't allow to use with "CONNECT". I'd like to intercept HTTP requests generated by that program and modify them. I'd like to use (if possible) only utilities included in original distribution (1DVD). I've already written program that (sometimes ) does what I need, but I'd like to know if there is more "sane" way to do this.
I've searched man pages, the only possible solution was iptables, but it (most likely, but I'm not sure) can't modify data, only redirect it to another address/port and this is not a solution since requests are sent through the proxy, not directly to the target IP.

Here are more details:
1) Program generates only one type of HTTP requests: "CONNECT xyz.xyz.net:8081 HTTP/1.1\r\n\r\n". It never sends any other type of requests. Only "CONNECT" requests and never anything else.

2) To make this request work with my proxy-server I need to replace it with "CONNECT xyz.xyz.net:443 HTTP/1.1\r\n\r\n".

3) Upon arrival of positive answer program will immediately establish tunnel on that port and will begin sending|receiving data. That means, that redirection utility must be able to handle tunnels...

4) It looks like squid isn't included in my distribution.

5) There is no way to replace the traffic compression utility with something else. (I just don't know about any similar utilities with same quality)

6) I can post a source code for my own utility that redirects traffic, if this is necessary to make clear what i need/what i'm talking about...

That's all. How can this be done without writing my own programs?

P.S. I apologize for any language errors in this message. English is not my native language.
 
Old 03-09-2007, 09:41 PM   #2
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
I think WebScarab might work ... try it out and tell the result!

search google for OWASP / WebScarab
 
Old 03-15-2007, 03:12 AM   #3
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Original Poster
Rep: Reputation: 62
Quote:
Originally Posted by duryodhan
I think WebScarab might work ... try it out and tell the result!

search google for OWASP / WebScarab
I've tried WebScarab, but (it looks like) it doesn't intercept CONNECT requests (no such method on Proxy pages). And it doesn't work without X (I'd like to start both programs(compressor (it works without X) and "redirector") as a in background during system startup.)

Is there any other way? Like inserting filter into iptables (looks like it's possible to write a separate module or something like this)

I'm looking for small highly specialized utility (can't download a lot right now), or for some small C++ program (with source code) that supports tunnels and can be easily adapted for this task...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
forward all HTTP requests to the proxy cccc Linux - Networking 2 10-01-2006 06:42 PM
Can't get my http server to respond to requests... garydamm Linux - Networking 9 01-16-2005 10:00 AM
Help! (I'm getting flooded with http requests) rknoesel Mandriva 6 11-14-2004 05:57 PM
capture http requests at squid ssharma_02 Linux - Networking 1 09-26-2004 09:04 AM
log full, raw http requests chr15t0 Linux - General 0 01-03-2003 04:35 PM


All times are GMT -5. The time now is 10:28 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration