23
Feb
11

Upside-Down-Ternet

Well, for some time now I’ve wanted to recreate the ‘Upside-Down-Ternet‘ from pete@ex-parrot (reference) but the process used squid to handle the proxying and I didn’t want to install and configure (even if it’s only basic config) squid.

So I was looking for an alternative. I knew that I could create a relatively simple proxy with perl or python and had started the code with perl, where I was using HTTP::Proxy and adding filters. The problem was that the proxy reported the content as chunked. And I found no way to undo this. I tried to add the complete filter, to just pass complete contents to my custom filter but I wasn’t successful sending the modified image to the client. I even asked at perlmonks but no significative answer was left(only one actually answer at all, by the time of this writing).

I started reading the source of an existing webproxy project in perl, which was implemented at a lower level. So I tried that. I created a web server and a lwp agent in my script, and connected the requests to the agent. It worked!

After some tinkering and threading the script  I got something quite decent, but not very stable… Just good enough.

Features:

  • flips images(upside-down-ternet)
  • substitutes images for one image file
  • blurs images
  • runs a custom convert(imagemagick) command

The script is available here.

Note: I thought of setting as a sf project, but this script is so insignificant…and unstable… I have another proxy project going however, that may go into sf. Who knows…

Note2: If used as a prank, it is interesting to redirect automatically the traffic from another pc to yours and act as a proxy. The iptables part should be present in pete@ex-parrot. For the redirecting I’d use arpspoofing. Google it.


0 Responses to “Upside-Down-Ternet”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


The Author

Older Ramblings

Tweets

Linux User Sig

%d bloggers like this: