Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

1 Answer

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.

share|improve this answer
    
It would be alot simpler if I knew Perl :) –  Adrian A. Jan 25 '11 at 0: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 1:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.