Import passwords from CSV to Passbolt via Firefox-iMacros

Hi,

perhaps this is useful for others.

Input: CSV file (comma separated) with the information in the following order: label, uri, user, password, description

iMacros script (observe the file name in the fifth line and change accordingly!):
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
'URL GOTO=https://whereever.com/passbolt/
'WAIT SECONDS=5
SET !DATASOURCE passwords.csv

'SET !DATASOURCE_COLUMNS 5
'Start at line 2 to skip the header in the file
SET !LOOP 1
'Increase the current position in the file with each loop 
SET !DATASOURCE_LINE {{!LOOP}}

TAG POS=1 TYPE=BUTTON ATTR=ID:js_wsp_create_button
WAIT SECONDS=5
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>FORM>DIV>DIV>INPUT" CHARS={{!COL1}}
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>FORM>DIV>DIV>INPUT" KEY=9
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>FORM>DIV>DIV:nth-of-type(2)>INPUT" CHARS={{!COL2}}
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>FORM>DIV>DIV:nth-of-type(2)>INPUT" KEY=9
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>FORM>DIV>DIV:nth-of-type(3)>INPUT" CHARS={{!COL3}}
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>FORM>DIV>DIV:nth-of-type(3)>INPUT" KEY=9
FRAME F=3
SET !ENCRYPTION NO
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV>INPUT" CHARS={{!COL4}}
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY" KEY=9
FRAME F=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>FORM>DIV>DIV:nth-of-type(5)>TEXTAREA" CHARS={{!COL5}}
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>FORM>DIV>DIV:nth-of-type(5)>TEXTAREA" KEY=9
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>FORM>DIV:nth-of-type(2)>INPUT" KEY=13
WAIT SECONDS=5

Procedure:

  1. Open your passbolt page
  2. Open the iMacros section (via F8 normally)
  3. Create a new script (via Rec->Record, and stop directly)
  4. Rename #Current.iim via right click to PassboltCsv.iim for example.
  5. Select this file.
  6. In the “Play” section from iMacros, choose the number of passwords as “Max” and start the import via “Play (Loop)”

I’ve managed to import about 150 passwords into my self-hosted Passbolt coming from clipperz. There is a JSON->CSV converter available, too (if someone is interested).

BR, Chris

1 Like