bin/gtk2passwordapp in gtk2passwordapp-1.6.0 vs bin/gtk2passwordapp in gtk2passwordapp-1.7.0
- old
+ new
@@ -2,9 +2,26 @@
require 'rubygems'
gem 'gtk2applib', '~> 15.3'
require 'gtk2applib'
require 'gtk2passwordapp'
+if $options=~/-no-gui/ then
+ puts "Warning: password will be shown."
+ print "Salt:"
+ salt = $stdin.gets.strip
+ passwords = Gtk2Password::Passwords.new(salt)
+ puts "Warning: selected passwords will be shown."
+ print "Enter Account pattern:"
+ pattern = Regexp.new( $stdin.gets.strip, Regexp::IGNORECASE )
+ passwords.accounts.each do |account|
+ if account =~ pattern then
+ password = passwords.password_of(account)
+ puts "\t\"" + account + "\"\t\t" + password
+ end
+ end
+ exit
+end
+
program = Gtk2AppLib::Program.new( Gtk2Password::ABOUT )
begin
Gtk2Password::App.new(program)
rescue Exception