public MainShellViewModel() { TopMenu = new ObservableCollection <UserControl>(); TopMenu.Add(new TopMenu()); subscriber = new Subscriber(); mITMServiceProxy = new MITMServiceProxy(NetTcpBindingCreator.Create()); try { subscriber.Subscribe(); } catch (Exception e) { } subscriber.publishConnectionInfoEvent += ConnectionInfoChanged; subscriber.publishAnalogInputChangeEvent += AnalogInputChanged; ConnectionInfoChanged(mITMServiceProxy.GetConnectionInfo()); ARPSpoofParticipantsInfo aRPSpoofParticipantsInfo = mITMServiceProxy.GetARPSpoofParticipants(out bool isAttack); if (isAttack) { lock (Database.lockObject) { Database.ARPSpoofParticipantsInfo = aRPSpoofParticipantsInfo; Database.IsAttack = true; } } }
public DNP3ExtensionViewModel() { Position = ShellPosition.CENTER; AnalogInputPoints = new ObservableCollection <AnalogInputPoint>(); mITMServiceProxy = new MITMServiceProxy(NetTcpBindingCreator.Create()); foreach (AnalogInputPoint analog in Database.AnalogInputPoints.Values) { AnalogInputPoints.Add(analog); } }
public ARPSpoofViewModel() { mITMServiceProxy = new MITMServiceProxy(NetTcpBindingCreator.Create()); hostsList = new ObservableCollection <Host>(); hosts = new Dictionary <string, Host>(); hostsIPends = new List <byte>(); target1 = string.Empty; target2 = string.Empty; CheckIfAttack(); }