1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 21:33:27 +00:00

[PM-18668] Create importer for xml files from Password Depot 17 (#14760)

* Create importer for xml file from Password Depot 17

- Create importer
- Create test data
- Create unit tests

* Add support for parsing credit cards

* Update comment on importer class

* Wire up the importer to be selectable in the UI

* Import and set favorites based on export file

* Refactor: Extract method for parsing login fields

* Parse comment on credit cards

* Add support for parsing identity records

* Add support for parsing rdp records

* Remove html decoding of password field

* Include setting credit card brand

* Create type to describe the different source item types

* Add support for SoftwareLicense item type

* Add support for teamviewer item type

* Add support for Putty item type

* Skip processing historical entries

* Add support for banking item type

* Add support for information item type

* Add support for certificate into login type

* Rename encrypted-file.xml to noop-encrypted-file due to a source type with the same name

* Add support for encrypted file item type

* Add support for document type

* Add mapping of source field types to bitwarden custom field types

* Remove duplicate code (copy-pasta mistake)

* Added missing docs

* Adding fallback to support MacOS Password Depot 17 xml files

Instead of a version node they have a dataformat node which contains the file format version

* Add support to parse export files from the MacOS client

* Skip creating a folder if it has no name

* Fix recognition and assignment to folders/collections

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
Daniel James Smith
2025-07-01 15:52:04 +02:00
committed by GitHub
parent 5639668d3f
commit 6b627502be
31 changed files with 3133 additions and 0 deletions

View File

@@ -435,6 +435,12 @@
and select Export items &rarr; Enter your Master Password and select Continue. &rarr; Save
the CSV file on your device.
</ng-container>
<ng-container *ngIf="format === 'passworddepot17xml'">
On the desktop application, go to Tools &rarr; Export &rarr; Enter your master password
&rarr; Select XML Format (*.xml) as Export format &rarr; Click on next &rarr; Choose which
entries should be included in the export &rarr; Click on next to export into the location
previously chosen.
</ng-container>
</bit-callout>
<import-lastpass
*ngIf="showLastPassOptions"

View File

@@ -42,6 +42,7 @@ export { PassmanJsonImporter } from "./passman-json-importer";
export { PasspackCsvImporter } from "./passpack-csv-importer";
export { PasswordAgentCsvImporter } from "./passwordagent-csv-importer";
export { PasswordBossJsonImporter } from "./passwordboss-json-importer";
export { PasswordDepot17XmlImporter } from "./password-depot";
export { PasswordDragonXmlImporter } from "./passworddragon-xml-importer";
export { PasswordSafeXmlImporter } from "./passwordsafe-xml-importer";
export { PasswordWalletTxtImporter } from "./passwordwallet-txt-importer";

View File

@@ -0,0 +1 @@
export { PasswordDepot17XmlImporter } from "./password-depot-17-xml-importer";

View File

@@ -0,0 +1,62 @@
import {
MacOS_MultipleFolders,
MacOS_PasswordDepotXmlFile,
MacOS_WrongVersion,
} from "../spec-data/password-depot-xml";
import { PasswordDepot17XmlImporter } from "./password-depot-17-xml-importer";
describe("Password Depot 17 MacOS Xml Importer", () => {
it("should return error with invalid export version", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(MacOS_WrongVersion);
expect(result.errorMessage).toBe(
"Unsupported export version detected - (only 17.0 is supported)",
);
});
it("should not create a folder/collection if the group fingerprint is null", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(MacOS_PasswordDepotXmlFile);
expect(result.folders.length).toBe(0);
});
it("should create folders and with correct assignments", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(MacOS_MultipleFolders);
// Expect 10 ciphers, 5 without a folder and 3 within 'folder macos' and 2 with 'folder 2'
expect(result.ciphers.length).toBe(10);
expect(result.folders.length).toBe(2);
expect(result.folders[0].name).toBe("folder macos");
expect(result.folders[1].name).toBe("folder 2");
// 3 items within 'folder macos'
expect(result.folderRelationships[0]).toEqual([5, 0]);
expect(result.folderRelationships[1]).toEqual([6, 0]);
expect(result.folderRelationships[2]).toEqual([7, 0]);
//2 items with 'folder 2'
expect(result.folderRelationships[3]).toEqual([8, 1]);
expect(result.folderRelationships[4]).toEqual([9, 1]);
});
it("should parse custom fields from a MacOS exported file", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(MacOS_PasswordDepotXmlFile);
const cipher = result.ciphers.shift();
expect(cipher.name).toBe("card 1");
expect(cipher.notes).toBe("comment");
expect(cipher.card).not.toBeNull();
expect(cipher.card.cardholderName).toBe("some CC holder");
expect(cipher.card.number).toBe("4242424242424242");
expect(cipher.card.brand).toBe("Visa");
expect(cipher.card.expMonth).toBe("8");
expect(cipher.card.expYear).toBe("2028");
expect(cipher.card.code).toBe("125");
});
});

View File

