文件下载服务:
python3 -m http.server 8888
写个简易脚本后台运行,文件内容如上。
nohup ./share.sh >> share.log 2>&1 &
文件上传服务:
安装模块
pip install droopy
下载启动脚本
wget http://stackp.online.fr/wp-content/uploads/droopy
运行服务,默认8000端口
python ./droopy -m "now can upload file"
将上述命令写成脚本后台运行
nohup bash droopy.sh >> droopy.log 2>&1 &
当然也能指定端口:
Usage: droopy [options] [PORT]
Options:
-h, --help show this help message and exit
-d DIRECTORY, --directory DIRECTORY set the directory to upload files to
-m MESSAGE, --message MESSAGE set the message
-p PICTURE, --picture PICTURE set the picture
–dl provide download links
–save-config save options in a configuration file
–delete-config delete the configuration file and exit