public void BitLockerListingTest() { IBLVMServer server = new IBLVMServer(new SessionControl()); server.Bind(new IPEndPoint(IPAddress.Any, 47859)); server.Listen(5); server.Start(); IBLVMClient client = new IBLVMClient(); client.Connect(new IPEndPoint(AccessIP, 47859)); while (client.Status != (int)ClientSocketStatus.Connected) { ; } client.Login("Test", "Test"); while (client.Status != (int)ClientSocketStatus.LoggedIn) { ; } IBLVMManager manager = new IBLVMManager(); manager.Conncet(new IPEndPoint(IPAddress.Loopback, 47859)); client.Dispose(); server.Dispose(); }
public void IVExchangeTest() { IBLVMServer server = new IBLVMServer(new SessionControl()); server.Bind(new IPEndPoint(IPAddress.Any, 47860)); server.Listen(5); server.Start(); IBLVMClient client = new IBLVMClient(); client.Connect(new IPEndPoint(AccessIP, 47860)); while (client.Status != (int)ClientSocketStatus.Connected) { ; } client.Login("Test", "Test"); while (client.Status != (int)ClientSocketStatus.LoggedIn) { ; } client.ExchangeIV(); byte[] nextIV = client.CryptoProvider.NextIV; while (!nextIV.SequenceEqual(client.CryptoProvider.CryptoStream.IV)) { ; } client.Dispose(); server.Dispose(); }
public void DeviceListingTest() { bool isEndable = false; IBLVMServer server = new IBLVMServer(new SessionControl()); server.Bind(new IPEndPoint(IPAddress.Any, 40001)); server.Listen(5); server.Start(); IBLVMClient client = new IBLVMClient(); client.Connect(new IPEndPoint(AccessIP, 40001)); while (client.Status != (int)ClientSocketStatus.Connected) { ; } client.Login("1234", "1234"); while (client.Status != (int)ClientSocketStatus.LoggedIn) { ; } IBLVMManager manager = new IBLVMManager(); manager.Conncet(new IPEndPoint(AccessIP, 40001)); while (manager.Status != (int)ClientSocketStatus.Connected) { ; } manager.Login("1234", "1234"); while (manager.Status != (int)ClientSocketStatus.LoggedIn) { ; } manager.OnDevicesReceived += (a) => { foreach (var device in a) { Console.WriteLine(device.ToString()); } isEndable = true; }; manager.GetDeviceList(); while (manager.Status != (int)ClientSocketStatus.LoggedIn || !isEndable) { ; } server.Dispose(); manager.Dispose(); }
void ConnectClient(IPEndPoint address) { IBLVMClient client = new IBLVMClient(); client.Connect(address); while (client.Status != (int)ClientSocketStatus.Connected) { ; } client.Login("1234", "1234"); while (client.Status != (int)ClientSocketStatus.LoggedIn) { ; } }
public void HandshakeTest() { IBLVMServer server = new IBLVMServer(new SessionControl()); server.Bind(new IPEndPoint(IPAddress.Any, 47857)); server.Listen(5); server.Start(); IBLVMClient client = new IBLVMClient(); client.Connect(new IPEndPoint(AccessIP, 47857)); while (client.Status != (int)ClientSocketStatus.Connected) { ; } client.Dispose(); server.Dispose(); }
static void Main(string[] args) { while (true) { try { IBLVMClient client = new IBLVMClient(); Console.WriteLine("Please enter server address."); client.Connect(new IPEndPoint(IPAddress.Parse(Console.ReadLine()), 54541)); while (client.Status != (int)ClientSocketStatus.Connected) { ; } Login(client); Console.WriteLine("Successfully logged in!"); client.Receiver.Join(); } catch (Exception) { continue; } } }