Exemple #1
0
        public bool CheckPin(string command)
        {
            bool isValid = false;

            if (IsExclude(command))
            {
                return(true);
            }

            string backup = console.GetPrompt();

            console.SetPrompt("Please type in the current PIN code: ");
            console.IgnoreNextInput();
            console.HideNextInput();
            string input = console.ReadLine();

            if (input == pin)
            {
                isValid = true;
            }
            else
            {
                logger.Log("Invalid Pin!", VLogger.LogLevel.error);
            }

            console.SetPrompt(backup);
            return(isValid);
        }
Exemple #2
0
        /// <summary>
        /// Create all MITM related dumps (you can configure them in the dump_manager menu)
        /// </summary>

        public void CreateDumps()
        {
            if (dump != null && dump.Started)
            {
                if (dump.Dir == "")
                {
                    dump.DefineDirectory(Application.StartupPath + "\\dumps");
                }
                dump.AddFile("parameter_dump.txt", "mitm_parameter_store", false);
                dump.AddFile("cookie_dump.txt", "mitm_cookie_store", false);
                dump.AddFile("url_dump.txt", "mitm_url_store", false);
            }
            else
            {
                logger.Log("Dump Manager is not available!", VLogger.LogLevel.error);
            }
        }
Exemple #3
0
 public X509Certificate2 GetCert(string hostName)
 {
     try
     {
         if (File.Exists("certs\\" + hostName + ".pfx") && UseCASign)
         {
             return(new X509Certificate2("certs\\" + hostName + ".pfx", "password"));
         }
         else if (File.Exists("certs\\general.pfx") && !UseCASign)
         {
             return(new X509Certificate2("certs\\general.xcer"));
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     {
         logger.Log("Failed to get the certificate:\r\n" + ex.ToString(), VLogger.LogLevel.error);
         return(null);
     }
 }