⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssh1util.cs

📁 Granados是一个基于.NET的SSH客户端库。同时支持SSH1和SSH2。实现了AES, Blowfish, TripleDES, RSA, DSA等加密验证算法。实现TCP协议连接。
💻 CS
字号:
/* ---------------------------------------------------------------------------
 *
 * Copyright (c) Routrek Networks, Inc.    All Rights Reserved..
 * 
 * This file is a part of the Granados SSH Client Library that is subject to
 * the license included in the distributed package.
 * You may not use this file except in compliance with the license.
 * 
 * ---------------------------------------------------------------------------
 */
using System;
using Routrek.SSHC;

namespace Routrek.SSHCV1
{
	public class SSHServerInfo {
		public byte[] anti_spoofing_cookie;
		public int    server_key_bits;
		public BigInteger server_key_public_exponent;
		public BigInteger server_key_public_modulus;
		public int        host_key_bits;
		public BigInteger  host_key_public_exponent;
		public BigInteger  host_key_public_modulus;

		internal SSHServerInfo(SSHDataReader reader) {
			anti_spoofing_cookie = reader.Read(8); //first 8 bytes are cookie
			
			server_key_bits = reader.ReadInt32();
			server_key_public_exponent = reader.ReadMPInt();
			server_key_public_modulus = reader.ReadMPInt();
			host_key_bits = reader.ReadInt32();
			host_key_public_exponent = reader.ReadMPInt();
			host_key_public_modulus = reader.ReadMPInt();
		}

	}
	public enum PacketType {
		SSH_MSG_DISCONNECT = 1,
		SSH_SMSG_PUBLIC_KEY = 2,
		SSH_CMSG_SESSION_KEY = 3,
		SSH_CMSG_USER = 4,
		SSH_CMSG_AUTH_RSA = 6,
		SSH_SMSG_AUTH_RSA_CHALLENGE = 7,
		SSH_CMSG_AUTH_RSA_RESPONSE = 8,
		SSH_CMSG_AUTH_PASSWORD = 9,
		SSH_CMSG_REQUEST_PTY = 10,
		SSH_CMSG_WINDOW_SIZE = 11,
		SSH_CMSG_EXEC_SHELL = 12,
		SSH_CMSG_EXEC_CMD = 13,
		SSH_SMSG_SUCCESS = 14,
		SSH_SMSG_FAILURE = 15,
		SSH_CMSG_STDIN_DATA = 16,
		SSH_SMSG_STDOUT_DATA = 17,
		SSH_SMSG_STDERR_DATA = 18,
		SSH_CMSG_EOF = 19,
		SSH_SMSG_EXITSTATUS = 20,
		SSH_MSG_CHANNEL_OPEN_CONFIRMATION = 21,
		SSH_MSG_CHANNEL_OPEN_FAILURE = 22,
		SSH_MSG_CHANNEL_DATA = 23,
		SSH_MSG_CHANNEL_CLOSE = 24,
		SSH_MSG_CHANNEL_CLOSE_CONFIRMATION = 25,
		SSH_CMSG_PORT_FORWARD_REQUEST = 28,
		SSH_MSG_PORT_OPEN = 29,
		SSH_MSG_IGNORE = 32,
		SSH_CMSG_EXIT_CONFIRMATION = 33,
		SSH_MSG_DEBUG = 36
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -