word_gen 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7233939662eca4e9857932d846ee0c55acf9cea
4
- data.tar.gz: cbd2d00472d24f7d2ef5265f49cf351ca0c70d02
3
+ metadata.gz: 782a32e5d6e71a893639c3448d53c50c5be3f8e7
4
+ data.tar.gz: dac13905a24368d063848f3442302a72ad7cdce0
5
5
  SHA512:
6
- metadata.gz: 9ddd7d54f911eb39e01c2519c05e16751dd07931e6a2fdc40fe8816fad20694416d7c563045c27442ac2c99c2731e7e3ccc19107bdd7a126eeb8c9c6bdbce43f
7
- data.tar.gz: 6b5d64ba38270f6934d8d7b3ab9bc00a832ee139c1710a8861e12dce0b088c4c18850a680c75db1ce3ac7d552a7996c2849b41ef7377648b32b1dbbe4f9003cc
6
+ metadata.gz: 329baf499c4494cca20fe02aae5d766d04c0d7eb2d4db360b1454e6a8f1d9ee589a58aa16940781f5e352939d36ed80e9db90d51b9d1b5d962bc49195d2055a6
7
+ data.tar.gz: 12ea428c36c337414c18ecd15f8c1a3737a95eb7c8bce9bc5b415fe272c2605f099dfcde4a2f597c5f971792456d56709701602b87f6ec5788e12d3c96bc06b3
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # WordGen
2
2
 
3
- A simple word generator written in Ruby. It generates all possible combinations
3
+ A simple word list generator written in Ruby. It generates all possible combinations
4
4
  of characters in the given length. It comes with different character sets to choose from.
5
5
  You can use `word_gen -l` to get a list of all available sets.
6
6
 
@@ -39,6 +39,13 @@ Usage: word_gen [options]
39
39
 
40
40
  ## Examples
41
41
 
42
+ It can be used with other software like aircrack-ng:
43
+
44
+ ```
45
+ word_gen -w 4 -s NUMERIC | aircrack-ng -w - some_file.cap
46
+ ```
47
+
48
+ Or as a standalone command line tool:
42
49
  ```
43
50
  word_gen -w 3 -s NUMERIC
44
51
  11
@@ -145,7 +152,7 @@ word_gen -w 3 -s NUMERIC
145
152
 
146
153
  ## Specs
147
154
 
148
- TODO: write specs
155
+ TODO: write more specs
149
156
 
150
157
 
151
158
  ## Contributing
data/bin/word_gen CHANGED
@@ -44,6 +44,10 @@ OptionParser.new do |opts|
44
44
  exit
45
45
  end
46
46
 
47
+ opts.on('-r', '--[no-]random', 'Shuffle the character set before execution') do |t|
48
+ options[:shuffle] = t
49
+ end
50
+
47
51
  opts.on_tail('-h', '--help', '--usage', 'Prints this help') do
48
52
  puts opts
49
53
  exit
@@ -58,6 +62,7 @@ end.parse!
58
62
  word_length = options[:word_length]
59
63
  character_set = options[:character_set]
60
64
  output_file = options[:output_file]
65
+ shuffle = options.fetch(:shuffle, false)
61
66
 
62
67
  unless character_set && WordGen::Modes.constants.include?(character_set.to_sym)
63
68
  puts 'Choose a character set with -s'
@@ -70,10 +75,13 @@ unless word_length
70
75
  exit 1
71
76
  end
72
77
 
78
+ mode = WordGen::Modes.class_eval character_set
79
+ mode = mode.shuffle if shuffle
80
+
73
81
  if output_file
74
82
  File.open(output_file, "w+") do |file|
75
- WordGen::Generator.new(word_length, WordGen::Modes.class_eval(character_set), file).start
83
+ WordGen::Generator.new(word_length, mode, file).start
76
84
  end
77
85
  else
78
- WordGen::Generator.new(word_length, WordGen::Modes.class_eval(character_set)).start
86
+ WordGen::Generator.new(word_length, mode).start
79
87
  end
@@ -1,3 +1,3 @@
1
1
  module WordGen
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/word_gen.gemspec CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "word_gen"
8
8
  spec.version = WordGen::VERSION
9
9
  spec.authors = ["Stefan Schmidt"]
10
- spec.email = ["schlubbi@me.com"]
11
- spec.summary = %q{Generate WordLists}
12
- spec.description = %q{Generate WordLists and display them on STDOUT or save them to a file.}
13
- spec.homepage = "http://schlubbi.io"
10
+ spec.email = ["mail@schlubbi.io"]
11
+ spec.summary = %q{Generate word lists}
12
+ spec.description = %q{Generate word lists and display them on STDOUT or save them to a file.}
13
+ spec.homepage = "https://github.com/schlubbi/word_gen"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: word_gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Schmidt
@@ -66,9 +66,9 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: Generate WordLists and display them on STDOUT or save them to a file.
69
+ description: Generate word lists and display them on STDOUT or save them to a file.
70
70
  email:
71
- - schlubbi@me.com
71
+ - mail@schlubbi.io
72
72
  executables:
73
73
  - word_gen
74
74
  extensions: []
@@ -87,7 +87,7 @@ files:
87
87
  - spec/spec_helper.rb
88
88
  - spec/word_gen/generator_spec.rb
89
89
  - word_gen.gemspec
90
- homepage: http://schlubbi.io
90
+ homepage: https://github.com/schlubbi/word_gen
91
91
  licenses:
92
92
  - MIT
93
93
  metadata: {}
@@ -110,7 +110,7 @@ rubyforge_project:
110
110
  rubygems_version: 2.0.3
111
111
  signing_key:
112
112
  specification_version: 4
113
- summary: Generate WordLists
113
+ summary: Generate word lists
114
114
  test_files:
115
115
  - spec/spec_helper.rb
116
116
  - spec/word_gen/generator_spec.rb