Exemplo n.º 1
0
        public override void Deactivation()
        {
            base.Deactivation();

            // Restore system rules
            SystemShell s = new SystemShell();

            s.Path = m_pfctlPath;
            s.Arguments.Add("-v");
            s.Arguments.Add("-f");
            s.Arguments.Add(SystemShell.EscapePath("/etc/pf.conf"));
            s.Run();

            if (m_filePfConf != null)
            {
                m_filePfConf.Close();
                m_filePfConf = null;
            }

            if (m_prevActive)
            {
            }
            else
            {
                SystemShell.Shell1(m_pfctlPath, "-d");
            }
        }
Exemplo n.º 2
0
        public override void Deactivation()
        {
            base.Deactivation();

            // Restore system rules
            Exec("pfctl -v -f \"/etc/pf.conf\"");

            if (m_filePfConf != null)
            {
                m_filePfConf.Close();
                m_filePfConf = null;
            }

            if (m_prevActive)
            {
            }
            else
            {
                Exec("pfctl -d");
            }
        }