@@ -0,0 +1,496 @@
// This import has been flagged as unallowed for this class. It may be involved in a circular dependency loop.
// eslint-disable-next-line no-restricted-imports
import { CollectionView } from "@bitwarden/admin-console/common";
import { FieldType, SecureNoteType } from "@bitwarden/common/vault/enums";
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
import { CipherType } from "@bitwarden/sdk-internal";
import {
EncryptedFileData,
InvalidRootNodeData,
InvalidVersionData,
CreditCardTestData,
MissingPasswordsNodeData,
PasswordTestData,
IdentityTestData,
RDPTestData,
SoftwareLicenseTestData,
TeamViewerTestData,
PuttyTestData,
BankingTestData,
InformationTestData,
CertificateTestData,
EncryptedFileTestData,
DocumentTestData,
} from "../spec-data/password-depot-xml";
import { PasswordDepot17XmlImporter } from "./password-depot-17-xml-importer";
describe("Password Depot 17 Xml Importer", () => {
it("should return error with missing root tag", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(InvalidRootNodeData);
expect(result.errorMessage).toBe("Missing `passwordfile` node.");
});
it("should return error with invalid export version", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(InvalidVersionData);
expect(result.errorMessage).toBe(
"Unsupported export version detected - (only 17.0 is supported)",
);
});
it("should return error if file is marked as encrypted", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(EncryptedFileData);
expect(result.errorMessage).toBe("Encrypted Password Depot files are not supported.");
});
it("should return error with missing passwords node tag", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(MissingPasswordsNodeData);
expect(result.success).toBe(false);
expect(result.errorMessage).toBe("Missing `passwordfile > passwords` node.");
});
it("should parse groups nodes into folders", async () => {
const importer = new PasswordDepot17XmlImporter();
const folder = new FolderView();
folder.name = "tempDB";
const actual = [folder];
const result = await importer.parse(PasswordTestData);
expect(result.folders).toEqual(actual);
});
it("should parse password type into logins", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(PasswordTestData);
const cipher = result.ciphers.shift();
expect(cipher.type).toEqual(CipherType.Login);
expect(cipher.name).toBe("password type");
expect(cipher.notes).toBe("someComment");
expect(cipher.login).not.toBeNull();
expect(cipher.login.username).toBe("someUser");
expect(cipher.login.password).toBe("p6J<]fmjv!:H&iJ7/Mwt@3i8");
expect(cipher.login.uri).toBe("http://example.com");
});
it("should parse any unmapped fields as custom fields", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(PasswordTestData);
const cipher = result.ciphers.shift();
expect(cipher.type).toBe(CipherType.Login);
expect(cipher.name).toBe("password type");
expect(cipher.fields).not.toBeNull();
expect(cipher.fields[0].name).toBe("lastmodified");
expect(cipher.fields[0].value).toBe("07.05.2025 13:37:56");
expect(cipher.fields[0].type).toBe(FieldType.Text);
expect(cipher.fields[1].name).toBe("expirydate");
expect(cipher.fields[1].value).toBe("07.05.2025");
expect(cipher.fields[0].type).toBe(FieldType.Text);
expect(cipher.fields[2].name).toBe("importance");
expect(cipher.fields[2].value).toBe("0");
let customField = cipher.fields.find((f) => f.name === "passwort");
expect(customField).toBeDefined();
expect(customField.value).toEqual("password");
expect(customField.type).toEqual(FieldType.Hidden);
customField = cipher.fields.find((f) => f.name === "memo");
expect(customField).toBeDefined();
expect(customField.value).toEqual("memo");
expect(customField.type).toEqual(FieldType.Text);
customField = cipher.fields.find((f) => f.name === "datum");
expect(customField).toBeDefined();
const expectedDate = new Date("2025-05-13T00:00:00Z");
expect(customField.value).toEqual(expectedDate.toLocaleDateString());
expect(customField.type).toEqual(FieldType.Text);
customField = cipher.fields.find((f) => f.name === "nummer");
expect(customField).toBeDefined();
expect(customField.value).toEqual("1");
expect(customField.type).toEqual(FieldType.Text);
customField = cipher.fields.find((f) => f.name === "boolean");
expect(customField).toBeDefined();
expect(customField.value).toEqual("1");
expect(customField.type).toEqual(FieldType.Boolean);
customField = cipher.fields.find((f) => f.name === "decimal");
expect(customField).toBeDefined();
expect(customField.value).toEqual("1,01");
expect(customField.type).toEqual(FieldType.Text);
customField = cipher.fields.find((f) => f.name === "email");
expect(customField).toBeDefined();
expect(customField.value).toEqual("who@cares.com");
expect(customField.type).toEqual(FieldType.Text);
customField = cipher.fields.find((f) => f.name === "url");
expect(customField).toBeDefined();
expect(customField.value).toEqual("example.com");
expect(customField.type).toEqual(FieldType.Text);
});
it("should parse credit cards", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(CreditCardTestData);
const cipher = result.ciphers.shift();
expect(cipher.name).toBe("some CreditCard");
expect(cipher.notes).toBe("someComment");
expect(cipher.card).not.toBeNull();
expect(cipher.card.cardholderName).toBe("some CC holder");
expect(cipher.card.number).toBe("4222422242224222");
expect(cipher.card.brand).toBe("Visa");
expect(cipher.card.expMonth).toBe("5");
expect(cipher.card.expYear).toBe("2026");
expect(cipher.card.code).toBe("123");
});
it("should parse identity type", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(IdentityTestData);
const cipher = result.ciphers.shift();
expect(cipher.name).toBe("identity type");
expect(cipher.notes).toBe("someNote");
expect(cipher.identity).not.toBeNull();
expect(cipher.identity.firstName).toBe("firstName");
expect(cipher.identity.lastName).toBe("surName");
expect(cipher.identity.email).toBe("email");
expect(cipher.identity.company).toBe("someCompany");
expect(cipher.identity.address1).toBe("someStreet");
expect(cipher.identity.address2).toBe("address 2");
expect(cipher.identity.city).toBe("town");
expect(cipher.identity.state).toBe("state");
expect(cipher.identity.postalCode).toBe("zipCode");
expect(cipher.identity.country).toBe("country");
expect(cipher.identity.phone).toBe("phoneNumber");
});
it("should parse RDP type", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(RDPTestData);
const cipher = result.ciphers.shift();
expect(cipher.type).toEqual(CipherType.Login);
expect(cipher.name).toBe("rdp type");
expect(cipher.notes).toBe("someNote");
expect(cipher.login).not.toBeNull();
expect(cipher.login.username).toBe("someUser");
expect(cipher.login.password).toBe("somePassword");
expect(cipher.login.uri).toBe("ms-rd:subscribe?url=https://contoso.com");
});
it("should parse software license into secure notes", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(SoftwareLicenseTestData);
const cipher = result.ciphers.shift();
expect(cipher.type).toEqual(CipherType.SecureNote);
expect(cipher.name).toBe("software-license type");
expect(cipher.notes).toBe("someComment");
expect(cipher.secureNote).not.toBeNull();
expect(cipher.secureNote.type).toBe(SecureNoteType.Generic);
let customField = cipher.fields.find((f) => f.name === "IDS_LicenseProduct");
expect(customField).toBeDefined();
expect(customField.value).toEqual("someProduct");
customField = cipher.fields.find((f) => f.name === "IDS_LicenseVersion");
expect(customField).toBeDefined();
expect(customField.value).toEqual("someVersion");
customField = cipher.fields.find((f) => f.name === "IDS_LicenseName");
expect(customField).toBeDefined();
expect(customField.value).toEqual("some User");
customField = cipher.fields.find((f) => f.name === "IDS_LicenseKey");
expect(customField).toBeDefined();
expect(customField.value).toEqual("license-key");
customField = cipher.fields.find((f) => f.name === "IDS_LicenseAdditionalKey");
expect(customField).toBeDefined();
expect(customField.value).toEqual("additional-license-key");
customField = cipher.fields.find((f) => f.name === "IDS_LicenseURL");
expect(customField).toBeDefined();
expect(customField.value).toEqual("example.com");
customField = cipher.fields.find((f) => f.name === "IDS_LicenseProtected");
expect(customField).toBeDefined();
expect(customField.value).toEqual("1");
customField = cipher.fields.find((f) => f.name === "IDS_LicenseUserName");
expect(customField).toBeDefined();
expect(customField.value).toEqual("someUserName");
customField = cipher.fields.find((f) => f.name === "IDS_LicensePassword");
expect(customField).toBeDefined();
expect(customField.value).toEqual("somePassword");
customField = cipher.fields.find((f) => f.name === "IDS_LicensePurchaseDate");
expect(customField).toBeDefined();
const expectedDate = new Date("2025-05-12T00:00:00Z");
expect(customField.value).toEqual(expectedDate.toLocaleDateString());
customField = cipher.fields.find((f) => f.name === "IDS_LicenseOrderNumber");
expect(customField).toBeDefined();
expect(customField.value).toEqual("order number");
customField = cipher.fields.find((f) => f.name === "IDS_LicenseEmail");
expect(customField).toBeDefined();
expect(customField.value).toEqual("someEmail");
customField = cipher.fields.find((f) => f.name === "IDS_LicenseExpires");
expect(customField).toBeDefined();
expect(customField.value).toEqual("Nie");
});
it("should parse team viewer into login type", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(TeamViewerTestData);
const cipher = result.ciphers.shift();
expect(cipher.type).toEqual(CipherType.Login);
expect(cipher.name).toBe("TeamViewer type");
expect(cipher.notes).toBe("someNote");
expect(cipher.login).not.toBeNull();
expect(cipher.login.password).toBe("somePassword");
expect(cipher.login.username).toBe("");
expect(cipher.login.uri).toBe("partnerId");
const customField = cipher.fields.find((f) => f.name === "IDS_TeamViewerMode");
expect(customField).toBeDefined();
expect(customField.value).toEqual("0");
});
it("should parse putty into login type", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(PuttyTestData);
const cipher = result.ciphers.shift();
expect(cipher.type).toEqual(CipherType.Login);
expect(cipher.name).toBe("Putty type");
expect(cipher.notes).toBe("someNote");
expect(cipher.login).not.toBeNull();
expect(cipher.login.password).toBe("somePassword");
expect(cipher.login.username).toBe("someUser");
expect(cipher.login.uri).toBe("localhost");
let customField = cipher.fields.find((f) => f.name === "IDS_PuTTyProtocol");
expect(customField).toBeDefined();
expect(customField.value).toEqual("0");
customField = cipher.fields.find((f) => f.name === "IDS_PuTTyKeyFile");
expect(customField).toBeDefined();
expect(customField.value).toEqual("pathToKeyFile");
customField = cipher.fields.find((f) => f.name === "IDS_PuTTyKeyPassword");
expect(customField).toBeDefined();
expect(customField.value).toEqual("passwordForKeyFile");
customField = cipher.fields.find((f) => f.name === "IDS_PuTTyPort");
expect(customField).toBeDefined();
expect(customField.value).toEqual("8080");
});
it("should parse banking item type into login type", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(BankingTestData);
const cipher = result.ciphers.shift();
expect(cipher.type).toEqual(CipherType.Login);
expect(cipher.name).toBe("banking type");
expect(cipher.notes).toBe("someNote");
expect(cipher.login).not.toBeNull();
expect(cipher.login.password).toBe("somePassword");
expect(cipher.login.username).toBe("someUser");
expect(cipher.login.uri).toBe("http://some-bank.com");
let customField = cipher.fields.find((f) => f.name === "IDS_ECHolder");
expect(customField).toBeDefined();
expect(customField.value).toEqual("account holder");
customField = cipher.fields.find((f) => f.name === "IDS_ECAccountNumber");
expect(customField).toBeDefined();
expect(customField.value).toEqual("1234567890");
customField = cipher.fields.find((f) => f.name === "IDS_ECBLZ");
expect(customField).toBeDefined();
expect(customField.value).toEqual("12345678");
customField = cipher.fields.find((f) => f.name === "IDS_ECBankName");
expect(customField).toBeDefined();
expect(customField.value).toEqual("someBank");
customField = cipher.fields.find((f) => f.name === "IDS_ECBIC");
expect(customField).toBeDefined();
expect(customField.value).toEqual("bic");
customField = cipher.fields.find((f) => f.name === "IDS_ECIBAN");
expect(customField).toBeDefined();
expect(customField.value).toEqual("iban");
customField = cipher.fields.find((f) => f.name === "IDS_ECCardNumber");
expect(customField).toBeDefined();
expect(customField.value).toEqual("12345678");
customField = cipher.fields.find((f) => f.name === "IDS_ECPhone");
expect(customField).toBeDefined();
expect(customField.value).toEqual("0049");
customField = cipher.fields.find((f) => f.name === "IDS_ECLegitimacyID");
expect(customField).toBeDefined();
expect(customField.value).toEqual("1234");
customField = cipher.fields.find((f) => f.name === "IDS_ECPIN");
expect(customField).toBeDefined();
expect(customField.value).toEqual("123");
customField = cipher.fields.find((f) => f.name === "tan_1_value");
expect(customField).toBeDefined();
expect(customField.value).toEqual("1234");
customField = cipher.fields.find((f) => f.name === "tan_1_used");
expect(customField).toBeDefined();
expect(customField.value).toEqual("12.05.2025 15:10:54");
// TAN entries
customField = cipher.fields.find((f) => f.name === "tan_1_amount");
expect(customField).toBeDefined();
expect(customField.value).toEqual(" 100,00");
customField = cipher.fields.find((f) => f.name === "tan_1_comment");
expect(customField).toBeDefined();
expect(customField.value).toEqual("some TAN note");
customField = cipher.fields.find((f) => f.name === "tan_1_ccode");
expect(customField).toBeDefined();
expect(customField.value).toEqual("123");
customField = cipher.fields.find((f) => f.name === "tan_2_value");
expect(customField).toBeDefined();
expect(customField.value).toEqual("4321");
customField = cipher.fields.find((f) => f.name === "tan_2_amount");
expect(customField).toBeDefined();
expect(customField.value).toEqual(" 0,00");
});
it("should parse information into secure note type", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(InformationTestData);
const cipher = result.ciphers.shift();
expect(cipher.type).toEqual(CipherType.SecureNote);
expect(cipher.name).toBe("information type");
expect(cipher.notes).toBe("some note content");
});
it("should parse certificate into login type", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(CertificateTestData);
const cipher = result.ciphers.shift();
expect(cipher.type).toEqual(CipherType.Login);
expect(cipher.name).toBe("certificate type");
expect(cipher.notes).toBe("someNote");
expect(cipher.login).not.toBeNull();
expect(cipher.login.password).toBe("somePassword");
});
it("should parse encrypted file into login type", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(EncryptedFileTestData);
const cipher = result.ciphers.shift();
expect(cipher.type).toEqual(CipherType.Login);
expect(cipher.name).toBe("encrypted file type");
expect(cipher.notes).toBe("some comment");
expect(cipher.login).not.toBeNull();
expect(cipher.login.password).toBe("somePassword");
});
it("should parse document type into secure note", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(DocumentTestData);
const cipher = result.ciphers.shift();
expect(cipher.type).toEqual(CipherType.SecureNote);
expect(cipher.name).toBe("document type");
expect(cipher.notes).toBe("document comment");
let customField = cipher.fields.find((f) => f.name === "IDS_DocumentSize");
expect(customField).toBeDefined();
expect(customField.value).toEqual("27071");
customField = cipher.fields.find((f) => f.name === "IDS_DocumentFolder");
expect(customField).toBeDefined();
expect(customField.value).toEqual("C:\\Users\\DJSMI\\Downloads\\");
customField = cipher.fields.find((f) => f.name === "IDS_DocumentFile");
expect(customField).toBeDefined();
expect(customField.value).toEqual("C:\\Users\\DJSMI\\Downloads\\some.pdf");
});
it("should parse favourites and set them on the target item", async () => {
const importer = new PasswordDepot17XmlImporter();
const result = await importer.parse(PasswordTestData);
let cipher = result.ciphers.shift();
expect(cipher.name).toBe("password type");
expect(cipher.favorite).toBe(false);
cipher = result.ciphers.shift();
expect(cipher.name).toBe("password type (2)");
expect(cipher.favorite).toBe(true);
cipher = result.ciphers.shift();
expect(cipher.name).toBe("password type (3)");
expect(cipher.favorite).toBe(true);
});
it("should parse groups nodes into collections when importing into an organization", async () => {
const importer = new PasswordDepot17XmlImporter();
importer.organizationId = "someOrgId";
const collection = new CollectionView();
collection.name = "tempDB";
const actual = [collection];
const result = await importer.parse(PasswordTestData);
expect(result.collections).toEqual(actual);
});
});

