gtk2passwordapp 3.0.1 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,22 @@
1
+ Such::Parts.make('AbButtons', 'Box', :a_Button, :b_Button)
2
+ Such::Parts.make('AbcButtons', 'Box', :a_Button, :b_Button, :c_Button)
3
+ Such::Parts.make('PromptedEntryLabel', 'Box', :prompt_Label, :prompted_Entry, :prompted_Label)
4
+ Such::Parts.make('PromptedEntry', 'Box', :prompt_Label, :prompted_Entry)
5
+ Such::Parts.make('PromptedLabel', 'Box', :prompt_Label, :prompted_Label)
6
+ Such::Parts.make('PromptedCombo', 'Box', :prompt_Label, :prompted_ComboBoxText)
7
+
8
+ module Such
9
+ class AbButtons
10
+ def labels(a, b)
11
+ self.a_Button.label = Gtk2passwordapp::CONFIG[a]
12
+ self.b_Button.label = Gtk2passwordapp::CONFIG[b]
13
+ end
14
+ end
15
+ class AbcButtons
16
+ def labels(a, b, c)
17
+ self.a_Button.label = Gtk2passwordapp::CONFIG[a]
18
+ self.b_Button.label = Gtk2passwordapp::CONFIG[b]
19
+ self.c_Button.label = Gtk2passwordapp::CONFIG[c]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,3 @@
1
+ module Gtk2passwordapp
2
+ VERSION = '4.0.1'
3
+ end
metadata CHANGED
@@ -1,36 +1,45 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk2passwordapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
- - carlosjhr64@gmail.com
7
+ - carlosjhr64
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-31 00:00:00.000000000 Z
11
+ date: 2014-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: gtk2applib
14
+ name: rafini
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '15.3'
19
+ version: '0.5'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.5.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: '15.3'
29
+ version: '0.5'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.5.0
27
33
  - !ruby/object:Gem::Dependency
28
- name: gtk2
34
+ name: xdg
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
39
  version: '2.2'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 2.2.3
34
43
  type: :runtime
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,32 +47,160 @@ dependencies:
38
47
  - - "~>"
39
48
  - !ruby/object:Gem::Version
40
49
  version: '2.2'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 2.2.3
53
+ - !ruby/object:Gem::Dependency
54
+ name: user_space
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '2.0'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 2.0.1
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '2.0'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 2.0.1
73
+ - !ruby/object:Gem::Dependency
74
+ name: yaml_zlib_blowfish
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '0.0'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 0.0.0
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.0'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 0.0.0
93
+ - !ruby/object:Gem::Dependency
94
+ name: gtk3app
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: '1.2'
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 1.2.0
103
+ type: :runtime
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '1.2'
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 1.2.0
113
+ - !ruby/object:Gem::Dependency
114
+ name: super_random
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '0.0'
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 0.0.2
123
+ type: :runtime
124
+ prerelease: false
125
+ version_requirements: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '0.0'
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 0.0.2
133
+ - !ruby/object:Gem::Dependency
134
+ name: base_convert
135
+ requirement: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '2.0'
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: 2.0.0
143
+ type: :runtime
144
+ prerelease: false
145
+ version_requirements: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: '2.0'
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 2.0.0
153
+ - !ruby/object:Gem::Dependency
154
+ name: helpema
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.0'
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: 0.0.1
163
+ type: :runtime
164
+ prerelease: false
165
+ version_requirements: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - "~>"
168
+ - !ruby/object:Gem::Version
169
+ version: '0.0'
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: 0.0.1
41
173
  description: |
42
- A Ruby-Gnome password manager.
174
+ Ruby-Gnome Password Manager.
175
+
43
176
  Uses Blowfish to encrypt the datafile.
44
177
  Features random password generator and clipboard use.
45
178
  email: carlosjhr64@gmail.com
46
179
  executables:
47
- - gtk2passwordapp3
180
+ - gtk2passwordapp
48
181
  extensions: []
49
- extra_rdoc_files: []
182
+ extra_rdoc_files:
183
+ - README.rdoc
50
184
  files:
51
- - "./lib/gtk2passwordapp.rb"
52
- - "./lib/gtk2passwordapp/appconfig.rb"
53
- - "./lib/gtk2passwordapp/iocrypt.rb"
54
- - "./lib/gtk2passwordapp/passwords.rb"
55
- - "./lib/gtk2passwordapp/passwords_data.rb"
56
- - "./lib/gtk2passwordapp/rnd.rb"
57
- - "./pngs/icon.png"
58
- - "./pngs/logo.png"
59
- - README.txt
60
- - bin/gtk2passwordapp3
61
- homepage: https://sites.google.com/site/gtk2applib/home/gtk2applib-applications/gtk2passwordapp
185
+ - README.rdoc
186
+ - bin/gtk2passwordapp
187
+ - data/VERSION
188
+ - data/logo.png
189
+ - lib/gtk2passwordapp.rb
190
+ - lib/gtk2passwordapp/account.rb
191
+ - lib/gtk2passwordapp/accounts.rb
192
+ - lib/gtk2passwordapp/config.rb
193
+ - lib/gtk2passwordapp/gtk2passwordapp.rb
194
+ - lib/gtk2passwordapp/such_parts.rb
195
+ - lib/gtk2passwordapp/version.rb
196
+ homepage: https://github.com/carlosjhr64/gtk2passwordapp
62
197
  licenses:
63
- - GPL
198
+ - MIT
64
199
  metadata: {}
65
200
  post_install_message:
66
- rdoc_options: []
201
+ rdoc_options:
202
+ - "--main"
203
+ - README.rdoc
67
204
  require_paths:
68
205
  - lib
69
206
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -76,10 +213,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
213
  - - ">="
77
214
  - !ruby/object:Gem::Version
78
215
  version: '0'
79
- requirements: []
216
+ requirements:
217
+ - 'ruby: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux]'
218
+ - 'system: linux/bash'
80
219
  rubyforge_project:
81
- rubygems_version: 2.2.0
220
+ rubygems_version: 2.4.1
82
221
  signing_key:
83
222
  specification_version: 4
84
- summary: Ruby-Gnome Password Manager
223
+ summary: Ruby-Gnome Password Manager.
85
224
  test_files: []
