UPnpLOAD - Dead simple file upload through UPnP routers
Your local files, world accessible from a simple URL.
- Give a file, get a URL.
- Limit number of downloads per-file.
- No storage backend needed.
All you need is your router/wifi UPnP capable (most are), and of course, it must be enabled.
$ upnpload hello.txt world.txt http://220.127.116.11:18182/hello.txt http://18.104.22.168:18182/world.txt
Each file can be downloaded only once. Use -n to increase this value.
The same as before, but with some nice messages.
$ upnpload hello.txt world.txt -v ---> searching for UPnP router/wifi... http://192.168.1.1:1780/control?WANIPConnection (IP_Routed) ---> serving files: http://22.214.171.124:63457/hello.txt http://126.96.36.199:63457/world.txt ---> GET /hello.txt from 188.8.131.52:52402 184.108.40.206 - - [08/Oct/2012 10:02:58] "GET /hello.txt HTTP/1.1" 200 - ---> file hello.txt served, 0 left ---> GET /world.txt from 220.127.116.11:52403 18.104.22.168 - - [08/Oct/2012 10:03:22] "GET /world.txt HTTP/1.1" 200 - ---> file world.txt served, 0 left ---> all files upload
$ sudo wget https://raw.github.com/caruccio/upnpload/master/upnpload -O /usr/local/bin/upnpload $ sudo chmod +x /usr/local/bin/upnpload
- Python >= 2.6
$ upnpload -h usage: upnpload [-h] [-e PORT] [-i PORT] [-p PORT] [-n COUNT] [-c CONTENT-TYPE] [-l] [-v] [FILE [FILE ...]] Dead simple file upload through UPnP routers positional arguments: FILE File(s) to serve optional arguments: -h, --help show this help message and exit -e PORT, --ext-port PORT External port to listen for incoming connection -i PORT, --int-port PORT Internal port to listen for incoming connection -p PORT, --port PORT Both ports to listen for incoming connection -n COUNT How many times to serve each file -c CONTENT-TYPE Force content-type -l List active mappings and exit -v Print stuff
Of course, this method has some security issues.
Based on idea from geturl.