Exemple #1
0
        static void Main(string[] args)
        {
            if (args.Length == 2 || args.Length == 1)
            {
                if (args[0] == "export")
                {
                    CredentialManager.ExportCredential(args[1]);
                }

                if (args[0] == "exportAll")
                {
                    CredentialManager.ExportAllCredentials();
                }

                if (args[0] == "import")
                {
                    CredentialManager.RestoreCredential(args[1]);
                }

                if (args[0] == "importFile")
                {
                    CredentialManager.RestoreCredential(args[1], true);
                }

                if (args[0] == "list")
                {
                    CredentialManager.EnumerateCrendentials();
                }
            }
            else
            {
                Console.WriteLine("CloneVault.exe list");
                Console.WriteLine("CloneVault.exe export <application name>");
                Console.WriteLine("CloneVault.exe exportAll");
                Console.WriteLine("CloneVault.exe import <JSON string>");
                Console.WriteLine("CloneVault.exe importFile <JSON file>");
            }
        }
Exemple #2
0
 static void WriteCred(string name, string username, byte[] password, string comment)
 {
     CredentialManager.WriteCredential(name, username, password, comment);
 }