Ejemplo n.º 1
0
        /// <summary>
        /// Constructs a NS record by reading bytes from a return message
        /// </summary>
        /// <param name="pointer">A logical pointer to the bytes holding the record</param>
        public SshFP(Pointer pointer)
        {
            //detect algorithm
            byte a = pointer.ReadByte();
            switch(a)
            {
                case 0: this.algorithm = "Reserved"; break;
                case 1: this.algorithm = "RSA"; break;
                case 2: this.algorithm = "DSS"; break;
                default: this.algorithm = "Unknown"; break;
            }

            //detect fingerprint type
            byte fpt = pointer.ReadByte();
            switch(fpt)
            {
                case 0: this.fingerPrintType = "Reserved"; break;
                case 1: this.fingerPrintType = "RSA-1"; break;
                default: this.fingerPrintType = "Unknown"; break;
            }

            this.fingerPrint = pointer.ReadString();	//read the fingerprint (hex format)
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructs a NS record by reading bytes from a return message
 /// </summary>
 /// <param name="pointer">A logical pointer to the bytes holding the record</param>
 public Txt(Pointer pointer, int length)
 {
     pointer.ReadByte();	//ignore first (NULL) byte
     text = pointer.ReadString(length - 1);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructs a HINFO record by reading bytes from a return message
 /// </summary>
 /// <param name="pointer">A logical pointer to the bytes holding the record</param>
 public HInfo(Pointer pointer)
 {
     this.cpu = pointer.ReadString();
     this.os = pointer.ReadString();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructs a NS record by reading bytes from a return message
 /// </summary>
 /// <param name="pointer">A logical pointer to the bytes holding the record</param>
 public MInfo(Pointer pointer)
 {
     this.ownerMailbox = pointer.ReadString();
     this.errorMailbox = pointer.ReadString();
 }