View File

@@ -0,0 +1,500 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { CipherType, FieldType, SecureNoteType } from "@bitwarden/common/vault/enums";
import { CardView } from "@bitwarden/common/vault/models/view/card.view";
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
import { FieldView } from "@bitwarden/common/vault/models/view/field.view";
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
import { IdentityView } from "@bitwarden/common/vault/models/view/identity.view";
import { LoginView } from "@bitwarden/common/vault/models/view/login.view";
import { SecureNoteView } from "@bitwarden/common/vault/models/view/secure-note.view";
import { ImportResult } from "../../models/import-result";
import { BaseImporter } from "../base-importer";
import { Importer } from "../importer";
import { PasswordDepotItemType, PasswordDepotCustomFieldType } from "./types";
/**
* Importer for Password Depot 17 xml files.
* @see https://www.password-depot.de/
* It provides methods to parse the XML data, extract relevant information, and create cipher objects
*/
export class PasswordDepot17XmlImporter extends BaseImporter implements Importer {
result = new ImportResult();
_favouritesLookupTable = new Set<string>();
// Parse the XML data from the Password Depot export file and extracts the relevant information
parse(data: string): Promise<ImportResult> {
const doc: XMLDocument = this.parseXml(data);
if (doc == null) {
this.result.success = false;
return Promise.resolve(this.result);
}
// Check if the root node is present
const rootNode = doc.querySelector("passwordfile");
if (rootNode == null) {
this.result.errorMessage = "Missing `passwordfile` node.";
this.result.success = false;
return Promise.resolve(this.result);
}
// Check if the version is supported
const headerNode = this.querySelectorDirectChild(rootNode, "header");
if (headerNode == null) {
this.result.success = false;
return Promise.resolve(this.result);
}
let versionNode = this.querySelectorDirectChild(headerNode, "version");
if (versionNode == null) {
// Adding a fallback for MacOS Password Depot 17.0 export files
// These files do not have a version node, but a dataformat node instead
versionNode = this.querySelectorDirectChild(headerNode, "dataformat");
if (versionNode == null) {
this.result.success = false;
return Promise.resolve(this.result);
}
}
const version = versionNode.textContent;
if (!version.startsWith("17")) {
this.result.errorMessage = "Unsupported export version detected - (only 17.0 is supported)";
this.result.success = false;
return Promise.resolve(this.result);
}
// Abort import if the file is encrypted
const encryptedNode = this.querySelectorDirectChild(headerNode, "encrypted");
if (encryptedNode != null && encryptedNode.textContent == "True") {
this.result.errorMessage = "Encrypted Password Depot files are not supported.";
this.result.success = false;
return Promise.resolve(this.result);
}
// Check if the passwords node is present
// This node contains all the password entries
const passwordsNode = rootNode.querySelector("passwords");
if (passwordsNode == null) {
this.result.errorMessage = "Missing `passwordfile > passwords` node.";
this.result.success = false;
return Promise.resolve(this.result);
}
this.buildFavouritesLookupTable(rootNode);
this.querySelectorAllDirectChild(passwordsNode, "group").forEach((group) => {
this.traverse(group, "");
});
if (this.organization) {
this.moveFoldersToCollections(this.result);
}
this.result.success = true;
return Promise.resolve(this.result);
}
// Traverses the XML tree and processes each node
// It starts from the root node and goes through each group and item
// This method is recursive and handles nested groups
private traverse(node: Element, groupPrefixName: string) {
const folderIndex = this.result.folders.length;
let groupName = groupPrefixName;
if (groupName !== "") {
groupName += "/";
}
// Check if the group has a fingerprint attribute (GUID of a folder)
const groupFingerprint = node.attributes.getNamedItem("fingerprint");
if (groupFingerprint?.textContent != "" && groupFingerprint.textContent != "null") {
const nameEl = node.attributes.getNamedItem("name");
groupName += nameEl == null ? "-" : nameEl.textContent;
const folder = new FolderView();
folder.name = groupName;
this.result.folders.push(folder);
}
this.querySelectorAllDirectChild(node, "item").forEach((entry) => {
const cipherIndex = this.result.ciphers.length;
const cipher = this.initLoginCipher();
//Set default item type similar how we default to Login in other importers
let sourceType: PasswordDepotItemType = PasswordDepotItemType.Password;
const entryFields = entry.children;
for (let i = 0; i < entryFields.length; i++) {
const entryField = entryFields[i];
// Skip processing historical entries
if (entryField.tagName === "hitems") {
continue;
}
if (entryField.tagName === "description") {
cipher.name = entryField.textContent;
continue;
}
if (entryField.tagName === "comment") {
cipher.notes = entryField.textContent;
continue;
}
if (entryField.tagName === "type") {
sourceType = entryField.textContent as PasswordDepotItemType;
switch (sourceType) {
case PasswordDepotItemType.Password:
case PasswordDepotItemType.RDP:
case PasswordDepotItemType.Putty:
case PasswordDepotItemType.TeamViewer:
case PasswordDepotItemType.Banking:
case PasswordDepotItemType.Certificate:
case PasswordDepotItemType.EncryptedFile:
cipher.type = CipherType.Login;
cipher.login = new LoginView();
break;
case PasswordDepotItemType.CreditCard:
cipher.type = CipherType.Card;
cipher.card = new CardView();
break;
case PasswordDepotItemType.SoftwareLicense:
case PasswordDepotItemType.Information:
case PasswordDepotItemType.Document:
cipher.type = CipherType.SecureNote;
cipher.secureNote = new SecureNoteView();
cipher.secureNote.type = SecureNoteType.Generic;
break;
case PasswordDepotItemType.Identity:
cipher.type = CipherType.Identity;
cipher.identity = new IdentityView();
break;
}
continue;
}
if (
sourceType === PasswordDepotItemType.Password ||
sourceType === PasswordDepotItemType.RDP ||
sourceType === PasswordDepotItemType.Putty ||
sourceType === PasswordDepotItemType.TeamViewer ||
sourceType === PasswordDepotItemType.Banking ||
sourceType === PasswordDepotItemType.Certificate ||
sourceType === PasswordDepotItemType.EncryptedFile
) {
if (this.parseLoginFields(entryField, cipher)) {
continue;
}
}
// fingerprint is the GUID of the entry
// Base on the previously parsed favourites, we can identify an entry and set the favorite flag accordingly
if (entryField.tagName === "fingerprint") {
if (this._favouritesLookupTable.has(entryField.textContent)) {
cipher.favorite = true;
}
}
if (entryField.tagName === "customfields") {
this.parseCustomFields(entryField, sourceType, cipher);
continue;
}
if (sourceType === PasswordDepotItemType.Banking && entryField.tagName === "tans") {
this.querySelectorAllDirectChild(entryField, "tan").forEach((tanEntry) => {
this.parseBankingTANs(tanEntry, cipher);
});
continue;
}
this.processKvp(cipher, entryField.tagName, entryField.textContent, FieldType.Text);
}
this.cleanupCipher(cipher);
this.result.ciphers.push(cipher);
if (groupName !== "") {
this.result.folderRelationships.push([cipherIndex, folderIndex]);
}
});
this.querySelectorAllDirectChild(node, "group").forEach((group) => {
this.traverse(group, groupName);
});
}
// Parses custom fields and adds them to the cipher
// It iterates through all the custom fields and adds them to the cipher
private parseCustomFields(
entryField: Element,
sourceType: PasswordDepotItemType,
cipher: CipherView,
) {
this.querySelectorAllDirectChild(entryField, "field").forEach((customField) => {
const customFieldObject = this.parseCustomField(customField);
if (customFieldObject == null) {
return;
}
switch (sourceType) {
case PasswordDepotItemType.CreditCard:
if (this.parseCreditCardCustomFields(customFieldObject, cipher)) {
return;
}
break;
case PasswordDepotItemType.Identity:
if (this.parseIdentityCustomFields(customFieldObject, cipher)) {
return;
}
break;
case PasswordDepotItemType.Information:
if (this.parseInformationCustomFields(customFieldObject, cipher)) {
return;
}
break;
default:
// For other types, we will process the custom field as a regular key-value pair
break;
}
this.processKvp(
cipher,
customFieldObject.name,
customFieldObject.value,
customFieldObject.type,
);
});
}
// Parses login fields and adds them to the cipher
private parseLoginFields(entryField: Element, cipher: CipherView): boolean {
if (entryField.tagName === "username") {
cipher.login.username = entryField.textContent;
return true;
}
if (entryField.tagName === "password") {
cipher.login.password = entryField.textContent;
return true;
}
if (entryField.tagName === "url") {
cipher.login.uris = this.makeUriArray(entryField.textContent);
return true;
}
return false;
}
// Parses a custom field and adds it to the cipher
private parseCustomField(customField: Element): FieldView | null {
let key: string = undefined;
let value: string = undefined;
let sourceFieldType: PasswordDepotCustomFieldType = PasswordDepotCustomFieldType.Memo;
let visible: string = undefined;
// A custom field is represented by a <field> element
// On exports from the Windows clients: It contains a <name>, <value>, and optionally a <type> and <visible> element
// On exports from the MacOs clients the key-values are defined as xml attributes instead of child nodes
if (customField.hasAttributes()) {
key = customField.getAttribute("name");
if (key == null) {
return null;
}
value = customField.getAttribute("value");
const typeAttr = customField.getAttribute("type");
sourceFieldType =
typeAttr != null
? (typeAttr as PasswordDepotCustomFieldType)
: PasswordDepotCustomFieldType.Memo;
visible = customField.getAttribute("visible");
} else {
const keyEl = this.querySelectorDirectChild(customField, "name");
key = keyEl != null ? keyEl.textContent : null;
if (key == null) {
return null;
}
const valueEl = this.querySelectorDirectChild(customField, "value");
value = valueEl != null ? valueEl.textContent : null;
const typeEl = this.querySelectorDirectChild(customField, "type");
sourceFieldType =
typeEl != null
? (typeEl.textContent as PasswordDepotCustomFieldType)
: PasswordDepotCustomFieldType.Memo;
const visibleEl = this.querySelectorDirectChild(customField, "visible");
visible = visibleEl != null ? visibleEl.textContent : null;
}
if (sourceFieldType === PasswordDepotCustomFieldType.Date) {
if (!isNaN(value as unknown as number)) {
// Convert excel date format to JavaScript date
const numericValue = parseInt(value);
const secondsInDay = 86400;
const missingLeapYearDays = secondsInDay * 1000;
value = new Date((numericValue - (25567 + 2)) * missingLeapYearDays).toLocaleDateString();
}
}
if (sourceFieldType === PasswordDepotCustomFieldType.Password) {
return { name: key, value: value, type: FieldType.Hidden, linkedId: null } as FieldView;
}
if (sourceFieldType === PasswordDepotCustomFieldType.Boolean) {
return { name: key, value: value, type: FieldType.Boolean, linkedId: null } as FieldView;
}
if (visible == "0") {
return { name: key, value: value, type: FieldType.Hidden, linkedId: null } as FieldView;
}
return { name: key, value: value, type: FieldType.Text, linkedId: null } as FieldView;
}
// Parses credit card fields and adds them to the cipher
private parseCreditCardCustomFields(customField: FieldView, cipher: CipherView): boolean {
if (customField.name === "IDS_CardHolder") {
cipher.card.cardholderName = customField.value;
return true;
}
if (customField.name === "IDS_CardNumber") {
cipher.card.number = customField.value;
cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);
return true;
}
if (customField.name === "IDS_CardExpires") {
this.setCardExpiration(cipher, customField.value);
return true;
}
if (customField.name === "IDS_CardCode") {
cipher.card.code = customField.value;
return true;
}
return false;
}
// Parses identity fields and adds them to the cipher
private parseIdentityCustomFields(customField: FieldView, cipher: CipherView): boolean {
if (customField.name === "IDS_IdentityName") {
this.processFullName(cipher, customField.value);
return true;
}
if (customField.name === "IDS_IdentityEmail") {
cipher.identity.email = customField.value;
return true;
}
if (customField.name === "IDS_IdentityFirstName") {
cipher.identity.firstName = customField.value;
return true;
}
if (customField.name === "IDS_IdentityLastName") {
cipher.identity.lastName = customField.value;
return true;
}
if (customField.name === "IDS_IdentityCompany") {
cipher.identity.company = customField.value;
return true;
}
if (customField.name === "IDS_IdentityAddress1") {
cipher.identity.address1 = customField.value;
return true;
}
if (customField.name === "IDS_IdentityAddress2") {
cipher.identity.address2 = customField.value;
return true;
}
if (customField.name === "IDS_IdentityCity") {
cipher.identity.city = customField.value;
return true;
}
if (customField.name === "IDS_IdentityState") {
cipher.identity.state = customField.value;
return true;
}
if (customField.name === "IDS_IdentityZIP") {
cipher.identity.postalCode = customField.value;
return true;
}
if (customField.name === "IDS_IdentityCountry") {
cipher.identity.country = customField.value;
return true;
}
if (customField.name === "IDS_IdentityPhone") {
cipher.identity.phone = customField.value;
return true;
}
return false;
}
// Parses information custom fields and adds them to the cipher
private parseInformationCustomFields(customField: FieldView, cipher: CipherView): boolean {
if (customField.name === "IDS_InformationText") {
cipher.notes = customField.value;
return true;
}
return false;
}
// Parses TAN objects and adds them to the cipher
// It iterates through all the TAN fields and adds them to the cipher
private parseBankingTANs(TANsField: Element, cipher: CipherView) {
let tanNumber = "0";
const entryFields = TANsField.children;
for (let i = 0; i < entryFields.length; i++) {
const entryField = entryFields[i];
if (entryField.tagName === "number") {
tanNumber = entryField.textContent;
continue;
}
this.processKvp(cipher, `tan_${tanNumber}_${entryField.tagName}`, entryField.textContent);
}
}
// Parses the favourites-node from the XML file, which contains a base64 encoded string
// The string contains the fingerprints/GUIDs of the favourited entries, separated by new lines
private buildFavouritesLookupTable(rootNode: Element): void {
const favouritesNode = this.querySelectorDirectChild(rootNode, "favorites");
if (favouritesNode == null) {
return;
}
const decodedBase64String = atob(favouritesNode.textContent);
if (decodedBase64String.indexOf("\r\n") > 0) {
decodedBase64String.split("\r\n").forEach((line) => {
this._favouritesLookupTable.add(line);
});
return;
}
decodedBase64String.split("\n").forEach((line) => {
this._favouritesLookupTable.add(line);
});
}
}

