Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Visit www.teamopenfire.com
- import SimpleHTTPServer
- import SocketServer
- print "\n\n\t|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
- print "\t||||| |||||"
- print "\t||||| |||||"
- print "\t||||| Coded By Ajith KP:::Coded By Ajith KP |||||"
- print "\t||||| |||||"
- print "\t||||| snakebite@achayans.com snakebite@achayans.com |||||"
- print "\t||||| www.suckthetech.blogspot.com |||||"
- print "\t|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
- port=80
- def do_GET(srvr):
- try:
- files=open(curdir+sep+srvr.path)
- srvr.send_response(200)
- srvr.wfile.write(filehandle())
- files.close
- return
- except(IOError):
- srvr.send_error(404, "Not Found",srvr.path)
- try:
- srvr=SimpleHTTPServer.SimpleHTTPRequestHandler
- srvr=SocketServer.TCPServer(("",port),srvr)
- print "Server Started at localhost:80"
- srvr.serve_forever()
- except(KeyboardInterrupt):
- print "Sever Shutdowning"
- except(SystemExit):
- print "Force Exit"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement