rbpwdchecker 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt ADDED
@@ -0,0 +1,4 @@
1
+ === 0.0.1 2010-05-18
2
+
3
+ * 1 major enhancement:
4
+ * Initial release
data/Manifest.txt ADDED
@@ -0,0 +1,10 @@
1
+ History.txt
2
+ Manifest.txt
3
+ PostInstall.txt
4
+ README.rdoc
5
+ Rakefile
6
+ lib/rbpwdchecker.rb
7
+ script/console
8
+ script/destroy
9
+ script/generate
10
+ ext/rbpwdchecker/rbpwdchecker.so
data/PostInstall.txt ADDED
@@ -0,0 +1 @@
1
+
data/README.rdoc ADDED
@@ -0,0 +1,96 @@
1
+ = rbpwdchecker
2
+
3
+ * http://github.com/rha7dotcom/rbpwdchecker
4
+
5
+ == DESCRIPTION:
6
+
7
+ * A simple password validity checker based on libcrack2 (pro-active password checker library).
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ * None known.
12
+
13
+ == SYNOPSIS:
14
+
15
+ Just a single simple 'check' method to which you pass a password, to which the method
16
+ will respond with a string stating the problem with the password if the password is
17
+ objectionable in anyway, or an empty string if it is acceptable.
18
+
19
+ irb(main):001:0> require 'rubygems'
20
+ => true
21
+ irb(main):002:0> require 'rbpwdchecker'
22
+ => true
23
+
24
+ irb(main):003:0> puts PasswordChecker.check("ts")
25
+ it is WAY too short
26
+ => nil
27
+ irb(main):004:0> puts PasswordChecker.check("tsf")
28
+ it is WAY too short
29
+ => nil
30
+ irb(main):005:0> puts PasswordChecker.check("tsf2")
31
+ it is too short
32
+ => nil
33
+ irb(main):006:0> puts PasswordChecker.check("tsf2f")
34
+ it is too short
35
+ => nil
36
+ irb(main):007:0> puts PasswordChecker.check("tsf2fg")
37
+
38
+ => nil
39
+ irb(main):008:0> puts PasswordChecker.check("gabriel")
40
+ it is based upon your password entry
41
+ => nil
42
+ irb(main):009:0> puts PasswordChecker.check("medina")
43
+ it is based upon your password entry
44
+ => nil
45
+ irb(main):010:0> puts PasswordChecker.check("gmedina")
46
+ it is based on your username
47
+ => nil
48
+ irb(main):011:0> puts PasswordChecker.check("window")
49
+ it is based on a dictionary word
50
+ => nil
51
+ irb(main):012:0> puts PasswordChecker.check("samotego")
52
+ it is based on a (reversed) dictionary word
53
+ => nil
54
+ irb(main):013:0> puts PasswordChecker.check("sam07e$o")
55
+
56
+ => nil
57
+ irb(main):014:0>
58
+
59
+
60
+ == REQUIREMENTS:
61
+
62
+ You must install libcrack2 and libcrack2-dev prior to installing this gem in ubuntu, or
63
+ the corresponding packages in other OSs.
64
+
65
+ sudo aptitude install libcrack2 libcrack2-dev
66
+
67
+ == INSTALL:
68
+
69
+ Install the gem as usual (you must have the libcrack2 library and headers installed, see REQUIREMENTS).
70
+
71
+ sudo gem install rbpwdchecker
72
+
73
+ == LICENSE:
74
+
75
+ (The MIT License)
76
+
77
+ Copyright (c) 2010 FIXME full name
78
+
79
+ Permission is hereby granted, free of charge, to any person obtaining
80
+ a copy of this software and associated documentation files (the
81
+ 'Software'), to deal in the Software without restriction, including
82
+ without limitation the rights to use, copy, modify, merge, publish,
83
+ distribute, sublicense, and/or sell copies of the Software, and to
84
+ permit persons to whom the Software is furnished to do so, subject to
85
+ the following conditions:
86
+
87
+ The above copyright notice and this permission notice shall be
88
+ included in all copies or substantial portions of the Software.
89
+
90
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
91
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
92
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
93
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
94
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
95
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
96
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,26 @@
1
+ require 'rubygems'
2
+ gem 'hoe', '>= 2.1.0'
3
+ require 'hoe'
4
+ require 'fileutils'
5
+ require './lib/rbpwdchecker'
6
+
7
+ Hoe.plugin :newgem
8
+ # Hoe.plugin :website
9
+ # Hoe.plugin :cucumberfeatures
10
+
11
+ # Generate all the Rake tasks
12
+ # Run 'rake -T' to see list of generated tasks (from gem root directory)
13
+ $hoe = Hoe.spec 'rbpwdchecker' do
14
+ self.developer 'Gabriel Medina (Rha7)', 'rha7.com@gmail.com'
15
+ self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
16
+ self.rubyforge_name = self.name # TODO this is default value
17
+ # self.extra_deps = [['activesupport','>= 2.0.2']]
18
+
19
+ end
20
+
21
+ require 'newgem/tasks'
22
+ Dir['tasks/**/*.rake'].each { |t| load t }
23
+
24
+ # TODO - want other tests/tasks run by default? Add them to the list
25
+ # remove_task :default
26
+ # task :default => [:spec, :features]
@@ -0,0 +1,7 @@
1
+ require 'mkmf'
2
+
3
+ dir_config("rbpwdchecker")
4
+
5
+ have_library('crack')
6
+
7
+ create_makefile("rbpwdchecker")
Binary file
@@ -0,0 +1,8 @@
1
+ $:.unshift(File.dirname(__FILE__)) unless
2
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
+
4
+ require File.join(File.dirname(__FILE__), '..', 'ext', 'rbpwdchecker', 'rbpwdchecker') if File.exists?(File.join(File.dirname(__FILE__), '..', 'ext', 'rbpwdchecker', 'rbpwdchecker.so'))
5
+
6
+ module Rbpwdchecker
7
+ VERSION = '0.0.1'
8
+ end
data/script/console ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ # File: script/console
3
+ irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
4
+
5
+ libs = " -r irb/completion"
6
+ # Perhaps use a console_lib to store any extra methods I may want available in the cosole
7
+ # libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
8
+ libs << " -r #{File.dirname(__FILE__) + '/../lib/rbpwdchecker.rb'}"
9
+ puts "Loading rbpwdchecker gem"
10
+ exec "#{irb} #{libs} --simple-prompt"
data/script/destroy ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/destroy'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Destroy.new.run(ARGV)
data/script/generate ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/generate'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Generate.new.run(ARGV)
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rbpwdchecker
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Gabriel Medina (Rha7)
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-05-18 00:00:00 -06:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rubyforge
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 2.0.4
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: gemcutter
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.5.0
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: hoe
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 2.5.0
44
+ version:
45
+ description: Pro-active password checker tool (libcrack2).
46
+ email:
47
+ - rha7.com@gmail.com
48
+ executables: []
49
+
50
+ extensions:
51
+ - ext/rbpwdchecker/extconf.rb
52
+ extra_rdoc_files:
53
+ - History.txt
54
+ - Manifest.txt
55
+ - PostInstall.txt
56
+ files:
57
+ - History.txt
58
+ - Manifest.txt
59
+ - PostInstall.txt
60
+ - README.rdoc
61
+ - Rakefile
62
+ - lib/rbpwdchecker.rb
63
+ - script/console
64
+ - script/destroy
65
+ - script/generate
66
+ - ext/rbpwdchecker/rbpwdchecker.so
67
+ - ext/rbpwdchecker/extconf.rb
68
+ has_rdoc: true
69
+ homepage: http://github.com/#{github_username}/#{project_name}
70
+ licenses: []
71
+
72
+ post_install_message: PostInstall.txt
73
+ rdoc_options:
74
+ - --main
75
+ - README.rdoc
76
+ require_paths:
77
+ - lib
78
+ - ext/rbpwdchecker
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: "0"
84
+ version:
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: "0"
90
+ version:
91
+ requirements: []
92
+
93
+ rubyforge_project: rbpwdchecker
94
+ rubygems_version: 1.3.5
95
+ signing_key:
96
+ specification_version: 3
97
+ summary: A simple password validity checker based on libcrack2 (pro-active password checker library).
98
+ test_files: []
99
+