wordlist 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +3 -0
- data/.gitignore +11 -0
- data/.rspec +1 -0
- data/.yardopts +1 -0
- data/{History.txt → ChangeLog.md} +5 -1
- data/LICENSE.txt +22 -0
- data/README.md +96 -0
- data/Rakefile +30 -17
- data/bin/wordlist +10 -0
- data/gemspec.yml +22 -0
- data/lib/wordlist/builder.rb +144 -25
- data/lib/wordlist/builders/website.rb +184 -12
- data/lib/wordlist/flat_file.rb +15 -4
- data/lib/wordlist/list.rb +63 -32
- data/lib/wordlist/mutator.rb +38 -9
- data/lib/wordlist/parsers.rb +24 -19
- data/lib/wordlist/runners.rb +2 -0
- data/lib/wordlist/runners/list.rb +116 -0
- data/lib/wordlist/runners/runner.rb +67 -0
- data/lib/wordlist/unique_filter.rb +47 -8
- data/lib/wordlist/version.rb +1 -1
- data/scripts/benchmark +43 -2
- data/spec/builder_examples.rb +46 -0
- data/spec/builder_spec.rb +97 -6
- data/spec/classes/parser_class.rb +2 -0
- data/spec/helpers/text.rb +6 -0
- data/spec/helpers/wordlist.rb +23 -0
- data/spec/spec_helper.rb +2 -4
- data/wordlist.gemspec +60 -0
- metadata +106 -62
- data/Manifest.txt +0 -30
- data/README.txt +0 -103
- data/tasks/spec.rb +0 -9
data/Manifest.txt
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
Manifest.txt
|
3
|
-
README.txt
|
4
|
-
Rakefile
|
5
|
-
lib/wordlist.rb
|
6
|
-
lib/wordlist/unique_filter.rb
|
7
|
-
lib/wordlist/parsers.rb
|
8
|
-
lib/wordlist/builder.rb
|
9
|
-
lib/wordlist/builders.rb
|
10
|
-
lib/wordlist/builders/website.rb
|
11
|
-
lib/wordlist/mutator.rb
|
12
|
-
lib/wordlist/list.rb
|
13
|
-
lib/wordlist/flat_file.rb
|
14
|
-
lib/wordlist/version.rb
|
15
|
-
tasks/spec.rb
|
16
|
-
scripts/benchmark
|
17
|
-
scripts/text/comedy_of_errors.txt
|
18
|
-
spec/classes/parser_class.rb
|
19
|
-
spec/classes/test_list.rb
|
20
|
-
spec/text/previous_wordlist.txt
|
21
|
-
spec/text/sample.txt
|
22
|
-
spec/text/flat_file.txt
|
23
|
-
spec/spec_helper.rb
|
24
|
-
spec/unique_filter_spec.rb
|
25
|
-
spec/parsers_spec.rb
|
26
|
-
spec/mutator_spec.rb
|
27
|
-
spec/builder_spec.rb
|
28
|
-
spec/list_spec.rb
|
29
|
-
spec/flat_file_spec.rb
|
30
|
-
spec/wordlist_spec.rb
|
data/README.txt
DELETED
@@ -1,103 +0,0 @@
|
|
1
|
-
= Wordlist
|
2
|
-
|
3
|
-
* http://wordlist.rubyforge.org/
|
4
|
-
* http://github.com/sophsec/wordlist/
|
5
|
-
* Postmodern (postmodern.mod3 at gmail.com)
|
6
|
-
|
7
|
-
== DESCRIPTION:
|
8
|
-
|
9
|
-
A Ruby library for generating and working with word-lists. Wordlist allows
|
10
|
-
one to efficiently generate unique word-lists from arbitrary text or
|
11
|
-
other sources, such as website content. Wordlist can also quickly enumerate
|
12
|
-
through words within an existing word-list, applying multiple mutation
|
13
|
-
rules to each word in the list.
|
14
|
-
|
15
|
-
== FEATURES:
|
16
|
-
|
17
|
-
* Uses a bucket system of CRC32 hashes for efficient filtering of duplicate
|
18
|
-
words.
|
19
|
-
* Supports adding mutation rules to a word-list, which are applied to
|
20
|
-
words as the list is enumerated.
|
21
|
-
* Supports building word-lists from arbitrary text.
|
22
|
-
* Supports custom word-list builders:
|
23
|
-
* Wordlist::Builders::Website: Build word-lists from website content.
|
24
|
-
* Supports custom word-list formats:
|
25
|
-
* Wordlist::FlatFile: Enumerates through the words in a flat-file
|
26
|
-
word-list.
|
27
|
-
|
28
|
-
== EXAMPLES:
|
29
|
-
|
30
|
-
* Build a word-list from arbitrary text:
|
31
|
-
|
32
|
-
Wordlist::Builder.build('list.txt') do |builder|
|
33
|
-
builder.parse(some_text)
|
34
|
-
end
|
35
|
-
|
36
|
-
* Build a word-list from another file:
|
37
|
-
|
38
|
-
Wordlist::Builder.build('list.txt') do |builder|
|
39
|
-
builder.parse_file('some/file.txt')
|
40
|
-
end
|
41
|
-
|
42
|
-
* Build a word-list from content off a website:
|
43
|
-
|
44
|
-
require 'wordlist/builders/website'
|
45
|
-
|
46
|
-
Wordlist::Builders::Website.build('list.txt','www.example.com')
|
47
|
-
|
48
|
-
* Enumerate through each word in a flat-file word-list:
|
49
|
-
|
50
|
-
list = Wordlist::FlatFile.new('list.txt')
|
51
|
-
list.each_word do |word|
|
52
|
-
puts word
|
53
|
-
end
|
54
|
-
|
55
|
-
* Enumerate through each unique word in a flat-file word-list:
|
56
|
-
|
57
|
-
list.each_unique do |word|
|
58
|
-
puts word
|
59
|
-
end
|
60
|
-
|
61
|
-
* Define mutation rules, and enumerate through each unique mutation of each
|
62
|
-
unique word in the word-list:
|
63
|
-
|
64
|
-
list.mutate 'o', '0'
|
65
|
-
list.mutate 'a', 0x41
|
66
|
-
list.mutate(/[hax]/i) { |match| match.swapcase }
|
67
|
-
|
68
|
-
list.each_mutation do |word|
|
69
|
-
puts word
|
70
|
-
end
|
71
|
-
|
72
|
-
== REQUIREMENTS:
|
73
|
-
|
74
|
-
* {spidr}[http://spidr.rubyforge.org] >= 0.1.9
|
75
|
-
|
76
|
-
== INSTALL:
|
77
|
-
|
78
|
-
$ sudo gem install wordlist
|
79
|
-
|
80
|
-
== LICENSE:
|
81
|
-
|
82
|
-
Wordlist - A Ruby library for generating and working with word-lists.
|
83
|
-
|
84
|
-
Copyright (c) 2009 Hal Brodigan
|
85
|
-
|
86
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
87
|
-
a copy of this software and associated documentation files (the
|
88
|
-
'Software'), to deal in the Software without restriction, including
|
89
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
90
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
91
|
-
permit persons to whom the Software is furnished to do so, subject to
|
92
|
-
the following conditions:
|
93
|
-
|
94
|
-
The above copyright notice and this permission notice shall be
|
95
|
-
included in all copies or substantial portions of the Software.
|
96
|
-
|
97
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
98
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
99
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
100
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
101
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
102
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
103
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|