View File

@@ -0,0 +1,2 @@
export * from "./password-depot-item-type";
export * from "./password-depot-custom-field-type";

View File

@@ -0,0 +1,15 @@
/** This object represents the different custom field types in Password Depot */
export const PasswordDepotCustomFieldType = Object.freeze({
Password: "1",
Memo: "2",
Date: "3",
Number: "4",
Boolean: "5",
Decimal: "6",
Email: "7",
URL: "8",
} as const);
/** This type represents the different custom field types in Password Depot */
export type PasswordDepotCustomFieldType =
(typeof PasswordDepotCustomFieldType)[keyof typeof PasswordDepotCustomFieldType];

View File

@@ -0,0 +1,19 @@
/** This object represents the different item types in Password Depot */
export const PasswordDepotItemType = Object.freeze({
Password: "0",
CreditCard: "1",
SoftwareLicense: "2",
Identity: "3",
Information: "4",
Banking: "5",
EncryptedFile: "6",
Document: "7",
RDP: "8",
Putty: "9",
TeamViewer: "10",
Certificate: "11",
} as const);
/** This type represents the different item types in Password Depot */
export type PasswordDepotItemType =
(typeof PasswordDepotItemType)[keyof typeof PasswordDepotItemType];

View File

@@ -0,0 +1,283 @@
export const BankingTestData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
<group name="tempDB" fingerprint="CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D">
<item>
<description>banking type</description>
<type>5</type>
<password>somePassword</password>
<username>someUser</username>
<url>some-bank.com</url>
<comment>someNote</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:11:29</lastmodified>
<expirydate fmt="dd.mm.yyyy">02.05.2027</expirydate>
<importance>1</importance>
<fingerprint>DEB91652-52C6-402E-9D44-3557829BC6DF</fingerprint>
<template>&lt;USER&gt;&lt;TAB&gt;&lt;PASS&gt;&lt;ENTER&gt;</template>
<imageindex>127</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:09:17</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:09:17</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags></tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
<customfields>
<field>
<name>IDS_ECHolder</name>
<value>account holder</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECAccountNumber</name>
<value>1234567890</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECBLZ</name>
<value>12345678</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECBankName</name>
<value>someBank</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECBIC</name>
<value>bic</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECIBAN</name>
<value>iban</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECCardNumber</name>
<value>12345678</value>
<visible>-1</visible>
<kind>0</kind>
<type>10</type>
</field>
<field>
<name>IDS_ECPhone</name>
<value>0049</value>
<visible>0</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECLegitimacyID</name>
<value>1234</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECPIN</name>
<value>123</value>
<visible>0</visible>
<kind>0</kind>
<type>1</type>
</field>
</customfields>
<tans>
<tan>
<number>1</number>
<value>1234</value>
<used fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:10:54</used>
<amount> 100,00</amount>
<comment>some TAN note</comment>
<ccode>123</ccode>
</tan>
<tan>
<number>2</number>
<value>4321</value>
<amount> 0,00</amount>
<comment></comment>
<ccode></ccode>
</tan>
</tans>
<hitems>
<hitem>
<description>banking type</description>
<type>5</type>
<password>somePassword</password>
<username>someUser</username>
<url>some-bank.com</url>
<comment>someNote</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:10:35</lastmodified>
<expirydate fmt="dd.mm.yyyy">02.05.2027</expirydate>
<importance>1</importance>
<fingerprint>DEB91652-52C6-402E-9D44-3557829BC6DF</fingerprint>
<template>&lt;USER&gt;&lt;TAB&gt;&lt;PASS&gt;&lt;ENTER&gt;</template>
<imageindex>127</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:09:17</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:09:17</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags></tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
<customfields>
<field>
<name>IDS_ECHolder</name>
<value>account holder</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECAccountNumber</name>
<value>1234567890</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECBLZ</name>
<value>12345678</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECBankName</name>
<value>someBank</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECBIC</name>
<value>bic</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECIBAN</name>
<value>iban</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECCardNumber</name>
<value>12345678</value>
<visible>-1</visible>
<kind>0</kind>
<type>10</type>
</field>
<field>
<name>IDS_ECPhone</name>
<value>0049</value>
<visible>0</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECLegitimacyID</name>
<value>1234</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_ECPIN</name>
<value>123</value>
<visible>0</visible>
<kind>0</kind>
<type>1</type>
</field>
</customfields>
</hitem>
</hitems>
</item>
</group>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
QUY3NEZGODYtRkUzOS00NTg0LThFOTYtRkU5NTBDMjg5REY4DQo=
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
QWxsZ2VtZWluDQpIb21lIEJhbmtpbmcNCkludGVybmV0DQpQcml2YXQNCldpbmRvd3MNCg==
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,76 @@
export const CertificateTestData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
<group name="tempDB" fingerprint="CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D">
<item>
<description>certificate type</description>
<type>11</type>
<password>somePassword</password>
<username></username>
<url></url>
<comment>someNote</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:15:57</lastmodified>
<expirydate fmt="dd.mm.yyyy">00.00.0000</expirydate>
<importance>1</importance>
<fingerprint>21288702-B042-46D9-9DDF-B44A5CD04A72</fingerprint>
<template></template>
<imageindex>130</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:15:26</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:15:26</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags>someTag</tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
</item>
</group>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
QUY3NEZGODYtRkUzOS00NTg0LThFOTYtRkU5NTBDMjg5REY4DQo=
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
QWxsZ2VtZWluDQpIb21lIEJhbmtpbmcNCkludGVybmV0DQpQcml2YXQNCldpbmRvd3MNCg==
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,148 @@
export const CreditCardTestData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
<group name="tempDB" fingerprint="CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D">
<item>
<description>some CreditCard</description>
<type>1</type>
<password>4222422242224222</password>
<username>some CC holder</username>
<url></url>
<comment>someComment</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">08.05.2025 12:09:47</lastmodified>
<expirydate fmt="dd.mm.yyyy">08.05.2026</expirydate>
<importance>1</importance>
<fingerprint>DD9B52F8-B2CE-42C2-A891-5E20DA23EA20</fingerprint>
<template></template>
<imageindex>126</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category></category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">08.05.2025 12:08:48</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">08.05.2025 12:08:48</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags></tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
<customfields>
<field>
<name>IDS_CardType</name>
<value>0</value>
<visible>0</visible>
<kind>0</kind>
<type>4</type>
</field>
<field>
<name>IDS_CardHolder</name>
<value>some CC holder</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_CardNumber</name>
<value>4222422242224222</value>
<visible>-1</visible>
<kind>0</kind>
<type>10</type>
</field>
<field>
<name>IDS_CardExpires</name>
<value>05/2026</value>
<visible>-1</visible>
<kind>0</kind>
<type>3</type>
</field>
<field>
<name>IDS_CardCode</name>
<value>123</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_CardPhone</name>
<value></value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_CardURL</name>
<value></value>
<visible>-1</visible>
<kind>0</kind>
<type>8</type>
</field>
<field>
<name>IDS_CardAdditionalCode</name>
<value></value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_CardAdditionalInfo</name>
<value></value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_CardPIN</name>
<value>123</value>
<visible>-1</visible>
<kind>0</kind>
<type>1</type>
</field>
</customfields>
</item>
</group>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
QUY3NEZGODYtRkUzOS00NTg0LThFOTYtRkU5NTBDMjg5REY4DQo=
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
QWxsZ2VtZWluDQpIb21lIEJhbmtpbmcNCkludGVybmV0DQpQcml2YXQNCldpbmRvd3MNCg==
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,99 @@
export const DocumentTestData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
<group name="tempDB" fingerprint="CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D">
<item>
<description>document type</description>
<type>7</type>
<password></password>
<username></username>
<url></url>
<comment>document comment</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">03.06.2025 17:45:30</lastmodified>
<expirydate fmt="dd.mm.yyyy">00.00.0000</expirydate>
<importance>1</importance>
<fingerprint>1B8E7F2C-9229-43C6-AB89-42101809C822</fingerprint>
<template></template>
<imageindex>133</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">05.06.2025 21:49:49</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags></tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
<customfields>
<field>
<name>IDS_DocumentSize</name>
<value>27071</value>
<visible>0</visible>
<kind>0</kind>
<type>4</type>
</field>
<field>
<name>IDS_DocumentFolder</name>
<value>C:\\Users\\DJSMI\\Downloads\\</value>
<visible>0</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_DocumentFile</name>
<value>C:\\Users\\DJSMI\\Downloads\\some.pdf</value>
<visible>0</visible>
<kind>0</kind>
<type>0</type>
</field>
</customfields>
</item>
</group>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
QUY3NEZGODYtRkUzOS00NTg0LThFOTYtRkU5NTBDMjg5REY4DQo=
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
QWxsZ2VtZWluDQpIb21lIEJhbmtpbmcNCkludGVybmV0DQpQcml2YXQNCldpbmRvd3MNCg==
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,76 @@
export const EncryptedFileTestData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
<group name="tempDB" fingerprint="CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D">
<item>
<description>encrypted file type</description>
<type>6</type>
<password>somePassword</password>
<username></username>
<url></url>
<comment>some comment</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:15:17</lastmodified>
<expirydate fmt="dd.mm.yyyy">00.00.0000</expirydate>
<importance>1</importance>
<fingerprint>E4CA245D-A326-4359-9488-CC207B33C6C0</fingerprint>
<template></template>
<imageindex>132</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:14:58</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:14:58</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags></tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
</item>
</group>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
QUY3NEZGODYtRkUzOS00NTg0LThFOTYtRkU5NTBDMjg5REY4DQo=
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
QWxsZ2VtZWluDQpIb21lIEJhbmtpbmcNCkludGVybmV0DQpQcml2YXQNCldpbmRvd3MNCg==
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,197 @@
export const IdentityTestData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
<group name="tempDB" fingerprint="CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D">
<item>
<description>identity type</description>
<type>3</type>
<password></password>
<username>account-name/id</username>
<url>website</url>
<comment>someNote</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:14:33</lastmodified>
<expirydate fmt="dd.mm.yyyy">00.00.0000</expirydate>
<importance>1</importance>
<fingerprint>0E6085E9-7560-4826-814E-EFE1724E1377</fingerprint>
<template></template>
<imageindex>129</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:12:52</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:12:52</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags></tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
<customfields>
<field>
<name>IDS_IdentityName</name>
<value>account-name/id</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityEmail</name>
<value>email</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityFirstName</name>
<value>firstName</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityLastName</name>
<value>surName</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityCompany</name>
<value>someCompany</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityAddress1</name>
<value>someStreet</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityAddress2</name>
<value>address 2</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityCity</name>
<value>town</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityState</name>
<value>state</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityZIP</name>
<value>zipCode</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityCountry</name>
<value>country</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityPhone</name>
<value>phoneNumber</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityWebsite</name>
<value>website</value>
<visible>-1</visible>
<kind>0</kind>
<type>8</type>
</field>
<field>
<name>IDS_IdentityBirthDate</name>
<value>45789</value>
<visible>-1</visible>
<kind>0</kind>
<type>3</type>
</field>
<field>
<name>IDS_IdentityMobile</name>
<value>mobileNumber</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityFax</name>
<value>faxNumber</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_IdentityHouseNumber</name>
<value>123</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
</customfields>
</item>
</group>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
QUY3NEZGODYtRkUzOS00NTg0LThFOTYtRkU5NTBDMjg5REY4DQo=
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
QWxsZ2VtZWluDQpIb21lIEJhbmtpbmcNCkludGVybmV0DQpQcml2YXQNCldpbmRvd3MNCg==
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,19 @@
export { InvalidRootNodeData } from "./missing-root-node.xml";
export { MissingPasswordsNodeData } from "./missing-passwords-node.xml";
export { InvalidVersionData } from "./wrong-version.xml";
export { EncryptedFileData } from "./noop-encrypted-file.xml";
export { PasswordTestData } from "./password.xml";
export { CreditCardTestData } from "./credit-card.xml";
export { IdentityTestData } from "./identity.xml";
export { RDPTestData } from "./rdp.xml";
export { SoftwareLicenseTestData } from "./software-license.xml";
export { TeamViewerTestData } from "./team-viewer.xml";
export { PuttyTestData } from "./putty.xml";
export { BankingTestData } from "./banking.xml";
export { InformationTestData } from "./information.xml";
export { CertificateTestData } from "./certificate.xml";
export { EncryptedFileTestData } from "./encrypted-file.xml";
export { DocumentTestData } from "./document.xml";
export { MacOS_WrongVersion } from "./macos-wrong-version.xml";
export { MacOS_PasswordDepotXmlFile } from "./macos-customfields.xml";
export { MacOS_MultipleFolders } from "./macos-multiple-folders.xml";

