403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/rdp.py
"""
Manage RDP Service on Windows servers
"""


def __virtual__():
    """
    Load only if network_win is loaded
    """
    if "rdp.enable" in __salt__:
        return "rdp"
    return (False, "rdp module could not be loaded")


def enabled(name):
    """
    Enable the RDP service and make sure access to the RDP
    port is allowed in the firewall configuration
    """
    ret = {"name": name, "result": True, "changes": {}, "comment": ""}

    stat = __salt__["rdp.status"]()

    if not stat:
        if __opts__["test"]:
            ret["result"] = None
            ret["comment"] = "RDP will be enabled"
            return ret

        ret["result"] = __salt__["rdp.enable"]()
        ret["changes"] = {"RDP was enabled": True}
        return ret

    ret["comment"] = "RDP is enabled"
    return ret


def disabled(name):
    """
    Disable the RDP service
    """
    ret = {"name": name, "result": True, "changes": {}, "comment": ""}

    stat = __salt__["rdp.status"]()

    if stat:
        if __opts__["test"]:
            ret["result"] = None
            ret["comment"] = "RDP will be disabled"
            return ret

        ret["result"] = __salt__["rdp.disable"]()
        ret["changes"] = {"RDP was disabled": True}
        return ret

    ret["comment"] = "RDP is disabled"
    return ret

Youez - 2016 - github.com/yon3zu
LinuXploit