Skip to content

Commit

Permalink
ProtonPass: dump all vault entries (ref #117)
Browse files Browse the repository at this point in the history
  • Loading branch information
detunized committed Jun 25, 2024
1 parent 605776a commit 92fc87c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions example/ProtonPass/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,42 @@ public static void Main(string[] args)
config["password"],
new AsyncTextUi(),
new AsyncPlainStorage()).GetAwaiter().GetResult();

Console.WriteLine("Vault: {0}\n" +
"Description: {1}\n" +
"Accounts: ({2})\n",
vault.Name,
vault.Description,
vault.Accounts.Length);

for (var i = 0; i < vault.Accounts.Length; ++i)
{
var account = vault.Accounts[i];

Console.WriteLine("\n" +
"{0}:\n" +
" id: {1}\n" +
" name: {2}\n" +
" email: {3}\n" +
" username: {4}\n" +
" password: {5}\n" +
" totp: {6}\n" +
" note: {7}\n" +
" urls: ({8})",
i + 1,
account.Id,
account.Name,
account.Email,
account.Username,
account.Password,
account.Totp,
account.Note,
account.Urls.Length);

for (var j = 0; j < account.Urls.Length; ++j)
Console.WriteLine(" {0}: {1}", j + 1, account.Urls[j]);
}

}
catch (BaseException e)
{
Expand Down

0 comments on commit 92fc87c

Please sign in to comment.