View File

@@ -0,0 +1,85 @@
export const InformationTestData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
<group name="tempDB" fingerprint="CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D">
<item>
<description>information type</description>
<type>4</type>
<password></password>
<username></username>
<url></url>
<comment></comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:14:54</lastmodified>
<expirydate fmt="dd.mm.yyyy">00.00.0000</expirydate>
<importance>1</importance>
<fingerprint>546AFAE7-6F64-4040-838B-AFE691580356</fingerprint>
<template></template>
<imageindex>131</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:14:39</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:14:39</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags></tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
<customfields>
<field>
<name>IDS_InformationText</name>
<value>some note content</value>
<visible>0</visible>
<kind>0</kind>
<type>2</type>
</field>
</customfields>
</item>
</group>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
QUY3NEZGODYtRkUzOS00NTg0LThFOTYtRkU5NTBDMjg5REY4DQo=
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
QWxsZ2VtZWluDQpIb21lIEJhbmtpbmcNCkludGVybmV0DQpQcml2YXQNCldpbmRvd3MNCg==
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,42 @@
export const MacOS_PasswordDepotXmlFile = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/12.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<encrypted>0</encrypted>
<compressed>0</compressed>
<authtype>0</authtype>
<enctype>1</enctype>
<kdftype>1</kdftype>
<dataformat>17</dataformat>
<lastsynctime FMT="dd.MM.yyyy hh:mm:ss">30.12.1899 00:00:00</lastsynctime>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">23.06.2025 16:30:50</lastmodified>
<datetime FMT="dd.MM.yyyy hh:mm:ss">25.06.2025 14:30:47</datetime>
<fingerprint>2C1A154A-3BB0-4871-9537-3634DE303F8E</fingerprint>
<maxhistory>7</maxhistory>
</header>
<passwords>
<group name="null" fingerprint="null">
<item>
<description>card 1</description>
<type>1</type>
<comment>comment</comment>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">23.06.2025 16:14:33</lastmodified>
<fingerprint>EBF4AC3D-86C9-49BE-826B-BAE5FF9E3575</fingerprint>
<created FMT="dd.MM.yyyy hh:mm:ss">23.06.2025 16:13:40</created>
<lastaccessed FMT="dd.MM.yyyy hh:mm:ss">25.06.2025 14:17:10</lastaccessed>
<customfields>
<field name="IDS_CardType" value="2" />
<field name="IDS_CardHolder" value="some CC holder" visible="1" />
<field name="IDS_CardNumber" value="4242424242424242" visible="1" />
<field name="IDS_CardExpires" value="8/2028" visible="1" />
<field name="IDS_CardCode" value="125" visible="1" />
<field name="IDS_CardPhone" visible="1" />
<field name="IDS_CardURL" value="fede.com" visible="1" />
<field name="IDS_CardAdditionalCode" visible="1" />
<field name="IDS_CardAdditionalInfo" visible="1" />
<field name="IDS_CardPIN" value="1122" visible="1" />
</customfields>
</item>
</group>
</passwords>
</passwordfile>`;

View File

@@ -0,0 +1,215 @@
export const MacOS_MultipleFolders = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/12.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<encrypted>0</encrypted>
<compressed>0</compressed>
<authtype>0</authtype>
<enctype>1</enctype>
<kdftype>1</kdftype>
<dataformat>17</dataformat>
<lastsynctime FMT="dd.MM.yyyy hh:mm:ss">30.12.1899 00:00:00</lastsynctime>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">27.06.2025 10:39:07</lastmodified>
<datetime FMT="dd.MM.yyyy hh:mm:ss">27.06.2025 10:39:27</datetime>
<fingerprint>7DCDD3FA-F512-4CD4-AEED-DE2A4C8375CF</fingerprint>
<maxhistory>7</maxhistory>
</header>
<passwords>
<group name="null" fingerprint="null">
<item>
<description>remote desktop</description>
<type>8</type>
<password>pass</password>
<username>username</username>
<url>compjter</url>
<comment>comment</comment>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:04:57</lastmodified>
<fingerprint>81316050-9B9C-4D9B-9549-45B52A0BE6BB</fingerprint>
<template>&lt;USER&gt;&lt;TAB&gt;&lt;PASS&gt;&lt;ENTER&gt;</template>
<category>Private</category>
<created FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:04:32</created>
<lastaccessed FMT="dd.MM.yyyy hh:mm:ss">27.06.2025 10:28:02</lastaccessed>
<tags>tgmac</tags>
</item>
<item>
<description>teamviewer</description>
<type>10</type>
<password>pass</password>
<url>partnerid</url>
<comment>comment</comment>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:05:28</lastmodified>
<expirydate FMT="dd.MM.yyyy">26.06.2025</expirydate>
<fingerprint>8AAACC16-4FD4-4E52-9C1F-6979B051B510</fingerprint>
<category>Internet</category>
<created FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:05:03</created>
<lastaccessed FMT="dd.MM.yyyy hh:mm:ss">27.06.2025 10:28:02</lastaccessed>
<tags>tag</tags>
<customfields>
<field name="IDS_TeamViewerMode" value="0" visible="1" />
</customfields>
</item>
<item>
<description>ec card</description>
<type>5</type>
<password>pass</password>
<username>user</username>
<url>url</url>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:08:35</lastmodified>
<fingerprint>B5C148A4-C408-427C-B69C-F88E7C529FA4</fingerprint>
<template>&lt;USER&gt;&lt;TAB&gt;&lt;PASS&gt;&lt;ENTER&gt;</template>
<created FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:08:00</created>
<lastaccessed FMT="dd.MM.yyyy hh:mm:ss">27.06.2025 10:28:02</lastaccessed>
<customfields>
<field name="IDS_ECHolder" value="holder" visible="1" />
<field name="IDS_ECAccountNumber" value="account" visible="1" />
<field name="IDS_ECBLZ" value="bank" visible="1" />
<field name="IDS_ECBankName" value="bank name" visible="1" />
<field name="IDS_ECBIC" value="bic" visible="1" />
<field name="IDS_ECIBAN" value="iban" visible="1" />
<field name="IDS_ECCardNumber" value="6464646464646464" visible="1" />
<field name="IDS_ECPhone" value="1324124" />
<field name="IDS_ECLegitimacyID" value="leg id" visible="1" />
<field name="IDS_ECPIN" value="1234" />
</customfields>
</item>
<item>
<description>identity</description>
<type>3</type>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:09:50</lastmodified>
<fingerprint>87574AD4-8844-4A01-9381-AFF0907198A3</fingerprint>
<created FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:09:19</created>
<lastaccessed FMT="dd.MM.yyyy hh:mm:ss">27.06.2025 10:28:02</lastaccessed>
<customfields>
<field name="IDS_IdentityName" value="name" visible="1" />
<field name="IDS_IdentityEmail" value="email" visible="1" />
<field name="IDS_IdentityFirstName" value="first" visible="1" />
<field name="IDS_IdentityLastName" value="last" visible="1" />
<field name="IDS_IdentityCompany" value="compant" visible="1" />
<field name="IDS_IdentityAddress1" value="street" visible="1" />
<field name="IDS_IdentityAddress2" value="address" visible="1" />
<field name="IDS_IdentityCity" value="city" visible="1" />
<field name="IDS_IdentityState" value="state" visible="1" />
<field name="IDS_IdentityZIP" value="zip" visible="1" />
<field name="IDS_IdentityCountry" value="country" visible="1" />
<field name="IDS_IdentityPhone" value="phone" visible="1" />
<field name="IDS_IdentityWebsite" value="web" visible="1" />
<field name="IDS_IdentityBirthDate" visible="1" />
<field name="IDS_IdentityMobile" visible="1" />
<field name="IDS_IdentityFax" visible="1" />
<field name="IDS_IdentityHouseNumber" visible="1" />
</customfields>
</item>
<item>
<description>credit card</description>
<type>1</type>
<comment>comment</comment>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 19:07:38</lastmodified>
<fingerprint>E98E3CBA-1578-48AD-8E41-CFD3280045BB</fingerprint>
<created FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:06:32</created>
<lastaccessed FMT="dd.MM.yyyy hh:mm:ss">27.06.2025 10:28:02</lastaccessed>
<customfields>
<field name="IDS_CardType" value="0" />
<field name="IDS_CardHolder" value="holder" visible="1" />
<field name="IDS_CardNumber" value="525252525252525" visible="1" />
<field name="IDS_CardExpires" value="6/2028" visible="1" />
<field name="IDS_CardCode" value="333" visible="1" />
<field name="IDS_CardPhone" value="1234324" visible="1" />
<field name="IDS_CardURL" value="url" visible="1" />
<field name="IDS_CardAdditionalCode" value="code" visible="1" />
<field name="IDS_CardAdditionalInfo" value="addinfo" visible="1" />
<field name="IDS_CardPIN" value="111" visible="1" />
</customfields>
</item>
<group name="folder macos" fingerprint="BF823CF6-B9D1-49FD-AEB9-4F59BDD8DBB5"
imageindex="-1" imagecustom="0" category="null" comments="null">
<item>
<description>password</description>
<password>passmac</password>
<username>usernam</username>
<comment>comment</comment>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:04:30</lastmodified>
<fingerprint>DE8AD61B-8EC0-4E72-9BC8-971E80712B50</fingerprint>
<template>&lt;USER&gt;&lt;TAB&gt;&lt;PASS&gt;&lt;ENTER&gt;</template>
<category>General</category>
<created FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:04:04</created>
<lastaccessed FMT="dd.MM.yyyy hh:mm:ss">27.06.2025 10:28:02</lastaccessed>
<tags>tagmac</tags>
</item>
<item>
<description>informationb</description>
<type>4</type>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:10:01</lastmodified>
<fingerprint>7E9E6941-BB3B-47F2-9E43-33F900EBBF95</fingerprint>
<category>Banking</category>
<created FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:09:53</created>
<lastaccessed FMT="dd.MM.yyyy hh:mm:ss">27.06.2025 10:28:02</lastaccessed>
<customfields>
<field name="IDS_InformationText" value="content" />
</customfields>
</item>
<item>
<description>certificat</description>
<type>11</type>
<password>passsss</password>
<comment>comment</comment>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:10:28</lastmodified>
<expirydate FMT="dd.MM.yyyy">26.06.2025</expirydate>
<fingerprint>1F36748F-0374-445E-B020-282EAE26259F</fingerprint>
<category>Internet</category>
<created FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:10:10</created>
<lastaccessed FMT="dd.MM.yyyy hh:mm:ss">27.06.2025 10:28:02</lastaccessed>
<tags>tag</tags>
</item>
</group>
<group name="folder 2" fingerprint="84E728B7-67AC-47D7-9F8C-4335905A4087"
imageindex="-1" imagecustom="0" category="null" comments="null">
<item>
<description>putty</description>
<type>9</type>
<password>pass</password>
<username>username</username>
<url>host</url>
<comment>comment</comment>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:06:08</lastmodified>
<expirydate FMT="dd.MM.yyyy">26.06.2025</expirydate>
<fingerprint>7947A949-98F0-4F26-BE12-5FFAFE7601C8</fingerprint>
<template>&lt;USER&gt;&lt;TAB&gt;&lt;PASS&gt;&lt;ENTER&gt;</template>
<category>Banking</category>
<created FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:05:38</created>
<lastaccessed FMT="dd.MM.yyyy hh:mm:ss">27.06.2025 10:28:02</lastaccessed>
<tags>tag</tags>
<customfields>
<field name="IDS_PuTTyProtocol" value="0" visible="1" />
<field name="IDS_PuTTyKeyFile" value="keyfile" visible="1" />
<field name="IDS_PuTTyKeyPassword" value="keypass" visible="1" />
<field name="IDS_PuTTyPort" value="port" visible="1" />
</customfields>
</item>
<item>
<description>soft license</description>
<type>2</type>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:09:02</lastmodified>
<fingerprint>2A5CF4C1-70D0-4F27-A1DE-4CFEF5FB71CF</fingerprint>
<created FMT="dd.MM.yyyy hh:mm:ss">26.06.2025 16:08:43</created>
<lastaccessed FMT="dd.MM.yyyy hh:mm:ss">27.06.2025 10:28:02</lastaccessed>
<customfields>
<field name="IDS_LicenseProduct" value="prod" />
<field name="IDS_LicenseVersion" value="version" />
<field name="IDS_LicenseName" value="registered" visible="1" />
<field name="IDS_LicenseKey" visible="1" />
<field name="IDS_LicenseAdditionalKey" visible="1" />
<field name="IDS_LicenseURL" value="url" visible="1" />
<field name="IDS_LicenseProtected" value="protected" />
<field name="IDS_LicenseUserName" value="username" visible="1" />
<field name="IDS_LicensePassword" value="pass" visible="1" />
<field name="IDS_LicensePurchaseDate" value="2147483647" />
<field name="IDS_LicenseOrderNumber"
value="ccbdflbunjrcnilnerjnekirlfvefkbfinhkegljd" visible="1" />
<field name="IDS_LicenseEmail" value="ccc" visible="1" />
<field name="IDS_LicenseExpires" />
</customfields>
</item>
</group>
</group>
</passwords>
</passwordfile>`;

