public override ECheck Check() { NetworkSniffer s = null; try { //if (!SystemHelper.IsAdministrator()) // WriteError("Require admin rights"); IPayloadSniffer pay = (IPayloadSniffer)Payload; if (!pay.Check()) { return(ECheck.Error); } s = new NetworkSniffer(Interface); s.Start(); return(ECheck.Ok); } catch { return(ECheck.Error); } finally { if (s != null) { s.Dispose(); } } }
public override ECheck Check() { NetworkSniffer s = null; try { if (!SystemHelper.IsAdministrator()) { WriteError("Require admin rights"); } if (!DumpFolder.Exists) { WriteError("DumpFolder must exists"); return(ECheck.Error); } s = new NetworkSniffer(LocalAddress); s.Filter = new SnifferPortFilter(this.LocalPort); s.Start(); return(ECheck.Ok); } catch { return(ECheck.Error); } finally { if (s != null) { s.Dispose(); } } }