Пример #1
0
        public static void Profiles(string pathApp, string pathData)
        {
            if (Engine.Instance.Elevated != null)
            {
                string owner = Environment.UserName;

                Elevated.Command command = new Elevated.Command();
                command.Parameters["command"]   = "compatibility-profiles";
                command.Parameters["path-app"]  = pathApp;
                command.Parameters["path-data"] = pathData;
                command.Parameters["owner"]     = owner;
                command.DoSync();
            }
        }
Пример #2
0
        public static void Init()
        {
            if (m_torDetection)
            {
                return;
            }

            Elevated.Command c = new Elevated.Command();
            c.Parameters["command"] = "tor-get-info";

            c.Parameters["name"] = "tor";
            string customPath = Engine.Instance.Storage.Get("proxy.tor.path");

            if (customPath != "")
            {
                c.Parameters["path"] = customPath;
            }
            c.Parameters["username"] = Environment.UserName;

            string torInfo = Engine.Instance.Elevated.DoCommandSync(c);

            foreach (string line in torInfo.Split('\n'))
            {
                if (line.StartsWithInv("Name:"))
                {
                    m_torProcessName = line.Substring("Name:".Length);
                }
                if (line.StartsWithInv("Path:"))
                {
                    m_torProcessPath = line.Substring("Path:".Length);
                }
                if (line.StartsWithInv("CookiePath:"))
                {
                    m_torCookiePath = line.Substring("CookiePath:".Length);
                }
                if (line.StartsWithInv("CookiePasswordHex:"))
                {
                    m_torCookiePassword = ExtensionsString.HexToBytes(line.Substring("CookiePasswordHex:".Length));
                }
            }

            m_torDetection = true;
        }
Пример #3
0
 public static void WindowsRemoveTask()
 {
     Elevated.Command command = new Elevated.Command();
     command.Parameters["command"] = "compatibility-remove-task";
     command.DoSync();
 }