Created
October 4, 2012 01:14
-
-
Save rich123/3830921 to your computer and use it in GitHub Desktop.
Password Safe Convert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace eval gorilla { variable Dir [ pwd ] } | |
lappend auto_path [ pwd ] | |
package require pwsafe | |
interp alias {} mc {} puts | |
if { [ llength $argv ] != 2 } { | |
puts "Usage: $argv0 input-file output-file" | |
exit 1 | |
} | |
lassign $argv inf outf | |
if { ! [ file isfile $inf ] } { | |
puts "Error: input-file '$inf' does not exist, aborting." | |
exit 1 | |
} | |
if { [ file exists $outf ] } { | |
puts "Error: output-file '$outf' exists, refusing to overwrite." | |
exit 1 | |
} | |
puts stderr "Enter Password" | |
gets stdin password | |
set newdb [ pwsafe::createFromFile $inf $password ] | |
pwsafe::writeToFile $newdb $outf 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment