mirror of
https://github.com/sbrl/bin.git
synced 2018-01-10 21:33:46 +00:00
Add quickshare
This commit is contained in:
parent
96bc93b9b8
commit
65e46360dc
2 changed files with 24 additions and 0 deletions
|
@ -31,6 +31,7 @@ Here's a list of the most interesting ones, along with what they do and where th
|
||||||
- [commacd](https://github.com/shyiko/commacd) - A faster way to move around.
|
- [commacd](https://github.com/shyiko/commacd) - A faster way to move around.
|
||||||
- drop_pagecache - A quick script I wrote to drop the linux page cache.
|
- drop_pagecache - A quick script I wrote to drop the linux page cache.
|
||||||
- [hastebin](https://gist.github.com/flores/3670953) - A [hastebin](http://hastebin.com/) CLI.
|
- [hastebin](https://gist.github.com/flores/3670953) - A [hastebin](http://hastebin.com/) CLI.
|
||||||
|
- [quickshare](https://github.com/netham91/Quick-Share) - A quick way to share files via HTTP.
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
I don't own many of the tools in this repository. If you are an owner of one of these tools and I haven't linked to you, please let me know as I probably forgot.
|
I don't own many of the tools in this repository. If you are an owner of one of these tools and I haven't linked to you, please let me know as I probably forgot.
|
||||||
|
|
23
quickshare
Executable file
23
quickshare
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#! /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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue