gtk2passwordapp 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/gtk2passwordapp2 +26 -9
- metadata +4 -3
data/bin/gtk2passwordapp2
CHANGED
@@ -1,20 +1,37 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'rubygems'
|
3
3
|
gem 'gtk2applib', '~> 15.3'
|
4
|
+
$help = <<EOT
|
5
|
+
\t--no-gui\tcommand line access to passwords
|
6
|
+
\t--dump\t\tpp dump of data
|
7
|
+
EOT
|
4
8
|
require 'gtk2applib'
|
5
9
|
require 'gtk2passwordapp'
|
6
10
|
|
7
|
-
if $options=~/-no-gui/ then
|
8
|
-
print Gtk2Password::Configuration::COMMAND_LINE_MSG1
|
11
|
+
if (nogui = $options=~/-no-gui/) || ($options=~/-dump/) then
|
12
|
+
$stderr.print Gtk2Password::Configuration::COMMAND_LINE_MSG1
|
9
13
|
pwd = $stdin.gets.strip
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
if nogui then
|
15
|
+
$stderr.print Gtk2Password::Configuration::COMMAND_LINE_MSG2
|
16
|
+
pattern = Regexp.new( $stdin.gets.strip, Regexp::IGNORECASE )
|
17
|
+
end
|
18
|
+
begin
|
19
|
+
passwords = Gtk2Password::Passwords.new(Gtk2Password::Configuration::PASSWORDS_FILE, pwd)
|
20
|
+
passwords.load
|
21
|
+
if $options=~/-dump/ then
|
22
|
+
require 'pp'
|
23
|
+
pp passwords
|
24
|
+
else
|
25
|
+
passwords.accounts.each do |account|
|
26
|
+
if account =~ pattern then
|
27
|
+
password = passwords.password_of(account)
|
28
|
+
username = passwords.username_of(account)
|
29
|
+
puts [account,username,password].join("\n\t")
|
30
|
+
end
|
31
|
+
end
|
17
32
|
end
|
33
|
+
rescue Exception
|
34
|
+
# we're going to be silent here... muhahaha-ha!
|
18
35
|
end
|
19
36
|
exit
|
20
37
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gtk2passwordapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.1.
|
5
|
+
version: 2.1.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- carlosjhr64@gmail.com
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date:
|
13
|
+
date: 2012-06-16 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: crypt-tea
|
@@ -80,9 +80,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
requirements:
|
81
81
|
- gtk2
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 1.8.
|
83
|
+
rubygems_version: 1.8.17
|
84
84
|
signing_key:
|
85
85
|
specification_version: 3
|
86
86
|
summary: Ruby-Gnome Password Manager
|
87
87
|
test_files: []
|
88
88
|
|
89
|
+
has_rdoc: false
|