ronin 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,11 @@
1
+ ### 1.4.1 / 2012-04-01
2
+
3
+ * Removed dependencey on env.
4
+ * Removed `#to_ary` methods from Ronin Models that were causing
5
+ `SystemStackError: stack level too deep` exceptions. Fixes issue #4.
6
+ * Ensure that {Ronin::AutoLoad} will finalize models loaded via `require_const`.
7
+ * {Ronin::UI::CLI::Command#start} now rescues Interupts.
8
+
1
9
  ### 1.4.0 / 2012-02-12
2
10
 
3
11
  * Require open_namespace ~> 0.4.
data/Gemfile CHANGED
@@ -1,14 +1,14 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- DM_URI = 'http://github.com/datamapper'
4
- DM_VERSION = '~> 1.1.0'
3
+ DM_URI = 'http://github.com/datamapper'
4
+ DM_VERSION = '~> 1.2'
5
5
  DO_VERSION = '~> 0.10.3'
6
- RONIN_URI = 'http://github.com/ronin-ruby'
6
+ RONIN_URI = 'http://github.com/ronin-ruby'
7
7
 
8
8
  gemspec
9
9
 
10
10
  platforms :jruby do
11
- gem 'jruby-openssl', '~> 0.7.0'
11
+ gem 'jruby-openssl', '~> 0.7'
12
12
  end
13
13
 
14
14
  # DataMapper dependencies
@@ -35,8 +35,8 @@ group :development do
35
35
  gem 'rspec', '~> 2.4'
36
36
 
37
37
  gem 'kramdown', '~> 0.12'
38
- gem 'ruby-graphviz', '~> 0.9.10'
39
- gem 'dm-visualizer', '~> 0.2.0'
38
+ gem 'ruby-graphviz', '~> 0.9'
39
+ gem 'dm-visualizer', '~> 0.2'
40
40
  end
41
41
 
42
42
  #
data/README.md CHANGED
@@ -1,17 +1,20 @@
1
1
  # Ronin
2
2
 
3
3
  * [Website](http://ronin-ruby.github.com)
4
- * [Source](http://github.com/ronin-ruby/ronin)
5
- * [Issues](http://github.com/ronin-ruby/ronin/issues)
6
- * [Documentation](http://rubydoc.info/gems/ronin/frames)
4
+ * [Source](https://github.com/ronin-ruby/ronin)
5
+ * [Issues](https://github.com/ronin-ruby/ronin/issues)
6
+ * [Documentation](http://ronin-ruby.github.com/docs/ronin/frames)
7
7
  * [Mailing List](http://groups.google.com/group/ronin-ruby)
8
8
  * [irc.freenode.net #ronin](http://webchat.freenode.net/?channels=ronin&uio=Mj10cnVldd)
9
9
 
10
10
  ## Description
11
11
 
12
- Ronin is a Ruby platform for exploit development and security research.
13
- Ronin allows for the rapid development and distribution of code, exploits
14
- or payloads over many common Source-Code-Management (SCM) systems.
12
+ Ronin is a [Ruby](http://www.ruby-lang.org) platform for
13
+ [exploit development](http://www.exploit-db.com) and security research.
14
+ Ronin allows for the rapid development and distribution of code,
15
+ [exploits](https://github.com/postmodern/postmodern/blob/master/scripts/exploits/http/oracle/dav_bypass.rb)
16
+ or [payloads](https://gist.github.com/1403961) via
17
+ [Repositories](https://github.com/postmodern/postmodern).
15
18
 
16
19
  ### Customized Console
17
20
 
@@ -38,8 +41,8 @@ miscallaneous Data, Code, Exploits, Payloads, Scanners, etc.
38
41
  ### Libraries
39
42
 
40
43
  Ronin provides libraries with additional functionality, such as
41
- [Exploitation](http://github.com/ronin-ruby/ronin-exploits#readme)
42
- and [Scanning](http://github.com/ronin-ruby/ronin-scanners#readme).
44
+ [Exploitation](https://github.com/ronin-ruby/ronin-exploits#readme)
45
+ and [Scanning](https://github.com/ronin-ruby/ronin-scanners#readme).
43
46
 
44
47
  $ gem install ronin-exploits
45
48
 
@@ -72,24 +75,25 @@ and [Scanning](http://github.com/ronin-ruby/ronin-scanners#readme).
72
75
  * {Ronin::URL}
73
76
  * {Ronin::EmailAddress}
74
77
  * {Ronin::Credential}
75
- * {Ronin::ServiceCredential}
76
- * {Ronin::WebCredential}
78
+ * {Ronin::ServiceCredential}
79
+ * {Ronin::WebCredential}
77
80
  * {Ronin::Organization}
78
81
  * {Ronin::Campaign}
79
82
  * {Ronin::Target}
80
83
  * Caches exploits, payloads, scanners, etc stored within Repositories
81
84
  into the Database.
82
85
  * Convenience methods provided by
83
- [ronin-support](http://github.com/ronin-ruby/ronin-support#readme).
84
- * Provides a customized Ruby Console with:
86
+ [ronin-support](https://github.com/ronin-ruby/ronin-support#readme).
87
+ * Provides a customized Ruby Console using
88
+ [Ripl](https://github.com/cldwalker/ripl#readme) with:
85
89
  * Syntax highlighting.
86
- * Tab-completion.
87
- * Auto-indentation.
88
- * Pretty-Printing (`pp`).
90
+ * Tab completion.
91
+ * Auto indentation.
92
+ * Pretty Printing (`pp`).
89
93
  * `print_info`, `print_error`, `print_warning` and `print_debug`
90
94
  output helper methods with color-output.
91
- * Provides an extensible command-line interface based on
92
- [Thor](http://github.com/wycats/thor#readme).
95
+ * Inline commands (`!nmap -v -sT victim.com`)
96
+ * Provides an extensible command-line interface.
93
97
 
94
98
  ## Synopsis
95
99
 
@@ -107,7 +111,7 @@ View available commands:
107
111
 
108
112
  Install a Repository:
109
113
 
110
- $ ronin repos --install svn://example.com/path/to/repo
114
+ $ ronin install svn://example.com/path/to/repo
111
115
 
112
116
  List installed Repositories:
113
117
 
@@ -115,15 +119,15 @@ List installed Repositories:
115
119
 
116
120
  Update all installed Repositories:
117
121
 
118
- $ ronin repos --update
122
+ $ ronin update
119
123
 
120
124
  Update a specific Repositories:
121
125
 
122
- $ ronin repos --update repo-name
126
+ $ ronin update repo-name
123
127
 
124
128
  Uninstall a specific Repositories:
125
129
 
126
- $ ronin repos --uninstall repo-name
130
+ $ ronin uninstall repo-name
127
131
 
128
132
  List available Databases:
129
133
 
@@ -141,36 +145,34 @@ Remove a Database:
141
145
 
142
146
  * [Ruby](http://www.ruby-lang.org/) >= 1.8.7
143
147
  * [DataMapper](http://datamapper.org/):
144
- * [dm-sqlite-adapter](http://github.com/datamapper/dm-sqlite-adapter#readme)
148
+ * [dm-sqlite-adapter](https://github.com/datamapper/dm-sqlite-adapter#readme)
145
149
  ~> 1.2
146
150
  * [libsqlite3](http://sqlite.org/)
147
- * [dm-core](http://github.com/datamapper/dm-core#readme)
151
+ * [dm-core](https://github.com/datamapper/dm-core#readme)
148
152
  ~> 1.2
149
- * [dm-types](http://github.com/datamapper/dm-types#readme)
153
+ * [dm-types](https://github.com/datamapper/dm-types#readme)
150
154
  ~> 1.2
151
- * [dm-migrations](http://github.com/datamapper/dm-migrations#readme)
155
+ * [dm-migrations](https://github.com/datamapper/dm-migrations#readme)
152
156
  ~> 1.2
153
- * [dm-validations](http://github.com/datamapper/dm-validations#readme)
157
+ * [dm-validations](https://github.com/datamapper/dm-validations#readme)
154
158
  ~> 1.2
155
- * [dm-aggregates](http://github.com/datamapper/dm-aggregates#readme)
159
+ * [dm-aggregates](https://github.com/datamapper/dm-aggregates#readme)
156
160
  ~> 1.2
157
- * [dm-timestamps](http://github.com/datamapper/dm-timestamps#readme)
161
+ * [dm-timestamps](https://github.com/datamapper/dm-timestamps#readme)
158
162
  ~> 1.2
159
- * [dm-is-predefined](http://github.com/postmodern/dm-is-predefined#readme)
163
+ * [dm-is-predefined](https://github.com/postmodern/dm-is-predefined#readme)
160
164
  ~> 0.4
161
- * [uri-query_params](http://github.com/postmodern/uri-query_params#readme)
165
+ * [uri-query_params](https://github.com/postmodern/uri-query_params#readme)
162
166
  ~> 0.6
163
- * [open_namespace](http://github.com/postmodern/open_namespace#readme)
167
+ * [open_namespace](https://github.com/postmodern/open_namespace#readme)
164
168
  ~> 0.4
165
- * [data_paths](http://github.com/postmodern/data_paths#readme)
169
+ * [data_paths](https://github.com/postmodern/data_paths#readme)
166
170
  ~> 0.3
167
- * [object_loader](http://github.com/postmodern/object_loader#readme)
171
+ * [object_loader](https://github.com/postmodern/object_loader#readme)
168
172
  ~> 1.0
169
- * [parameters](http://github.com/postmodern/parameters#readme)
173
+ * [parameters](https://github.com/postmodern/parameters#readme)
170
174
  ~> 0.4
171
- * [env](http://github.com/postmodern/env#readme)
172
- ~> 0.2
173
- * [pullr](http://github.com/postmodern/pullr#readme)
175
+ * [pullr](https://github.com/postmodern/pullr#readme)
174
176
  ~> 0.1, >= 0.1.2
175
177
  * [ripl](https://github.com/cldwalker/ripl#readme)
176
178
  ~> 0.3
@@ -178,11 +180,11 @@ Remove a Database:
178
180
  ~> 0.2
179
181
  * [ripl-auto_indent](https://github.com/janlelis/ripl-auto_indent#readme)
180
182
  ~> 0.1
181
- * [ripl-short_errors](http://rubygems.org/gems/ripl-short_errors)
183
+ * [ripl-short_errors](https://rubygems.org/gems/ripl-short_errors)
182
184
  ~> 0.1
183
185
  * [ripl-color_result](https://github.com/janlelis/ripl-color_result#readme)
184
186
  ~> 0.3
185
- * [ronin-support](http://github.com/ronin-ruby/ronin-support#readme)
187
+ * [ronin-support](https://github.com/ronin-ruby/ronin-support#readme)
186
188
  ~> 0.4
187
189
 
188
190
  ## Install
@@ -3,7 +3,7 @@ summary: A Ruby platform for exploit development and security research.
3
3
  description:
4
4
  Ronin is a Ruby platform for exploit development and security research.
5
5
  Ronin allows for the rapid development and distribution of code, exploits
6
- or payloads over many common Source-Code-Management (SCM) systems.
6
+ or payloads via Repositories.
7
7
 
8
8
  license: GPL-3
9
9
  authors: Postmodern
@@ -15,14 +15,14 @@ post_install_message: |
15
15
 
16
16
  Thank you for installing Ronin!
17
17
 
18
- To list the available commands:
19
-
20
- $ ronin help
21
-
22
18
  To start the Ronin Console:
23
19
 
24
20
  $ ronin
25
21
 
22
+ To list the available commands:
23
+
24
+ $ ronin help
25
+
26
26
  Additional functionality can be added to Ronin by installing additional
27
27
  libraries:
28
28
 
@@ -55,7 +55,6 @@ dependencies:
55
55
  data_paths: ~> 0.3
56
56
  object_loader: ~> 1.0
57
57
  parameters: ~> 0.4
58
- env: ~> 0.2
59
58
  pullr: ~> 0.1, >= 0.1.2
60
59
  ripl: ~> 0.3
61
60
  ripl-multi_line: ~> 0.2
@@ -67,6 +66,6 @@ dependencies:
67
66
 
68
67
  development_dependencies:
69
68
  bundler: ~> 1.0
70
- yard: ~> 0.7.0
71
- yard-dm: ~> 0.1.1
72
- yard-dm-is-predefined: ~> 0.2.0
69
+ yard: ~> 0.7
70
+ yard-dm: ~> 0.1
71
+ yard-dm-is-predefined: ~> 0.2
@@ -17,10 +17,10 @@
17
17
  # along with Ronin. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
+ require 'ronin/config'
20
21
  require 'ronin/ui/console/commands'
21
22
 
22
23
  require 'set'
23
- require 'env'
24
24
 
25
25
  complete(:on => /^[\!\.][a-zA-Z]\w*/) do |cmd|
26
26
  prefix = cmd[0,1]
@@ -29,10 +29,10 @@ complete(:on => /^[\!\.][a-zA-Z]\w*/) do |cmd|
29
29
  paths = Set[]
30
30
 
31
31
  # search through $PATH for similar program names
32
- Env.paths.each do |dir|
33
- Pathname.glob(dir.join(glob)) do |path|
34
- if (path.file? && path.executable?)
35
- paths << "#{prefix}#{path.basename}"
32
+ Ronin::Config::BIN_DIRS.each do |dir|
33
+ Dir.glob(File.join(dir,glob)) do |path|
34
+ if (File.file?(path) && File.executable?(path))
35
+ paths << "#{prefix}#{File.basename(path)}"
36
36
  end
37
37
  end
38
38
  end
@@ -44,28 +44,6 @@ module Ronin
44
44
  # Address length of the architecture
45
45
  property :address_length, Integer, :required => true
46
46
 
47
- #
48
- # Splats the architecture into multiple variables.
49
- #
50
- # @return [Array]
51
- # The {#endian} and {#address_length} of the architecture.
52
- #
53
- # @example
54
- # endian, address_length = Arch.x86
55
- #
56
- # endian
57
- # # => 'little'
58
- # address_length
59
- # # => 4
60
- #
61
- # @since 1.0.0
62
- #
63
- # @api public
64
- #
65
- def to_ary
66
- [self.endian, self.address_length]
67
- end
68
-
69
47
  #
70
48
  # Defines a new pre-defined Arch.
71
49
  #
@@ -17,7 +17,6 @@
17
17
  # along with Ronin. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
- require 'env'
21
20
  require 'data_paths'
22
21
  require 'fileutils'
23
22
 
@@ -25,28 +24,33 @@ module Ronin
25
24
  #
26
25
  # Configuration information for Ronin.
27
26
  #
27
+ # @api semipublic
28
+ #
28
29
  module Config
29
30
  include DataPaths
30
31
  extend DataPaths::Finders
31
32
 
32
33
  # The users home directory
33
- HOME = Env.home
34
+ HOME = Gem.user_home
34
35
 
35
36
  # Ronin home directory
36
- PATH = HOME.join('.ronin')
37
+ PATH = File.join(HOME,'.ronin')
37
38
 
38
39
  # Configuration files directory
39
- CONFIG_DIR = PATH.join('config')
40
+ CONFIG_DIR = File.join(PATH,'config')
40
41
 
41
42
  # Directory which repositories are installed into
42
- REPOS_DIR = PATH.join('repos')
43
+ REPOS_DIR = File.join(PATH,'repos')
43
44
 
44
45
  # Temporary file directory
45
- TMP_DIR = PATH.join('tmp')
46
+ TMP_DIR = File.join(PATH,'tmp')
47
+
48
+ # Directories which contain binaries
49
+ BIN_DIRS = ENV.fetch('PATH','').split(File::PATH_SEPARATOR)
46
50
 
47
- PATH.mkdir unless PATH.directory?
48
- CONFIG_DIR.mkdir unless PATH.directory?
49
- TMP_DIR.mkdir unless TMP_DIR.directory?
51
+ [PATH, CONFIG_DIR, TMP_DIR].each do |dir|
52
+ FileUtils.mkdir(dir) unless File.directory?(dir)
53
+ end
50
54
 
51
55
  #
52
56
  # Loads the Ronin configuration file.
@@ -65,13 +69,14 @@ module Ronin
65
69
  # @api semipublic
66
70
  #
67
71
  def Config.load(name=nil)
68
- path = if name
69
- CONFIG_DIR.join("#{name}.rb").expand_path
70
- else
71
- PATH.join('config.rb')
72
- end
72
+ dir, file = if name
73
+ [CONFIG_DIR, "#{name}.rb"]
74
+ else
75
+ [PATH, 'config.rb']
76
+ end
73
77
 
74
- require path if path.file?
78
+ path = File.expand_path(File.join(dir,file))
79
+ require path if File.file?(path)
75
80
  end
76
81
 
77
82
  #
@@ -80,7 +85,7 @@ module Ronin
80
85
  # @param [String] sub_path
81
86
  # The sub-path within {TMP_DIR}.
82
87
  #
83
- # @return [Pathname]
88
+ # @return [String]
84
89
  # The full path within {TMP_DIR}.
85
90
  #
86
91
  # @api semipublic
@@ -88,9 +93,9 @@ module Ronin
88
93
  def Config.tmp_dir(sub_path=nil)
89
94
  if sub_path
90
95
  sub_path = File.expand_path(File.join('',sub_path))
91
- path = TMP_DIR.join(sub_path)
96
+ path = File.join(TMP_DIR,sub_path)
92
97
 
93
- path.mkpath unless path.exist?
98
+ FileUtils.mkdir_p(path) unless File.exist?(path)
94
99
  return path
95
100
  end
96
101
 
@@ -115,27 +115,5 @@ module Ronin
115
115
  "#{self.user_name}:#{self.password}"
116
116
  end
117
117
 
118
- #
119
- # Splits the credential to multiple variables.
120
- #
121
- # @return [Array<String>]
122
- # The user and the password.
123
- #
124
- # @example
125
- # user, password = cred
126
- #
127
- # user
128
- # # => "alice"
129
- # password
130
- # # => "secret"
131
- #
132
- # @since 1.0.0
133
- #
134
- # @api public
135
- #
136
- def to_ary
137
- [self.user_name.name, self.password.clear_text]
138
- end
139
-
140
118
  end
141
119
  end
@@ -255,28 +255,5 @@ module Ronin
255
255
  "#<#{self.class}: #{self}>"
256
256
  end
257
257
 
258
- #
259
- # Splats the email address into multiple variables.
260
- #
261
- # @return [Array]
262
- # The user-name and the host-name within the email address.
263
- #
264
- # @example
265
- # email = EmailAddress.parse('alice@example.com')
266
- # user, host = email
267
- #
268
- # user
269
- # # => "alice"
270
- # host
271
- # # => "example.com"
272
- #
273
- # @since 1.0.0
274
- #
275
- # @api public
276
- #
277
- def to_ary
278
- [self.user_name.name, self.host_name.address]
279
- end
280
-
281
258
  end
282
259
  end
@@ -90,29 +90,6 @@ module Ronin
90
90
  end
91
91
  end
92
92
 
93
- #
94
- # Splits the Operating System into multiple variables.
95
- #
96
- # @return [Array<String>]
97
- # The name and version of the Operating System.
98
- #
99
- # @example
100
- # os = OS.linux('2.6.31')
101
- # name, version = os
102
- #
103
- # name
104
- # # => "Linux"
105
- # version
106
- # # => "2.6.31"
107
- #
108
- # @since 1.0.0
109
- #
110
- # @api public
111
- #
112
- def to_ary
113
- [self.name, self.version]
114
- end
115
-
116
93
  #
117
94
  # Defines a new predefined OS.
118
95
  #
@@ -46,22 +46,22 @@ module Ronin
46
46
  #
47
47
  # summary 'My command'
48
48
  #
49
- # option :enable, :type => true,
50
- # :flag => '-e',
49
+ # option :enable, :type => true,
50
+ # :flag => '-e',
51
51
  # :description => 'Enables stuff'
52
52
  #
53
- # option :syntax, :type => Symbol,
54
- # :flag => '-S',
53
+ # option :syntax, :type => Symbol,
54
+ # :flag => '-S',
55
55
  # :description => 'Syntax to use'
56
56
  #
57
- # option :includes, :type => Array[String],
58
- # :default => [],
59
- # :flag => '-I',
60
- # :usage => 'FILE [...]',
57
+ # option :includes, :type => Array[String],
58
+ # :default => [],
59
+ # :flag => '-I',
60
+ # :usage => 'FILE [...]',
61
61
  # :description => 'Files to include'
62
62
  #
63
- # option :params, :type => Hash[Symbol => Object],
64
- # :flag => '-P',
63
+ # option :params, :type => Hash[Symbol => Object],
64
+ # :flag => '-P',
65
65
  # :description => 'Additional params'
66
66
  #
67
67
  # argument :path
@@ -232,6 +232,8 @@ module Ronin
232
232
 
233
233
  begin
234
234
  run
235
+ rescue Interrupt
236
+ exit
235
237
  rescue => error
236
238
  print_exception(error)
237
239
  exit -1
@@ -58,36 +58,36 @@ module Ronin
58
58
 
59
59
  summary 'Managed Campaigns'
60
60
 
61
- query_option :named, :type => String,
62
- :flag => '-n',
61
+ query_option :named, :type => String,
62
+ :flag => '-n',
63
63
  :description => 'Name to search for'
64
64
 
65
- query_option :describing, :type => String,
66
- :flag => '-d',
65
+ query_option :describing, :type => String,
66
+ :flag => '-d',
67
67
  :description => 'Description to search for'
68
68
 
69
- query_option :targeting, :type => Array,
70
- :flag => '-T',
71
- :usage => 'ADDR [...]',
69
+ query_option :targeting, :type => Array,
70
+ :flag => '-T',
71
+ :usage => 'ADDR [...]',
72
72
  :description => 'Addresses to search for'
73
73
 
74
- query_option :targeting_orgs, :type => Array,
75
- :flag => '-O',
76
- :usage => 'NAME [...]',
74
+ query_option :targeting_orgs, :type => Array,
75
+ :flag => '-O',
76
+ :usage => 'NAME [...]',
77
77
  :description => 'Orgs to search for'
78
78
 
79
- option :list, :type => true,
80
- :default => true,
81
- :flag => '-l',
79
+ option :list, :type => true,
80
+ :default => true,
81
+ :flag => '-l',
82
82
  :description => 'List all Campaigns'
83
83
 
84
- option :add, :type => String,
85
- :flag => '-a',
86
- :usage => 'NAME',
84
+ option :add, :type => String,
85
+ :flag => '-a',
86
+ :usage => 'NAME',
87
87
  :description => 'Create a new Campaign'
88
88
 
89
- option :targets, :type => Array,
90
- :usage => 'ADDR [...]',
89
+ option :targets, :type => Array,
90
+ :usage => 'ADDR [...]',
91
91
  :description => 'Addresses to target'
92
92
 
93
93
  #
@@ -50,8 +50,8 @@ module Ronin
50
50
 
51
51
  summary 'Start the Ronin Console'
52
52
 
53
- option :database, :type => URI,
54
- :flag => '-D',
53
+ option :database, :type => URI,
54
+ :flag => '-D',
55
55
  :description => 'The database to URI'
56
56
 
57
57
  option :require, :type => Array,
@@ -56,19 +56,19 @@ module Ronin
56
56
 
57
57
  summary 'Lists Credentials'
58
58
 
59
- query_option :for_user, :type => String,
60
- :flag => '-u',
61
- :usage => 'USER',
59
+ query_option :for_user, :type => String,
60
+ :flag => '-u',
61
+ :usage => 'USER',
62
62
  :description => 'Username to search for'
63
63
 
64
- query_option :with_password, :type => String,
65
- :flag => '-p',
66
- :usage => 'PASS',
64
+ query_option :with_password, :type => String,
65
+ :flag => '-p',
66
+ :usage => 'PASS',
67
67
  :description => 'Password to search for'
68
68
 
69
- option :list, :type => true,
70
- :default => true,
71
- :flag => '-l',
69
+ option :list, :type => true,
70
+ :default => true,
71
+ :flag => '-l',
72
72
  :description => 'List all Credentials'
73
73
 
74
74
  #
@@ -56,8 +56,8 @@ module Ronin
56
56
 
57
57
  summary 'Manages the Ronin Database'
58
58
 
59
- option :add, :type => Symbol,
60
- :flag => '-a',
59
+ option :add, :type => Symbol,
60
+ :flag => '-a',
61
61
  :usage => 'NAME'
62
62
 
63
63
  option :set, :type => Symbol,
@@ -65,7 +65,7 @@ module Ronin
65
65
  :usage => 'NAME'
66
66
 
67
67
  option :remove, :type => Symbol,
68
- :flag => '-r',
68
+ :flag => '-r',
69
69
  :usage => 'NAME'
70
70
 
71
71
  option :clear, :type => Symbol,
@@ -47,7 +47,7 @@ module Ronin
47
47
 
48
48
  summary 'Uninstalls Ronin Repositories'
49
49
 
50
- argument :repo, :type => String,
50
+ argument :repo, :type => String,
51
51
  :description => 'Repository to uninstall'
52
52
 
53
53
  #
@@ -43,7 +43,7 @@ module Ronin
43
43
  #
44
44
  # ## Arguments
45
45
  #
46
- # TEMPLATE Options word template
46
+ # TEMPLATE Options word template (alpha:7 numeric:1-3)
47
47
  #
48
48
  # @since 1.4.0
49
49
  #
@@ -51,24 +51,24 @@ module Ronin
51
51
 
52
52
  summary 'Builds and/or mutates Wordlists'
53
53
 
54
- option :input, :type => String,
55
- :flag => '-i',
56
- :usage => 'FILE',
54
+ option :input, :type => String,
55
+ :flag => '-i',
56
+ :usage => 'FILE',
57
57
  :description => 'Input file'
58
58
 
59
- option :output, :type => String,
60
- :flag => '-o',
61
- :usage => 'PATH',
59
+ option :output, :type => String,
60
+ :flag => '-o',
61
+ :usage => 'PATH',
62
62
  :description => 'Output wordlist file'
63
63
 
64
- option :mutations, :type => Hash[String => Array],
65
- :default => {},
66
- :flag => '-m',
67
- :usage => 'STRING:SUB',
64
+ option :mutations, :type => Hash[String => Array],
65
+ :default => {},
66
+ :flag => '-m',
67
+ :usage => 'STRING:SUB',
68
68
  :descriptions => 'Mutations rules'
69
69
 
70
70
  argument :template, :type => Array,
71
- :description => 'Options word template'
71
+ :description => 'Options word template (alpha:7 numeric:1-3)'
72
72
 
73
73
  #
74
74
  # Executes the wordlist command.
@@ -17,7 +17,8 @@
17
17
  # along with Ronin. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
- require 'env'
20
+ require 'ronin/config'
21
+
21
22
  require 'set'
22
23
  require 'tempfile'
23
24
 
@@ -34,10 +35,10 @@ module Ronin
34
35
  module Commands
35
36
  # Names and statuses of executables.
36
37
  EXECUTABLES = Hash.new do |hash,key|
37
- hash[key] = Env.paths.any? do |dir|
38
- path = dir.join(key)
38
+ hash[key] = Config::BIN_DIRS.any? do |dir|
39
+ path = File.join(dir,key)
39
40
 
40
- (path.file? && path.executable?)
41
+ (File.file?(path) && File.executable?(path))
41
42
  end
42
43
  end
43
44
 
@@ -90,7 +91,7 @@ module Ronin
90
91
  old_pwd = Dir.pwd
91
92
 
92
93
  new_cwd = if arguments.empty?
93
- Env.home
94
+ Config::HOME
94
95
  elsif arguments.first == '-'
95
96
  unless ENV['OLDPWD']
96
97
  print_warning 'cd: OLDPWD not set'
@@ -135,10 +136,10 @@ module Ronin
135
136
  def Commands.edit(*arguments)
136
137
  path = arguments.first
137
138
 
138
- if Env.editor
139
+ if ENV['EDITOR']
139
140
  path ||= Tempfile.new(['ronin-console', '.rb']).path
140
141
 
141
- system(Env.editor,path) && load(path)
142
+ system(ENV['EDITOR'],path) && load(path)
142
143
  else
143
144
  print_error "Please set the EDITOR env variable"
144
145
  return false
@@ -36,9 +36,9 @@ module Ronin
36
36
  # The history file for the Console session
37
37
  HISTORY_FILE = File.join(Config::PATH,'console.log')
38
38
 
39
- @@color = !(STDOUT.tty?)
39
+ @@color = !(STDOUT.tty?)
40
40
  @@short_errors = !(ENV.has_key?('VERBOSE'))
41
- @@auto_load = []
41
+ @@auto_load = []
42
42
  @@setup_blocks = []
43
43
 
44
44
  #
@@ -200,11 +200,11 @@ module Ronin
200
200
 
201
201
  # Start the Ripl console
202
202
  Ripl.start(
203
- :argv => [],
204
- :name => 'ronin',
203
+ :argv => [],
204
+ :name => 'ronin',
205
205
  :binding => context.instance_eval('binding'),
206
206
  :history => HISTORY_FILE,
207
- :irbrc => false
207
+ :irbrc => false
208
208
  )
209
209
 
210
210
  return context
@@ -19,5 +19,5 @@
19
19
 
20
20
  module Ronin
21
21
  # Ronin version
22
- VERSION = '1.4.0'
22
+ VERSION = '1.4.1'
23
23
  end
@@ -61,11 +61,4 @@ describe Arch do
61
61
  it "should allow custom names for built-in archs" do
62
62
  Arch.x86_64.name.should == 'x86-64'
63
63
  end
64
-
65
- it "should implicitly splat the endian and address length" do
66
- endian, address_length = Arch.x86
67
-
68
- endian.should == Arch.x86.endian
69
- address_length.should == Arch.x86.address_length
70
- end
71
64
  end
@@ -23,11 +23,4 @@ describe Credential do
23
23
  it "should be convertable to a String" do
24
24
  subject.to_s.should == "#{name}:#{secret}"
25
25
  end
26
-
27
- it "should implicitly splat the user-name and password" do
28
- user_name, password = subject
29
-
30
- user_name.should == name
31
- password.should == secret
32
- end
33
26
  end
@@ -77,11 +77,4 @@ describe EmailAddress do
77
77
  it "should convert to a String" do
78
78
  subject.to_s.should == email
79
79
  end
80
-
81
- it "should implicitly splat the user-name and host-name" do
82
- user_name, host_name = subject
83
-
84
- user_name.should == user
85
- host_name.should == host
86
- end
87
80
  end
@@ -28,13 +28,6 @@ describe OS do
28
28
  os.should be_valid
29
29
  end
30
30
 
31
- it "should implicitly splat the name and version" do
32
- name, version = subject
33
-
34
- name.should == subject.name
35
- version.should == subject.version
36
- end
37
-
38
31
  describe "#to_s" do
39
32
  it "should convert both the name and version" do
40
33
  os = OS.new(:name => 'Linux', :version => '2.6.23')
@@ -14,14 +14,16 @@ include Ronin
14
14
 
15
15
  RSpec.configure do |spec|
16
16
  spec.before(:suite) do
17
- BasicModel.auto_migrate!
18
- CustomModel.auto_migrate!
19
- AuthoredModel.auto_migrate!
20
- DescribedModel.auto_migrate!
21
- LicensedModel.auto_migrate!
22
- NamedModel.auto_migrate!
23
- TitledModel.auto_migrate!
24
- MyScript.auto_migrate!
17
+ [
18
+ BasicModel,
19
+ CustomModel,
20
+ AuthoredModel,
21
+ DescribedModel,
22
+ LicensedModel,
23
+ NamedModel,
24
+ TitledModel,
25
+ MyScript
26
+ ].each(&:auto_migrate!)
25
27
  end
26
28
 
27
29
  spec.before(:suite) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-12 00:00:00.000000000 Z
12
+ date: 2012-04-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dm-sqlite-adapter
16
- requirement: &5865880 !ruby/object:Gem::Requirement
16
+ requirement: &22668840 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *5865880
24
+ version_requirements: *22668840
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: dm-core
27
- requirement: &5864900 !ruby/object:Gem::Requirement
27
+ requirement: &22667760 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '1.2'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *5864900
35
+ version_requirements: *22667760
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dm-types
38
- requirement: &5820960 !ruby/object:Gem::Requirement
38
+ requirement: &22667180 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.2'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *5820960
46
+ version_requirements: *22667180
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: dm-constraints
49
- requirement: &5819780 !ruby/object:Gem::Requirement
49
+ requirement: &22735280 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '1.2'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *5819780
57
+ version_requirements: *22735280
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: dm-migrations
60
- requirement: &5818180 !ruby/object:Gem::Requirement
60
+ requirement: &22734320 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '1.2'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *5818180
68
+ version_requirements: *22734320
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: dm-validations
71
- requirement: &5816760 !ruby/object:Gem::Requirement
71
+ requirement: &22732900 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '1.2'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *5816760
79
+ version_requirements: *22732900
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: dm-serializer
82
- requirement: &5815300 !ruby/object:Gem::Requirement
82
+ requirement: &22731240 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '1.2'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *5815300
90
+ version_requirements: *22731240
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: dm-aggregates
93
- requirement: &5793700 !ruby/object:Gem::Requirement
93
+ requirement: &22730480 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '1.2'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *5793700
101
+ version_requirements: *22730480
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: dm-timestamps
104
- requirement: &5792620 !ruby/object:Gem::Requirement
104
+ requirement: &22729700 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '1.2'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *5792620
112
+ version_requirements: *22729700
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: dm-is-predefined
115
- requirement: &5790840 !ruby/object:Gem::Requirement
115
+ requirement: &22728920 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0.4'
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *5790840
123
+ version_requirements: *22728920
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: uri-query_params
126
- requirement: &5788240 !ruby/object:Gem::Requirement
126
+ requirement: &22728260 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0.6'
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *5788240
134
+ version_requirements: *22728260
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: open_namespace
137
- requirement: &5749140 !ruby/object:Gem::Requirement
137
+ requirement: &22872560 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ~>
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0.4'
143
143
  type: :runtime
144
144
  prerelease: false
145
- version_requirements: *5749140
145
+ version_requirements: *22872560
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: data_paths
148
- requirement: &5745960 !ruby/object:Gem::Requirement
148
+ requirement: &22871840 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ~>
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: '0.3'
154
154
  type: :runtime
155
155
  prerelease: false
156
- version_requirements: *5745960
156
+ version_requirements: *22871840
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: object_loader
159
- requirement: &5745420 !ruby/object:Gem::Requirement
159
+ requirement: &22870480 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ~>
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: '1.0'
165
165
  type: :runtime
166
166
  prerelease: false
167
- version_requirements: *5745420
167
+ version_requirements: *22870480
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: parameters
170
- requirement: &5744740 !ruby/object:Gem::Requirement
170
+ requirement: &22869580 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ~>
@@ -175,21 +175,10 @@ dependencies:
175
175
  version: '0.4'
176
176
  type: :runtime
177
177
  prerelease: false
178
- version_requirements: *5744740
179
- - !ruby/object:Gem::Dependency
180
- name: env
181
- requirement: &5743060 !ruby/object:Gem::Requirement
182
- none: false
183
- requirements:
184
- - - ~>
185
- - !ruby/object:Gem::Version
186
- version: '0.2'
187
- type: :runtime
188
- prerelease: false
189
- version_requirements: *5743060
178
+ version_requirements: *22869580
190
179
  - !ruby/object:Gem::Dependency
191
180
  name: pullr
192
- requirement: &5677180 !ruby/object:Gem::Requirement
181
+ requirement: &22868960 !ruby/object:Gem::Requirement
193
182
  none: false
194
183
  requirements:
195
184
  - - ~>
@@ -200,10 +189,10 @@ dependencies:
200
189
  version: 0.1.2
201
190
  type: :runtime
202
191
  prerelease: false
203
- version_requirements: *5677180
192
+ version_requirements: *22868960
204
193
  - !ruby/object:Gem::Dependency
205
194
  name: ripl
206
- requirement: &5674420 !ruby/object:Gem::Requirement
195
+ requirement: &22867540 !ruby/object:Gem::Requirement
207
196
  none: false
208
197
  requirements:
209
198
  - - ~>
@@ -211,10 +200,10 @@ dependencies:
211
200
  version: '0.3'
212
201
  type: :runtime
213
202
  prerelease: false
214
- version_requirements: *5674420
203
+ version_requirements: *22867540
215
204
  - !ruby/object:Gem::Dependency
216
205
  name: ripl-multi_line
217
- requirement: &5672620 !ruby/object:Gem::Requirement
206
+ requirement: &22866760 !ruby/object:Gem::Requirement
218
207
  none: false
219
208
  requirements:
220
209
  - - ~>
@@ -222,10 +211,10 @@ dependencies:
222
211
  version: '0.2'
223
212
  type: :runtime
224
213
  prerelease: false
225
- version_requirements: *5672620
214
+ version_requirements: *22866760
226
215
  - !ruby/object:Gem::Dependency
227
216
  name: ripl-auto_indent
228
- requirement: &5253400 !ruby/object:Gem::Requirement
217
+ requirement: &22866080 !ruby/object:Gem::Requirement
229
218
  none: false
230
219
  requirements:
231
220
  - - ~>
@@ -233,10 +222,10 @@ dependencies:
233
222
  version: '0.1'
234
223
  type: :runtime
235
224
  prerelease: false
236
- version_requirements: *5253400
225
+ version_requirements: *22866080
237
226
  - !ruby/object:Gem::Dependency
238
227
  name: ripl-short_errors
239
- requirement: &4944640 !ruby/object:Gem::Requirement
228
+ requirement: &22865560 !ruby/object:Gem::Requirement
240
229
  none: false
241
230
  requirements:
242
231
  - - ~>
@@ -244,10 +233,10 @@ dependencies:
244
233
  version: '0.1'
245
234
  type: :runtime
246
235
  prerelease: false
247
- version_requirements: *4944640
236
+ version_requirements: *22865560
248
237
  - !ruby/object:Gem::Dependency
249
238
  name: ripl-color_result
250
- requirement: &4934720 !ruby/object:Gem::Requirement
239
+ requirement: &22865000 !ruby/object:Gem::Requirement
251
240
  none: false
252
241
  requirements:
253
242
  - - ~>
@@ -255,10 +244,10 @@ dependencies:
255
244
  version: '0.3'
256
245
  type: :runtime
257
246
  prerelease: false
258
- version_requirements: *4934720
247
+ version_requirements: *22865000
259
248
  - !ruby/object:Gem::Dependency
260
249
  name: ronin-support
261
- requirement: &4933280 !ruby/object:Gem::Requirement
250
+ requirement: &22864500 !ruby/object:Gem::Requirement
262
251
  none: false
263
252
  requirements:
264
253
  - - ~>
@@ -266,10 +255,10 @@ dependencies:
266
255
  version: '0.4'
267
256
  type: :runtime
268
257
  prerelease: false
269
- version_requirements: *4933280
258
+ version_requirements: *22864500
270
259
  - !ruby/object:Gem::Dependency
271
260
  name: bundler
272
- requirement: &4930880 !ruby/object:Gem::Requirement
261
+ requirement: &22860960 !ruby/object:Gem::Requirement
273
262
  none: false
274
263
  requirements:
275
264
  - - ~>
@@ -277,43 +266,43 @@ dependencies:
277
266
  version: '1.0'
278
267
  type: :development
279
268
  prerelease: false
280
- version_requirements: *4930880
269
+ version_requirements: *22860960
281
270
  - !ruby/object:Gem::Dependency
282
271
  name: yard
283
- requirement: &4928740 !ruby/object:Gem::Requirement
272
+ requirement: &22860200 !ruby/object:Gem::Requirement
284
273
  none: false
285
274
  requirements:
286
275
  - - ~>
287
276
  - !ruby/object:Gem::Version
288
- version: 0.7.0
277
+ version: '0.7'
289
278
  type: :development
290
279
  prerelease: false
291
- version_requirements: *4928740
280
+ version_requirements: *22860200
292
281
  - !ruby/object:Gem::Dependency
293
282
  name: yard-dm
294
- requirement: &4922720 !ruby/object:Gem::Requirement
283
+ requirement: &22859400 !ruby/object:Gem::Requirement
295
284
  none: false
296
285
  requirements:
297
286
  - - ~>
298
287
  - !ruby/object:Gem::Version
299
- version: 0.1.1
288
+ version: '0.1'
300
289
  type: :development
301
290
  prerelease: false
302
- version_requirements: *4922720
291
+ version_requirements: *22859400
303
292
  - !ruby/object:Gem::Dependency
304
293
  name: yard-dm-is-predefined
305
- requirement: &4920680 !ruby/object:Gem::Requirement
294
+ requirement: &22858100 !ruby/object:Gem::Requirement
306
295
  none: false
307
296
  requirements:
308
297
  - - ~>
309
298
  - !ruby/object:Gem::Version
310
- version: 0.2.0
299
+ version: '0.2'
311
300
  type: :development
312
301
  prerelease: false
313
- version_requirements: *4920680
302
+ version_requirements: *22858100
314
303
  description: Ronin is a Ruby platform for exploit development and security research.
315
304
  Ronin allows for the rapid development and distribution of code, exploits or payloads
316
- over many common Source-Code-Management (SCM) systems.
305
+ via Repositories.
317
306
  email: postmodern.mod3@gmail.com
318
307
  executables:
319
308
  - ronin
@@ -554,8 +543,8 @@ homepage: http://github.com/ronin-ruby/ronin
554
543
  licenses:
555
544
  - GPL-3
556
545
  post_install_message: ! "*************************************************************************\n\n
557
- \ Thank you for installing Ronin!\n\n To list the available commands:\n\n $
558
- ronin help\n\n To start the Ronin Console:\n\n $ ronin\n\n Additional functionality
546
+ \ Thank you for installing Ronin!\n\n To start the Ronin Console:\n\n $ ronin\n\n
547
+ \ To list the available commands:\n\n $ ronin help\n\n Additional functionality
559
548
  can be added to Ronin by installing additional\n libraries:\n\n * ronin-gen\n
560
549
  \ * ronin-web\n * ronin-exploits\n * ronin-scanners\n\n*************************************************************************\n"
561
550
  rdoc_options: []
@@ -575,7 +564,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
575
564
  version: '0'
576
565
  requirements: []
577
566
  rubyforge_project:
578
- rubygems_version: 1.8.16
567
+ rubygems_version: 1.8.15
579
568
  signing_key:
580
569
  specification_version: 3
581
570
  summary: A Ruby platform for exploit development and security research.