225
+ has_rdoc:
data/README.txt DELETED
@@ -1,40 +0,0 @@
1
- Ruby-Gnome Password Manager
2
-
3
- A Ruby-Gnome password manager.
4
- Uses Blowfish to encrypt the datafile.
5
- Features random password generator and clipboard use.
6
-
7
-
8
- To add an account, enter the new account name in the "Account:" entry/combo box.
9
- For the account, write the associated url, a note about the account, and the username in the appropriate entry boxes.
10
-
11
- To set a new password, either enter the password in the "Password:" entry box,
12
- or generate it by pressing "Random", "Alpha-Numeric", "Numeric", "Letters", or "All-Caps".
13
- One can set the password length generated with the spin-box.
14
- To make the password generated visible, un-check the check button.
15
-
16
- Once one has edited the account, clicking the "Update Account" button finalizes the record.
17
- Note, however, that the change is not yet permanent and saved on disk.
18
- To delete an account, select the account in the entry/combo box, and the press the "Delete Account" button.
19
- Once one is done with all updates, one then needs to press "Save To Disk".
20
- Clicking the "Close" button or closing the window without "Save To Disk" will ignore all of the sessions updates.
21
-
22
- The "Clip Current Password" button copies the current password to the primary clipboard.
23
- The "Clip Previous Password" button copies the previous (old) password to the primary clipboard.
24
- The "Change Data File Password" button will allow one the change the master password.
25
- Do not forget the master password!
26
-
27
- Right click most anywhere on the app's window for the main menu.
28
- "Close" will dock the application and has the same effect as the "Close" button.
29
-
30
- Left click on the docked icon to bring back the editor window.
31
- Right click on the docked icon to select one of the accounts to load the password and username to the clipboard.
32
- The password is copied to the primary clipboard and will paste on middle mouse button click.
33
- Right click on an entry box to paste the username (via the clipboard's menu).
34
-
35
- For full documentation and comments, see
36
- https://sites.google.com/site/gtk2applib/home/gtk2applib-applications/gtk2passwordapp
37
-
38
- For a command line access to your passwords, use --no-gui option.
39
-
40
- carlosjhr64@gmail.com
data/bin/gtk2passwordapp3 DELETED
@@ -1,60 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- if (nogui = ARGV.include?('--no-gui')) || (ARGV.include?('--dump')) then
4
-
5
- require 'gtk2passwordapp/passwords'
6
- # Unfortunately, gtk2applib makes this awkard.
7
- # Have to assume things...
8
- pwfile = File.expand_path('~/.gtk2passwordapp-3/passwords.dat')
9
- raise "Need #{pwfile}" unless File.exist?(pwfile)
10
- # Note: user may want to send stdout to a file,
11
- # so commicating with user via stderr.
12
- $stderr.print "Warning: password will be shown.\nPassword: "
13
- pwd = $stdin.gets.strip
14
-
15
- pattern = nil
16
- if nogui then
17
- $stderr.print "Warning: selected passwords will be shown.\nEnter Account pattern: "
18
- pattern = Regexp.new( $stdin.gets.strip, Regexp::IGNORECASE )
19
- end
20
-
21
- begin
22
- passwords = Gtk2Password::Passwords.new(pwfile, pwd)
23
- passwords.load
24
- if ARGV.include?('--dump') then
25
- require 'pp'
26
- # puts to stdout
27
- pp passwords
28
- else
29
- passwords.accounts.each do |account|
30
- if account =~ pattern then
31
- password = passwords.password_of(account)
32
- username = passwords.username_of(account)
33
- # puts to stdout
34
- $stdout.puts [account,username,password].join("\n\t")
35
- end
36
- end
37
- end
38
- rescue Exception
39
- $stderr.puts $!
40
- end
41
- exit
42
-
43
- end
44
-
45
- $help = <<EOT
46
- \t--no-gui\tcommand line access to passwords
47
- \t--dump\t\tpp dump of data
48
- EOT
49
- require 'gtk2applib'
50
- require 'gtk2passwordapp'
51
-
52
- program = Gtk2AppLib::Program.new( Gtk2Password::ABOUT )
53
-
54
- begin
55
- Gtk2Password::App.new(program)
56
- rescue Exception
57
- $!.puts_bang!
58
- ensure
59
- program.finalize
60
- end
@@ -1,171 +0,0 @@
1
- module Gtk2AppLib
2
- # Only one gtk2passwordapp will be allowed to run.
3
- # Will kill a duplicate proccess...
4
- Lock.lock_mode
5
-
6
- module Configuration
7
-
8
- padding = Widgets::WIDGET[:Widgets][:pack_start].last
9
- go = 50
10
- label = 75
11
- entry = 300
12
- spin = 60
13
- check = 20
14
-
15
- if HILDON then
16
- FONT[:NORMAL] = FONT[:LARGE] = Pango::FontDescription.new( 'Arial 18' )
17
- go = 75
18
- label = 150
19
- entry = 500
20
- spin = 75
21
- check = 25
22
- if Gtk2AppLib::Configuration::OSTYPE == 'Internet Tablet OS: maemo Linux based OS2008' then
23
- # Icon works on N800, but not N900 (Maemo 5)
24
- MENU[:close] = '_Close'
25
- end
26
- else
27
- WINDOW_DEFAULT_SIZE[0],WINDOW_DEFAULT_SIZE[1] = 100,100
28
- MENU[:close] = '_Close'
29
- end
30
- MENU[:help] = '_Help'
31
-
32
- wrap = {:wrap= => true}
33
- label_width = {:width_request= => label, :wrap= => true}
34
- entry_width = {:width_request= => entry}
35
- shorten_a = {:width_request= => entry - go - 2*padding}
36
- shorten_b = {:width_request= => entry - spin - check - 4*padding, :visibility= => false}
37
- go_width = {:width_request= => go}
38
- check_width = {:width_request= => check, :active= => true}
39
- spin_width = {:width_request= => spin, :set_range => [3,100]}
40
- clicked = 'clicked'
41
-
42
- PARAMETERS[:Account_Label] = ['Account:',label_width]
43
- # nil needs to be set to the accounts list in bin/gtk2passwordapp
44
- PARAMETERS[:Account_ComboBoxEntry] = [nil,entry_width,'changed'] # catching changed signal
45
-
46
- PARAMETERS[:Url_Label] = ['Url:',label_width]
47
- PARAMETERS[:Url_Entry] = [shorten_a]
48
- PARAMETERS[:Url_Button] = ['Go!',go_width,clicked]
49
-
50
- PARAMETERS[:Note_Label] = ['Note:',label_width]
51
- PARAMETERS[:Note_Entry] = [entry_width]
52
-
53
- PARAMETERS[:Username_Label] = ['Username:',label_width]
54
- PARAMETERS[:Username_Entry] = [entry_width]
55
-
56
- PARAMETERS[:Password_Label] = ['Password:',label_width]
57
- PARAMETERS[:Password_Entry] = [shorten_b]
58
- PARAMETERS[:Password_CheckButton] = [check_width,'toggled']
59
- PARAMETERS[:Password_SpinButton] = [spin_width]
60
-
61
- PARAMETERS[:Random_Button] = ['Random',clicked]
62
- PARAMETERS[:Alpha_Button] = ['Alpha-Numeric',clicked]
63
- PARAMETERS[:Numeric_Button] = ['Numeric',clicked]
64
- PARAMETERS[:Letters_Button] = ['Letters',clicked]
65
- PARAMETERS[:Caps_Button] = ['All-Caps',clicked]
66
-
67
- PARAMETERS[:Cancel_Button] = ['Close',clicked]
68
- PARAMETERS[:Delete_Button] = ['Delete Account',clicked]
69
- PARAMETERS[:Update_Button] = ['Update Account',clicked]
70
- PARAMETERS[:Save_Button] = ['Save To Disk',clicked]
71
-
72
- PARAMETERS[:Datafile_Button] = ['Change Data File Password',clicked]
73
-
74
- PARAMETERS[:Current_Button] = ['Clip Current Password',clicked]
75
- PARAMETERS[:Previous_Button] = ['Clip Previous Password',clicked]
76
- end
77
- end
78
-
79
- module Gtk2Password
80
- module Configuration
81
- # Note that the passwords data file name is auto generated, but...
82
- # You can place your passwords data file in a directory other than ~/gtk2passwordapp-*
83
- PASSWORDS_FILE = File.join( Gtk2AppLib::USERDIR, 'passwords.dat' )
84
- # Switches the roles of PRIMARY and CLIPBOARD when true
85
- SWITCH_CLIPBOARDS = (Gtk2AppLib::HILDON || !Gtk2AppLib::Configuration::X)? true: false
86
- CLIPBOARD_TIMEOUT = 15 # clear clipboard after set number of seconds
87
- PASSWORD_EXPIRED = 60*60*24*30*3 # 3 months
88
- URL_PATTERN = Regexp.new('^https?:\/\/[^\s\']+$')
89
- DEFAULT_PASSWORD_LENGTH = 16
90
- EXPIRED_COLOR = Gtk2AppLib::Color[:Red]
91
-
92
- BAD_URL = ['Need url like http://www.site.com/page.html',{:TITLE => 'Error: Bad Url',:SCROLLED_WINDOW => false}]
93
- ARE_YOU_SURE = ['Changes will lost, are you sure you want to close?',{:TITLE => 'Are you sure?'}]
94
- WANT_TO_SAVE = ['Would you like to save your changes?',{:TITLE => 'Save?'}]
95
- NO_UPDATES = ["You've not updated any accounts yet.",{:TITLE => 'Not Modified',:SCROLLED_WINDOW => false}]
96
- UPDATED = ["Updated!",{:TITLE => 'Updated!',:SCROLLED_WINDOW => false}]
97
-
98
- updates = [:Delete_Button,:Update_Button,:Save_Button]
99
- updates.unshift(:Cancel_Button) if Gtk2AppLib::Configuration::MENU[:close]
100
- vbox = 'Gtk2AppLib::Widgets::VBox'
101
- hbox = 'Gtk2AppLib::Widgets::HBox'
102
- GUI = [
103
- ['Gui', vbox, [:Account_Component,:Url_Component,:Note_Component,:Username_Component,:Password_Component,:Buttons_Component]],
104
- ['Account', hbox, [:Account_Label,:Account_ComboBoxEntry]],
105
- ['Url', hbox, [:Url_Label,:Url_Entry,:Url_Button]],
106
- ['Note', hbox, [:Note_Label,:Note_Entry]],
107
- ['Username', hbox, [:Username_Label,:Username_Entry]],
108
- ['Password', hbox, [:Password_Label,:Password_Entry,:Password_CheckButton,:Password_SpinButton]],
109
- ['Buttons', vbox, [:Generators_Component,:Updates_Component,:Datafile_Component,:Clip_Component]],
110
- ['Generators', hbox, [:Random_Button,:Alpha_Button,:Numeric_Button,:Letters_Button,:Caps_Button]],
111
- ['Updates', hbox, updates],
112
- ['Datafile', hbox, [:Datafile_Button]],
113
- ['Clip', hbox, [:Current_Button,:Previous_Button]],
114
- ]
115
-
116
- # These are the prompts for passwords
117
- PASSWORD = 'Password' # for when for asking.
118
- AGAIN = 'Again' # for when verifying new passwords.
119
- RETRY = 'Retry' # for when you got your password wrong.
120
-
121
- end
122
-
123
- # Here you can edit in your own backups.
124
- def self.passwords_updated(password=nil)
125
- begin
126
- ### you might want to backup your passwords file ###
127
- # system('cp ~/.gtk2passwordapp-3/passwords.dat ~/Dropbox/Backups/passwords.dat')
128
- # Gtk2AppLib::DIALOGS.quick_message("Passwords Data Saved.",{:TITLE => 'Saved',:SCROLLED_WINDOW => false})
129
- rescue Exception
130
- Gtk2AppLib::DIALOGS.quick_message("Warning: #{$!}",{:TITLE => 'Warning',:SCROLLED_WINDOW => false})
131
- end
132
- end
133
-
134
- def self.get_password(prompt,title=prompt)
135
- if password = Gtk2AppLib::DIALOGS.entry( prompt, {:TITLE=>title, :Entry => [{:visibility= => false},'activate']} ) then
136
- password.strip!
137
- ### Do your custom interventions to the password here ###
138
- ### For example ###
139
- # if password.length == 0
140
- # # User wants to enter the password via QR code
141
- # qrc_png = File.join Gtk2AppLib::USERDIR, 'pngs', 'qrc.png'
142
- # system("fswebcam -q #{qrc_png}")
143
- # password = `zbarimg -q --raw #{qrc_png}`.strip
144
- # system("shred -u #{qrc_png}")
145
- # end
146
- # if password =~ /^[23]\-[0123456789abcdef]+$/
147
- # # User is using a shared secret, assuming 2 of 3....
148
- # require 'open3'
149
- # Open3.popen3('ssss-combine -t 2 -Q') do |stdin, stdout, stderr|
150
- # stdin.puts '1-....' # script's shared secret
151
- # stdin.puts password # user's shared secret
152
- # stdin.close
153
- # # Weird, ssss currently using stderr instead of stdout for output.
154
- # password = stderr.read.strip.split.last # So get the last line of stderr.
155
- # end
156
- # end
157
- # unless password.length > 7
158
- # if password.length == 0
159
- # Gtk2AppLib::DIALOGS.quick_message(
160
- # "Sorry, could not get password.",
161
- # {:TITLE => 'No Password',:SCROLLED_WINDOW => false})
162
- # else
163
- # Gtk2AppLib::DIALOGS.quick_message(
164
- # "Warning, weak password!",
165
- # {:TITLE => 'Weak!',:SCROLLED_WINDOW => false})
166
- # end
167
- # end
168
- end
169
- return password
170
- end
171
- end