/// <summary> /// Constructor /// </summary> /// <param name="secChannel">secure channel</param> /// <param name="autoHandle">Whether it is an auto handle connection</param> public RdpemtClient(ISecureChannel secChannel, bool autoHandle = true) : base(secChannel, autoHandle) { bandwidthMeasureStartTime = DateTime.Now; bandwidthMeasurePayloadByteCount = 0; detectBandwidth = false; }
/// <summary> /// Constructor /// </summary> /// <param name="secChannel">secure channel</param> /// <param name="autoHandle">Whether it is an auto handle connection</param> public RdpemtClient(ISecureChannel secChannel, bool autoHandle = true) : base(secChannel, autoHandle) { bandwidthMeasureStartTime = DateTime.Now; bandwidthMeasurePayloadByteCount = 0; detectBandwidth = false; }
private void LoadKeyCommand(ISecureChannel session, string description, byte keySlot, LoadKeyCommand.KeyType keyType, LoadKeyCommand.Persistence persistence, LoadKeyCommand.Transmission transmission, LoadKeyCommand.KeyLength keyLength, string key) { var loadKeyCommand = new Readers.AViatoR.Components.LoadKeyCommand(); string input = loadKeyCommand.GetApdu(keySlot, keyType, persistence, transmission, keyLength, key); string output = session.SendCommand(input); ConsoleWriter.Instance.PrintCommand(description + key, input, output); }
public static void ReadBinaryiClassCommand(ISecureChannel secureChannel, string description, ReadBinaryCommand.ReadOption readOption, byte blockNumber, byte expectedlength, BookNumber book = BookNumber.Book0, PageNumber page = PageNumber.Page0) { var readBinaryCommand = new Readers.AViatoR.Components.ReadBinaryCommand(); string input = readBinaryCommand.GetiClassReadApdu(readOption, blockNumber, expectedlength, book, page); string output = secureChannel.SendCommand(input); ConsoleWriter.Instance.PrintCommand(description + "0x" + blockNumber.ToString("X2"), input, output); }
public static void GeneralAuthenticateiClass(ISecureChannel secureChannel, string description, BookNumber book, PageNumber page, GeneralAuthenticateCommand.ImplicitSelection implicitSelection, GeneralAuthenticateCommand.iClassKeyType keyType, byte keySlot) { var generalAuthenticateCommand = new Readers.AViatoR.Components.GeneralAuthenticateCommand(); string input = generalAuthenticateCommand.GetiClassApdu(book, page, implicitSelection, keyType, keySlot); string output = secureChannel.SendCommand(input); ConsoleWriter.Instance.PrintCommand(description + keySlot.ToString("X2"), input, output); }
public static void UpdateBinaryCommand(ISecureChannel secureChannel, string description, UpdateBinaryCommand.Type type, byte blockNumber, string data) { var updateBinaryCommand = new UpdateBinaryCommand(); string input = updateBinaryCommand.GetApdu(Readers.AViatoR.Components.UpdateBinaryCommand.Type.Plain, blockNumber, data); string output = secureChannel.SendCommand(input); ConsoleWriter.Instance.PrintCommand(description + "0x" + blockNumber.ToString("X2"), input, output); }
public static void UpdateBinaryCommand(ISecureChannel secureChannel, string description, UpdateBinaryCommand.Type type, byte blockNumber, string data) { var updateBinaryCommand = new UpdateBinaryCommand(); string input = updateBinaryCommand.GetApdu(Readers.AViatoR.Components.UpdateBinaryCommand.Type.Plain, blockNumber, data); string output = secureChannel.SendCommand(input); Console.WriteLine($"0x{blockNumber.ToString("X2")} Input: {input} Output: {output}"); }
/// <summary> /// Constructor /// </summary> /// <param name="secChannel"></param> /// <param name="autoHandle"></param> public RdpemtTransport(ISecureChannel secChannel, bool autoHandle = true) { this.autoHandle = autoHandle; if (secChannel != null) { this.secureChannel = secChannel; this.secureChannel.Received += ReceiveBytes; } receiveBuffer = new List<BasePDU>(); decoder = new RdpemtDecoder(); }
/// <summary> /// Constructor /// </summary> /// <param name="secChannel"></param> /// <param name="autoHandle"></param> public RdpemtTransport(ISecureChannel secChannel, bool autoHandle = true) { this.autoHandle = autoHandle; if (secChannel != null) { this.secureChannel = secChannel; this.secureChannel.Received += ReceiveBytes; } receiveBuffer = new List <BasePDU>(); decoder = new RdpemtDecoder(); }
/// <summary> /// Constructor /// </summary> /// <param name="secChannel">secure channel</param> /// <param name="autoHandle">Whether it is an auto handle connection</param> public RdpemtClient(ISecureChannel secChannel, bool autoHandle = true) : base(secChannel, autoHandle) { Initialize(); }
/// <summary> /// Constructor /// </summary> /// <param name="secChannel">secure channel</param> /// <param name="autoHandle">Whether it is an auto handle connection</param> public RdpemtServer(ISecureChannel secChannel, bool autoHandle = true) : base(secChannel, autoHandle) { }
/// <summary> /// Constructor /// </summary> /// <param name="secChannel">secure channel</param> /// <param name="autoHandle">Whether it is an auto handle connection</param> public RdpemtServer(ISecureChannel secChannel, bool autoHandle = true) : base(secChannel, autoHandle) { }