View File

@@ -0,0 +1,21 @@
export const MacOS_WrongVersion = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/12.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<encrypted>0</encrypted>
<compressed>0</compressed>
<authtype>0</authtype>
<enctype>1</enctype>
<kdftype>1</kdftype>
<dataformat>18</dataformat>
<lastsynctime FMT="dd.MM.yyyy hh:mm:ss">30.12.1899 00:00:00</lastsynctime>
<lastmodified FMT="dd.MM.yyyy hh:mm:ss">23.06.2025 16:30:50</lastmodified>
<datetime FMT="dd.MM.yyyy hh:mm:ss">25.06.2025 14:30:47</datetime>
<fingerprint>2C1A154A-3BB0-4871-9537-3634DE303F8E</fingerprint>
<maxhistory>7</maxhistory>
</header>
<passwords>
<group name="null" fingerprint="null">
</group>
</passwords>
</passwordfile>`;

View File

@@ -0,0 +1,25 @@
export const MissingPasswordsNodeData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/18.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,28 @@
export const InvalidRootNodeData = `<?xml version="1.0" encoding="utf-8"?>
<invalidRootNode xmlns="https://www.password-depot.de/schemas/passwordfile/18.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
</categories>
</invalidRootNode>`;

View File

@@ -0,0 +1,27 @@
export const EncryptedFileData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>True</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,222 @@
export const PasswordTestData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
<group name="tempDB" fingerprint="CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D">
<item>
<description>password type</description>
<type>0</type>
<password>p6J&lt;]fmjv!:H&amp;iJ7/Mwt@3i8</password>
<username>someUser</username>
<url>example.com</url>
<comment>someComment</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">07.05.2025 13:37:56</lastmodified>
<expirydate fmt="dd.mm.yyyy">07.05.2025</expirydate>
<importance>0</importance>
<fingerprint>27ACAC2D-8DDA-4088-8D3A-E6C5F40ED46E</fingerprint>
<template>&lt;USER&gt;&lt;TAB&gt;&lt;PASS&gt;&lt;ENTER&gt;</template>
<imageindex>0</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">07.05.2025 13:36:48</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">07.05.2025 13:36:48</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags>someTag</tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
<customfields>
<field>
<name>passwort</name>
<value>password</value>
<visible>-1</visible>
<kind>0</kind>
<type>1</type>
</field>
<field>
<name>memo</name>
<value>memo</value>
<visible>-1</visible>
<kind>0</kind>
<type>2</type>
</field>
<field>
<name>datum</name>
<value>45790</value>
<visible>-1</visible>
<kind>0</kind>
<type>3</type>
</field>
<field>
<name>nummer</name>
<value>1</value>
<visible>-1</visible>
<kind>0</kind>
<type>4</type>
</field>
<field>
<name>boolean</name>
<value>1</value>
<visible>-1</visible>
<kind>0</kind>
<type>5</type>
</field>
<field>
<name>decimal</name>
<value>1,01</value>
<visible>-1</visible>
<kind>0</kind>
<type>6</type>
</field>
<field>
<name>email</name>
<value>who@cares.com</value>
<visible>-1</visible>
<kind>0</kind>
<type>7</type>
</field>
<field>
<name>url</name>
<value>example.com</value>
<visible>-1</visible>
<kind>0</kind>
<type>8</type>
</field>
</customfields>
</item>
<item>
<description>password type (2)</description>
<type>0</type>
<password>p6J&lt;]fmjv!:H&amp;iJ7/Mwt@3i8</password>
<username>someUser</username>
<url></url>
<comment>someComment</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">07.05.2025 13:37:56</lastmodified>
<expirydate fmt="dd.mm.yyyy">07.05.2025</expirydate>
<importance>0</importance>
<fingerprint>AF74FF86-FE39-4584-8E96-FE950C289DF8</fingerprint>
<template>&lt;USER&gt;&lt;TAB&gt;&lt;PASS&gt;&lt;ENTER&gt;</template>
<imageindex>0</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">07.05.2025 13:36:48</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">07.05.2025 13:36:48</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags>someTag</tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
</item>
<item>
<description>password type (3)</description>
<type>0</type>
<password>p6J&lt;]fmjv!:H&amp;iJ7/Mwt@3i8</password>
<username>someUser</username>
<url></url>
<comment>someComment</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">07.05.2025 13:37:56</lastmodified>
<expirydate fmt="dd.mm.yyyy">07.05.2025</expirydate>
<importance>0</importance>
<fingerprint>BF74FF86-FA39-4584-8E96-FA950C249DF8</fingerprint>
<template>&lt;USER&gt;&lt;TAB&gt;&lt;PASS&gt;&lt;ENTER&gt;</template>
<imageindex>0</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">07.05.2025 13:36:48</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">07.05.2025 13:36:48</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags>someTag</tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
</item>
</group>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
QUY3NEZGODYtRkUzOS00NTg0LThFOTYtRkU5NTBDMjg5REY4CkJGNzRGRjg2LUZBMzktNDU4NC04RTk2LUZBOTUwQzI0OURGOA==
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
QWxsZ2VtZWluDQpIb21lIEJhbmtpbmcNCkludGVybmV0DQpQcml2YXQNCldpbmRvd3MNCg==
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,106 @@
export const PuttyTestData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
<group name="tempDB" fingerprint="CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D">
<item>
<description>Putty type</description>
<type>9</type>
<password>somePassword</password>
<username>someUser</username>
<url>localhost</url>
<comment>someNote</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:09:09</lastmodified>
<expirydate fmt="dd.mm.yyyy">00.00.0000</expirydate>
<importance>1</importance>
<fingerprint>32207D79-B70B-4987-BC73-3F7AD75D2C63</fingerprint>
<template></template>
<imageindex>125</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr>cli command</paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:08:18</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:08:18</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags>someTag</tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
<customfields>
<field>
<name>IDS_PuTTyProtocol</name>
<value>0</value>
<visible>0</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_PuTTyKeyFile</name>
<value>pathToKeyFile</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_PuTTyKeyPassword</name>
<value>passwordForKeyFile</value>
<visible>-1</visible>
<kind>0</kind>
<type>1</type>
</field>
<field>
<name>IDS_PuTTyPort</name>
<value>8080</value>
<visible>-1</visible>
<kind>0</kind>
<type>4</type>
</field>
</customfields>
</item>
</group>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
QUY3NEZGODYtRkUzOS00NTg0LThFOTYtRkU5NTBDMjg5REY4DQo=
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
QWxsZ2VtZWluDQpIb21lIEJhbmtpbmcNCkludGVybmV0DQpQcml2YXQNCldpbmRvd3MNCg==
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,76 @@
export const RDPTestData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
<group name="tempDB" fingerprint="CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D">
<item>
<description>rdp type</description>
<type>8</type>
<password>somePassword</password>
<username>someUser</username>
<url>ms-rd:subscribe?url=https://contoso.com</url>
<comment>someNote</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:07:33</lastmodified>
<expirydate fmt="dd.mm.yyyy">12.05.2025</expirydate>
<importance>1</importance>
<fingerprint>24CFF328-3036-48E3-99A3-85CD337725D3</fingerprint>
<template></template>
<imageindex>123</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr>commandline command</paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:06:24</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:06:24</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags>sometag</tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
</item>
</group>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
QUY3NEZGODYtRkUzOS00NTg0LThFOTYtRkU5NTBDMjg5REY4DQo=
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
QWxsZ2VtZWluDQpIb21lIEJhbmtpbmcNCkludGVybmV0DQpQcml2YXQNCldpbmRvd3MNCg==
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,169 @@
export const SoftwareLicenseTestData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
<group name="tempDB" fingerprint="CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D">
<item>
<description>software-license type</description>
<type>2</type>
<password>somePassword</password>
<username>someUserName</username>
<url>example.com</url>
<comment>someComment</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:12:48</lastmodified>
<expirydate fmt="dd.mm.yyyy">00.00.0000</expirydate>
<importance>1</importance>
<fingerprint>220206EB-BE82-4E78-8FFB-9316D854721F</fingerprint>
<template></template>
<imageindex>128</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:11:33</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:11:33</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags></tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
<customfields>
<field>
<name>IDS_LicenseProduct</name>
<value>someProduct</value>
<visible>0</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_LicenseVersion</name>
<value>someVersion</value>
<visible>0</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_LicenseName</name>
<value>some User</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_LicenseKey</name>
<value>license-key</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_LicenseAdditionalKey</name>
<value>additional-license-key</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_LicenseURL</name>
<value>example.com</value>
<visible>-1</visible>
<kind>0</kind>
<type>8</type>
</field>
<field>
<name>IDS_LicenseProtected</name>
<value>1</value>
<visible>0</visible>
<kind>0</kind>
<type>5</type>
</field>
<field>
<name>IDS_LicenseUserName</name>
<value>someUserName</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_LicensePassword</name>
<value>somePassword</value>
<visible>-1</visible>
<kind>0</kind>
<type>1</type>
</field>
<field>
<name>IDS_LicensePurchaseDate</name>
<value>45789</value>
<visible>0</visible>
<kind>0</kind>
<type>3</type>
</field>
<field>
<name>IDS_LicenseOrderNumber</name>
<value>order number</value>
<visible>-1</visible>
<kind>0</kind>
<type>0</type>
</field>
<field>
<name>IDS_LicenseEmail</name>
<value>someEmail</value>
<visible>-1</visible>
<kind>0</kind>
<type>7</type>
</field>
<field>
<name>IDS_LicenseExpires</name>
<value>Nie</value>
<visible>0</visible>
<kind>0</kind>
<type>3</type>
</field>
</customfields>
</item>
</group>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
QUY3NEZGODYtRkUzOS00NTg0LThFOTYtRkU5NTBDMjg5REY4DQo=
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
QWxsZ2VtZWluDQpIb21lIEJhbmtpbmcNCkludGVybmV0DQpQcml2YXQNCldpbmRvd3MNCg==
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,85 @@
export const TeamViewerTestData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/17.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>17.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
<group name="tempDB" fingerprint="CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D">
<item>
<description>TeamViewer type</description>
<type>10</type>
<password>somePassword</password>
<username></username>
<url>partnerId</url>
<comment>someNote</comment>
<lastmodified fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:08:14</lastmodified>
<expirydate fmt="dd.mm.yyyy">00.00.0000</expirydate>
<importance>1</importance>
<fingerprint>AE650032-5963-4D93-8E2E-69F216405C29</fingerprint>
<template></template>
<imageindex>124</imageindex>
<imagecustom>0</imagecustom>
<wndtitle></wndtitle>
<paramstr></paramstr>
<category>Allgemein</category>
<custombrowser></custombrowser>
<autocompletemethod>0</autocompletemethod>
<loginid></loginid>
<passid></passid>
<created fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:07:41</created>
<lastaccessed fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:07:41</lastaccessed>
<donotaddon>0</donotaddon>
<markassafe>0</markassafe>
<safemode>0</safemode>
<rndtype>1</rndtype>
<rndcustom></rndcustom>
<usagecount>0</usagecount>
<keephistory>2</keephistory>
<tags>someTag</tags>
<author>DJSMI</author>
<ownerid></ownerid>
<warnmsg></warnmsg>
<warnlvl>0</warnlvl>
<warnverify></warnverify>
<serverrqrd>0</serverrqrd>
<secret></secret>
<istemplate>0</istemplate>
<infotemplate></infotemplate>
<usetabs>161</usetabs>
<islink>0</islink>
<linkeditem></linkeditem>
<customfields>
<field>
<name>IDS_TeamViewerMode</name>
<value>0</value>
<visible>0</visible>
<kind>0</kind>
<type>0</type>
</field>
</customfields>
</item>
</group>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
QUY3NEZGODYtRkUzOS00NTg0LThFOTYtRkU5NTBDMjg5REY4DQo=
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
QWxsZ2VtZWluDQpIb21lIEJhbmtpbmcNCkludGVybmV0DQpQcml2YXQNCldpbmRvd3MNCg==
</categories>
</passwordfile>`;

