1
0
Fork 0
mirror of https://github.com/sbrl/bin.git synced 2018-01-10 21:33:46 +00:00
bin/quickshare

24 lines
495 B
Text
Raw Permalink Normal View History

2016-07-05 17:51:01 +00:00
#! /usr/bin/env python
import SimpleHTTPServer
import SocketServer
import socket
import sys
try:
PORT=int(raw_input('Enter Port Number or Simply press Enter/Return :'))
except ValueError:
PORT = 8000
Host = socket.gethostbyname(socket.gethostname())
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("", PORT), Handler)
print "\n Your folder is Quickshared on : ", Host+":"+str(PORT)
print "\n Use Ctrl+C to stop sharing"
httpd.serve_forever()