HEX
Server: LiteSpeed
System: Linux pl-rocket-da1.hostsila.org 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: etorby24eu (1588)
PHP: 8.3.23
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //opt/node_api/node_api.py
#!/usr/bin/python3
import os
import re
import json
from flask import request, url_for, abort
from flask_api import FlaskAPI, status, exceptions

app = FlaskAPI(__name__)

@app.before_request
def limit_remote_addr():
        if request.remote_addr not in ( '194.28.84.9', '91.223.223.89', '176.241.143.3', '79.143.42.245', '185.67.1.84', '178.74.235.62'):
                    abort(403)  # Forbidden

@app.route("/info/drive_info", methods=['GET'])
def wearout():
        return os.popen("/opt/node_api/wearout.hook").read()

@app.route("/info/backup", methods=['GET'])
def backup():
    stream = os.popen("mount | grep /backup | awk {'print$1'}")
    output = stream.readlines()
    if output:
        stream = os.popen('df -h | grep ' + output[0].rstrip() + ' | awk {\'print$5\'}')
        output = stream.readlines()
        return output[0].rstrip().replace('%', '')

@app.route("/info/backup_local", methods=['GET'])
def backup_local():
            return os.popen("/opt/node_api/backup.hook_shared.v2").read()

if __name__ == "__main__":
    app.run(debug=True,host='0.0.0.0')