View File

@@ -0,0 +1,28 @@
export const InvalidVersionData = `<?xml version="1.0" encoding="utf-8"?>
<passwordfile xmlns="https://www.password-depot.de/schemas/passwordfile/18.0/passwordfile.xsd">
<header>
<application>Password Depot</application>
<version>18.0.0</version>
<comments></comments>
<hint></hint>
<fingerprint>CCDA8015-7F21-4344-BDF0-9EA6AF8AE31D</fingerprint>
<datetime fmt="dd.mm.yyyy hh:mm:ss">12.05.2025 15:16:11</datetime>
<encrypted>False</encrypted>
<backupinterval>0</backupinterval>
<lastbackup fmt="dd.mm.yyyy hh:mm:ss">30.12.1899 00:00:00</lastbackup>
<hash></hash>
</header>
<passwords>
</passwords>
<recyclebin>
</recyclebin>
<infotemplates>
</infotemplates>
<favorites>
</favorites>
<sitestoignore>
</sitestoignore>
<categories>
</categories>
</passwordfile>`;

View File

@@ -73,6 +73,7 @@ export const regularImportOptions = [
{ id: "passkyjson", name: "Passky (json)" },
{ id: "passwordxpcsv", name: "Password XP (csv)" },
{ id: "netwrixpasswordsecure", name: "Netwrix Password Secure (csv)" },
{ id: "passworddepot17xml", name: "Password Depot 17 (xml)" },
] as const;
export type ImportType =

View File

@@ -90,6 +90,7 @@ import {
YotiCsvImporter,
ZohoVaultCsvImporter,
PasswordXPCsvImporter,
PasswordDepot17XmlImporter,
} from "../importers";
import { Importer } from "../importers/importer";
import {
@@ -348,6 +349,8 @@ export class ImportService implements ImportServiceAbstraction {
return new PasswordXPCsvImporter();
case "netwrixpasswordsecure":
return new NetwrixPasswordSecureCsvImporter();
case "passworddepot17xml":
return new PasswordDepot17XmlImporter();
default:
return null;
}