Exemple #1
0
            public bool RequestBitLockerUnlock(IDevice device, DriveInformation drive, string password)
            {
                BitLockerControlEventArgs args = new BitLockerControlEventArgs(device, drive, false, password);

                BroadcastBitLockerControl(args);

                return(args.IsSuccess);
            }
Exemple #2
0
            public bool RequestBitLockerLock(IDevice device, DriveInformation drive)
            {
                BitLockerControlEventArgs args = new BitLockerControlEventArgs(device, drive, true);

                BroadcastBitLockerControl(args);

                return(args.IsSuccess);
            }
Exemple #3
0
        private void Broadcaster_BroadcastBitLockerControl(BitLockerControlEventArgs args)
        {
            if (Status == (int)SocketStatus.LoggedIn && device.Type == ClientType.Device && args.Device.Account.Id == device.Account.Id)
            {
                if (args.Lock)
                {
                    Utils.SendPacket(SocketStream, PacketFactory.CreateServerBitLockerLockRequest(args.Drive));
                }
                else
                {
                    Utils.SendPacket(SocketStream, PacketFactory.CreateServerBitLockerUnlockRequest(args.Drive, args.Password, CryptoProvider));
                }

                messageQueue.Wait(PacketType.ClientBitLockerCommandResponse);
                args.IsSuccess = (bool)messageQueue.Dequeue().Payload;
            }
        }