文件下載服務(wù):
python3 -m http.server 8888
寫個簡易腳本后臺運行捕透,文件內(nèi)容如上檀葛。
nohup ./share.sh >> share.log 2>&1 &
文件上傳服務(wù):
安裝模塊
pip install droopy
下載啟動腳本
wget http://stackp.online.fr/wp-content/uploads/droopy
運行服務(wù)隙咸,默認(rèn)8000端口
python ./droopy -m "now can upload file"
將上述命令寫成腳本后臺運行
nohup bash droopy.sh >> droopy.log 2>&1 &
當(dāng)然也能指定端口:
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