Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Thursday, January 11, 2007

Welcome to the launch of IIIT LAN Browser 1.0 and FuckProxy 0.2

So all my readers( thats only me, I guess :P But isn't this blog meant for me only?) , I did some good work in this winter vacation. I released FuckProxy 0.2, the upgrade for the old 0.1 and made a new firefox extension IIIT LAN Browser. See my post here that kind of advertises it :D

This is the change log for FuckProxy 0.2:
1. Fixed a few bugs.
2. Added better support for ftp.
3. Added auto-update feaure.
4. Changed the position of FP Button as the previous position was interfering with the toolbars of delicious,etc.
5. Now typing "http" in the address bar is not a compulsion.

IIIT LAN Browser is an extension for the LAN Browser CGI proxy I had earlier. It provides the same functionality but much more easier to use now. Apart from that its much much more robust. The earlier version used to throw errors on half of the sites because of bad parsing. But this one does not parses at all. It directly uses the DOM Tree generated by firefox! So no problem at all. I guess no CGI proxy in world would have as robust parsing as this one.(Well if I dont't parse at all and use Firefox's work, then obviously it will be robust :P ).
I also added login functionality so that only iiitians can use it. You need to enter your 200 login and password to use it. Have fun...

PS: I have been always saying "PHP sucks, Python rocks". But looks like its not so true. However good python may be, but when it comes to making sites, PHP has the greatest no. of functionalities available. Python does not even have basic Session support!

Friday, November 03, 2006

One Alternative down

Out of the two alternatives that I came out with in my last post, the second one is down.
I searched for ways to how to change the url just before it is fetched. But could not find satisfying solutions.
But the first option is still alive. In fact, I got a few promising solutions. This site lists a few http proxy servers that have been made in python that do not need superuser privileges. The one that I downloaded requires python 2.4 and our 200 is still in the old age of 2.3. So I will have to select some other one. Lets see...
And yes FuckProxy is on its way. Its almost complete.

TechnoratiTechnorati: , , , , ,

Thursday, November 02, 2006

Server Side 301, 302 HTTP Response Header Redirect in python

Today while working on my FuckProxy project, I got totally frustrated while writing the code for 301 redirect http response header in python.
PHP has this small and easy to use code for it:-

header('HTTP/1.1 301 Moved Permanently');
header('Location: '.$location);
But for python no such function exists. Moreover I spent 2-3 hrs on net searching for it. But there was no exact answer. Finally by several hit-and-trials and using the information collected from net, I could do it:-
print "Status: 301"
print "Location: " + location
print
sys.exit(1)
Of course, you must include sys using "import sys" statement.
For 302 (temporary redirect) just replace 301 to 302 in above code.
Thats it.
Done!!

TechnoratiTechnorati: , ,