I have a server which will act as a proxy, using squid. My goal is to have something replace outgoing data. I tried ettercap, no luck whatsoever. The idea is, whatever-will-replace-data needs to run alongside with squid on the same box. Any ideas of a good ettercap replacement ? Or how would I go about using ettercap with squid on the same box ?
Asked
Active
Viewed 2,113 times
2 Answers
1
If you're using squid that implies you're talking about HTTP. But you're trying to modify the contents at the stram level - if you try to do this at the packet level, that means that you need to build your own TCP stack to decompose/resompose the HTTP stream, then implement your own HTTP stack on top of that before you can get acces to the data!
Wouldn't it be a lot simpler to use the TCP and HTTP stacks already available in squid and the OS? Here's a simple example of how to modify content using squid.
![](../../users/profiles/35483.webp)
symcbean
- 19,931
- 1
- 29
- 49
-
It would be alot simpler if I knew Perl :) – Adrian A. Jan 25 '11 at 00:56
-
You can write a url redirector in any language you like - it reads URLs on stdin, then outputs the modified version on stdout - the one I referenced just happens to download the content and modify it before pointing the request to the local copy. – symcbean Jan 25 '11 at 10:51
-
All the solutions above refer to the URL, and none to the actual content injection. – Adrian A. Jan 29 '11 at 01:15