Skip to content

Instantly share code, notes, and snippets.

@rsdy
Created December 28, 2010 01:43
Show Gist options
  • Save rsdy/756779 to your computer and use it in GitHub Desktop.
Save rsdy/756779 to your computer and use it in GitHub Desktop.
convert from chrome password db csv dump to password exporter ff4 plugin csv format
#!/usr/bin/env python
import fileinput
print """# Generated by Password Exporter; Export format 1.1; Encrypted: false
"hostname","username","password","formSubmitURL","httpRealm","usernameField","passwordField" """
for line in fileinput.input():
s = line.split('","')
if s[0] == '"origin_url': continue # skip the header
print (('"%s",' * 6) + '"%s"') % \
(s[0][1:], s[3], s[5], s[1], '', s[2], s[4])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment