|Do you know where your variables are?|
Yes, but the thing is that i can't use a proxy for this. The only thing I can do is intercept the packets.
I take it that you mean you cannot reconfigure the clients to direct their queries to the proxy explicitly. This does not prevent you using software that provides easy access to the HTTP protocol layer and HTML documents therein.
Software that allows you to intercept relevant packets on the network and manipulate the communications protocols without configuration of the clients are sometimes called "transparent" or "intercepting" proxies.
You can do this with ettercap but there are other packages that provide easier access to the HTTP protocol layer. There are Perl modules that do this and many other applications, as ikegami has pointed out in Re: Packet editing.
There are Perl modules that provide rich features for inspecting and modifying HTTP protocol communications and HTML documents.
There are intercepting proxies that are not written in Perl that provide access to the HTTP protocol and HTML documents and may provide better performance than you could achieve with Perl. Wikipedia has links to some of these.
The squid proxy is popular and I have successfully used it many times. It can be used as an intercepting proxy, though I have not used it to manipulate the HTML myself. But, as noted previously, there are many others that you might investigate.
I suggest that you cannot create a reasonably competent proxy to manipulate HTML documents in HTTP protocol streams by manipulation of individual IP packets, whether with ettercap or any other packet filtering software. You will have better results with less effort if you start with a better tool.