ronin 0.1.2 → 0.1.3
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 +58 -25
- data/Manifest.txt +15 -16
- data/README.txt +16 -11
- data/Rakefile +9 -7
- data/TODO.txt +6 -1
- data/lib/ronin.rb +1 -1
- data/lib/ronin/arch.rb +7 -15
- data/lib/ronin/author.rb +1 -1
- data/lib/ronin/cache.rb +1 -1
- data/lib/ronin/cache/cache.rb +1 -1
- data/lib/ronin/cache/config.rb +1 -1
- data/lib/ronin/cache/exceptions.rb +1 -1
- data/lib/ronin/cache/exceptions/extension_not_found.rb +1 -1
- data/lib/ronin/cache/exceptions/overlay_cached.rb +1 -1
- data/lib/ronin/cache/exceptions/overlay_not_found.rb +1 -1
- data/lib/ronin/cache/extension.rb +15 -190
- data/lib/ronin/cache/extension_cache.rb +2 -2
- data/lib/ronin/cache/maintainer.rb +1 -1
- data/lib/ronin/cache/overlay.rb +8 -7
- data/lib/ronin/cache/overlay_cache.rb +1 -1
- data/lib/ronin/cache/ronin.rb +1 -1
- data/lib/ronin/chars.rb +1 -1
- data/lib/ronin/chars/char_set.rb +1 -1
- data/lib/ronin/chars/chars.rb +1 -1
- data/lib/ronin/code/emittable.rb +1 -1
- data/lib/ronin/code/reference.rb +1 -1
- data/lib/ronin/code/symbol_table.rb +1 -1
- data/lib/ronin/code/token.rb +1 -1
- data/lib/ronin/config.rb +16 -9
- data/lib/ronin/database.rb +2 -113
- data/lib/ronin/database/database.rb +124 -0
- data/lib/ronin/{exceptions/unknown_context.rb → database/exceptions.rb} +2 -5
- data/lib/ronin/{exceptions/context_not_found.rb → database/exceptions/invalid_config.rb} +4 -2
- data/lib/ronin/extensions.rb +1 -1
- data/lib/ronin/extensions/hash.rb +1 -1
- data/lib/ronin/extensions/meta.rb +1 -1
- data/lib/ronin/extensions/string.rb +1 -1
- data/lib/ronin/extensions/uri.rb +1 -1
- data/lib/ronin/extensions/uri/http.rb +1 -1
- data/lib/ronin/extensions/uri/query_params.rb +1 -1
- data/lib/ronin/formatting.rb +1 -1
- data/lib/ronin/formatting/binary.rb +1 -1
- data/lib/ronin/formatting/digest.rb +1 -1
- data/lib/ronin/formatting/extensions.rb +1 -1
- data/lib/ronin/formatting/extensions/binary.rb +1 -1
- data/lib/ronin/formatting/extensions/binary/integer.rb +1 -1
- data/lib/ronin/formatting/extensions/binary/string.rb +1 -1
- data/lib/ronin/formatting/extensions/digest.rb +1 -1
- data/lib/ronin/formatting/extensions/digest/string.rb +1 -1
- data/lib/ronin/formatting/extensions/html.rb +1 -1
- data/lib/ronin/formatting/extensions/html/string.rb +1 -1
- data/lib/ronin/formatting/extensions/http.rb +1 -1
- data/lib/ronin/formatting/extensions/http/string.rb +1 -1
- data/lib/ronin/formatting/extensions/text.rb +1 -1
- data/lib/ronin/formatting/extensions/text/string.rb +1 -1
- data/lib/ronin/formatting/html.rb +1 -1
- data/lib/ronin/formatting/http.rb +1 -1
- data/lib/ronin/formatting/text.rb +1 -1
- data/lib/ronin/{pending_context.rb → has_license.rb} +21 -22
- data/lib/ronin/hexdump.rb +1 -1
- data/lib/ronin/hexdump/extensions.rb +1 -1
- data/lib/ronin/hexdump/extensions/file.rb +1 -1
- data/lib/ronin/hexdump/extensions/kernel.rb +1 -1
- data/lib/ronin/hexdump/hexdump.rb +1 -1
- data/lib/ronin/license.rb +10 -15
- data/lib/ronin/model.rb +14 -12
- data/lib/ronin/models.rb +2 -2
- data/lib/ronin/network.rb +1 -1
- data/lib/ronin/network/esmtp.rb +1 -1
- data/lib/ronin/network/extensions.rb +1 -1
- data/lib/ronin/network/extensions/esmtp.rb +1 -1
- data/lib/ronin/network/extensions/esmtp/net.rb +1 -1
- data/lib/ronin/network/extensions/http.rb +1 -1
- data/lib/ronin/network/extensions/http/net.rb +1 -1
- data/lib/ronin/network/extensions/imap.rb +1 -1
- data/lib/ronin/network/extensions/imap/net.rb +1 -1
- data/lib/ronin/network/extensions/pop3.rb +1 -1
- data/lib/ronin/network/extensions/pop3/net.rb +1 -1
- data/lib/ronin/network/extensions/smtp.rb +1 -1
- data/lib/ronin/network/extensions/smtp/net.rb +1 -1
- data/lib/ronin/network/extensions/tcp.rb +1 -1
- data/lib/ronin/network/extensions/tcp/net.rb +17 -1
- data/lib/ronin/network/extensions/telnet.rb +1 -1
- data/lib/ronin/network/extensions/telnet/net.rb +1 -1
- data/lib/ronin/network/extensions/udp.rb +1 -1
- data/lib/ronin/network/extensions/udp/net.rb +1 -1
- data/lib/ronin/network/http.rb +1 -1
- data/lib/ronin/network/http/exceptions.rb +1 -1
- data/lib/ronin/network/http/exceptions/unknown_request.rb +1 -1
- data/lib/ronin/network/imap.rb +1 -1
- data/lib/ronin/network/pop3.rb +1 -1
- data/lib/ronin/network/smtp.rb +1 -1
- data/lib/ronin/network/smtp/email.rb +1 -1
- data/lib/ronin/network/smtp/smtp.rb +1 -1
- data/lib/ronin/network/tcp.rb +1 -1
- data/lib/ronin/network/telnet.rb +1 -1
- data/lib/ronin/network/udp.rb +1 -1
- data/lib/ronin/objectify.rb +24 -0
- data/lib/ronin/{exceptions/invalid_database_config.rb → objectify/exceptions.rb} +3 -5
- data/lib/ronin/{exceptions → objectify/exceptions}/object_context_not_found.rb +1 -1
- data/lib/ronin/{exceptions → objectify/exceptions}/unknown_object_context.rb +1 -1
- data/lib/ronin/{object_context.rb → objectify/objectify.rb} +54 -45
- data/lib/ronin/path.rb +1 -1
- data/lib/ronin/platform.rb +3 -1
- data/lib/ronin/product.rb +2 -1
- data/lib/ronin/ronin.rb +10 -10
- data/lib/ronin/rpc.rb +1 -1
- data/lib/ronin/rpc/call.rb +1 -1
- data/lib/ronin/rpc/client.rb +1 -1
- data/lib/ronin/rpc/console.rb +1 -1
- data/lib/ronin/rpc/exceptions.rb +1 -1
- data/lib/ronin/rpc/exceptions/not_implemented.rb +1 -1
- data/lib/ronin/rpc/exceptions/response_missing.rb +1 -1
- data/lib/ronin/rpc/response.rb +1 -1
- data/lib/ronin/rpc/service.rb +1 -1
- data/lib/ronin/rpc/shell.rb +1 -1
- data/lib/ronin/sessions.rb +1 -1
- data/lib/ronin/sessions/esmtp.rb +6 -8
- data/lib/ronin/sessions/http.rb +1 -1
- data/lib/ronin/sessions/imap.rb +6 -8
- data/lib/ronin/sessions/pop3.rb +6 -8
- data/lib/ronin/sessions/session.rb +1 -1
- data/lib/ronin/sessions/smtp.rb +6 -8
- data/lib/ronin/sessions/tcp.rb +48 -36
- data/lib/ronin/sessions/telnet.rb +7 -10
- data/lib/ronin/sessions/udp.rb +28 -29
- data/lib/ronin/sessions/web.rb +5 -7
- data/lib/ronin/target.rb +1 -0
- data/lib/ronin/translators/translator.rb +1 -1
- data/lib/ronin/ui/command_line.rb +1 -1
- data/lib/ronin/ui/command_line/command.rb +1 -1
- data/lib/ronin/ui/command_line/command_line.rb +7 -2
- data/lib/ronin/ui/command_line/commands.rb +2 -2
- data/lib/ronin/ui/command_line/commands/add.rb +8 -8
- data/lib/ronin/ui/command_line/commands/default.rb +1 -1
- data/lib/ronin/ui/command_line/commands/extension.rb +13 -26
- data/lib/ronin/ui/command_line/commands/help.rb +1 -1
- data/lib/ronin/ui/command_line/commands/install.rb +7 -7
- data/lib/ronin/ui/command_line/commands/list.rb +13 -7
- data/lib/ronin/ui/command_line/commands/overlay.rb +1 -1
- data/lib/ronin/ui/command_line/commands/remove.rb +4 -4
- data/lib/ronin/ui/command_line/commands/uninstall.rb +4 -4
- data/lib/ronin/ui/command_line/commands/update.rb +3 -3
- data/lib/ronin/ui/command_line/exceptions.rb +1 -1
- data/lib/ronin/ui/command_line/exceptions/unknown_command.rb +1 -1
- data/lib/ronin/ui/command_line/options.rb +1 -1
- data/lib/ronin/ui/command_line/param_parser.rb +73 -0
- data/lib/ronin/ui/console.rb +1 -1
- data/lib/ronin/ui/shell.rb +1 -1
- data/lib/ronin/version.rb +2 -2
- data/lib/ronin/web.rb +1 -1
- data/lib/ronin/web/web.rb +1 -1
- data/spec/chars/char_set_spec.rb +116 -118
- data/spec/chars/chars_spec.rb +54 -63
- data/spec/formatting/{binary_spec.rb → binary/integer_spec.rb} +0 -19
- data/spec/formatting/binary/string_spec.rb +32 -0
- data/spec/{object_context/object_context_spec.rb → objectify/objectify_spec.rb} +5 -3
- data/spec/path_spec.rb +21 -23
- data/spec/translators/translator_spec.rb +38 -40
- data/spec/ui/command_line/param_parser_spec.rb +58 -0
- data/static/extension.rb +9 -0
- metadata +43 -24
- data/lib/ronin/context.rb +0 -236
- data/spec/context/context_spec.rb +0 -84
- data/spec/context/helpers/book_context.rb +0 -15
- data/spec/context/helpers/book_review_context.rb +0 -21
- data/spec/context/helpers/contexts/neuromancer_review.rb +0 -15
- data/spec/context/helpers/contexts/snow_crash.rb +0 -8
- data/static/extension.rb.erb +0 -16
data/lib/ronin/sessions/http.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A ruby development platform designed for information security
|
|
4
4
|
# and data exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
data/lib/ronin/sessions/imap.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A ruby development platform designed for information security
|
|
4
4
|
# and data exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -30,8 +30,8 @@ module Ronin
|
|
|
30
30
|
include Session
|
|
31
31
|
|
|
32
32
|
setup_session do
|
|
33
|
-
parameter :
|
|
34
|
-
parameter :
|
|
33
|
+
parameter :host, :description => 'IMAP host'
|
|
34
|
+
parameter :port, :description => 'IMAP port'
|
|
35
35
|
|
|
36
36
|
parameter :imap_auth, :description => 'IMAP authentication mode'
|
|
37
37
|
parameter :imap_user, :description => 'IMAP user'
|
|
@@ -41,16 +41,14 @@ module Ronin
|
|
|
41
41
|
protected
|
|
42
42
|
|
|
43
43
|
def imap_connect(options={},&block)
|
|
44
|
-
|
|
45
|
-
raise(ParamNotFound,"Missing parameter '#{describe_param(:imap_host)}'",caller)
|
|
46
|
-
end
|
|
44
|
+
require_params :host
|
|
47
45
|
|
|
48
|
-
options[:port] ||= @
|
|
46
|
+
options[:port] ||= @port
|
|
49
47
|
options[:auth] ||= @imap_auth
|
|
50
48
|
options[:user] ||= @imap_user
|
|
51
49
|
options[:password] ||= @imap_password
|
|
52
50
|
|
|
53
|
-
return ::Net.imap_connect(@
|
|
51
|
+
return ::Net.imap_connect(@host,options,&block)
|
|
54
52
|
end
|
|
55
53
|
|
|
56
54
|
def imap_session(options={},&block)
|
data/lib/ronin/sessions/pop3.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A ruby development platform designed for information security
|
|
4
4
|
# and data exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -30,8 +30,8 @@ module Ronin
|
|
|
30
30
|
include Session
|
|
31
31
|
|
|
32
32
|
setup_session do
|
|
33
|
-
parameter :
|
|
34
|
-
parameter :
|
|
33
|
+
parameter :host, :description => 'POP3 host'
|
|
34
|
+
parameter :port, :description => 'POP3 port'
|
|
35
35
|
|
|
36
36
|
parameter :pop3_user, :description => 'POP3 user'
|
|
37
37
|
parameter :pop3_password, :description => 'POP3 password'
|
|
@@ -40,15 +40,13 @@ module Ronin
|
|
|
40
40
|
protected
|
|
41
41
|
|
|
42
42
|
def pop3_connect(options={},&block)
|
|
43
|
-
|
|
44
|
-
raise(ParamNotFound,"Missing parameter #{describe_param(:pop3_host).dump}",caller)
|
|
45
|
-
end
|
|
43
|
+
require_params :host
|
|
46
44
|
|
|
47
|
-
options[:port] ||= @
|
|
45
|
+
options[:port] ||= @port
|
|
48
46
|
options[:user] ||= @pop3_user
|
|
49
47
|
options[:password] ||= @pop3_password
|
|
50
48
|
|
|
51
|
-
return ::Net.pop3_connect(@
|
|
49
|
+
return ::Net.pop3_connect(@host,options,&block)
|
|
52
50
|
end
|
|
53
51
|
|
|
54
52
|
def pop3_session(options={},&block)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A ruby development platform designed for information security
|
|
4
4
|
# and data exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
data/lib/ronin/sessions/smtp.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A ruby development platform designed for information security
|
|
4
4
|
# and data exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -30,8 +30,8 @@ module Ronin
|
|
|
30
30
|
include Session
|
|
31
31
|
|
|
32
32
|
setup_session do
|
|
33
|
-
parameter :
|
|
34
|
-
parameter :
|
|
33
|
+
parameter :host, :description => 'SMTP host'
|
|
34
|
+
parameter :port, :description => 'SMTP port'
|
|
35
35
|
|
|
36
36
|
parameter :smtp_login, :description => 'SMTP login'
|
|
37
37
|
parameter :smtp_user, :description => 'SMTP user'
|
|
@@ -45,16 +45,14 @@ module Ronin
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def smtp_connect(options={},&block)
|
|
48
|
-
|
|
49
|
-
raise(ParamNotFound,"Missing parameter #{describe_param(:smtp_host).dump}",caller)
|
|
50
|
-
end
|
|
48
|
+
require_params :host
|
|
51
49
|
|
|
52
|
-
options[:port] ||= @
|
|
50
|
+
options[:port] ||= @port
|
|
53
51
|
options[:login] ||= @smtp_login
|
|
54
52
|
options[:user] ||= @smtp_user
|
|
55
53
|
options[:password] ||= @smtp_password
|
|
56
54
|
|
|
57
|
-
return ::Net.smtp_connect(@
|
|
55
|
+
return ::Net.smtp_connect(@host,options,&block)
|
|
58
56
|
end
|
|
59
57
|
|
|
60
58
|
def smtp_session(options={},&block)
|
data/lib/ronin/sessions/tcp.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A ruby development platform designed for information security
|
|
4
4
|
# and data exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -30,61 +30,73 @@ module Ronin
|
|
|
30
30
|
include Session
|
|
31
31
|
|
|
32
32
|
setup_session do
|
|
33
|
-
parameter :
|
|
34
|
-
parameter :
|
|
33
|
+
parameter :local_host, :description => 'TCP local host'
|
|
34
|
+
parameter :local_port, :description => 'TCP local port'
|
|
35
35
|
|
|
36
|
-
parameter :
|
|
37
|
-
parameter :
|
|
36
|
+
parameter :host, :description => 'TCP remote host'
|
|
37
|
+
parameter :port, :description => 'TCP remote port'
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
protected
|
|
41
41
|
|
|
42
|
+
#
|
|
43
|
+
# Opens a TCP connection to the host and port specified by the
|
|
44
|
+
# +host+ and +port+ parameters. If the +local_host+ and +local_port+
|
|
45
|
+
# parameters are set, they will be used for the local host and port
|
|
46
|
+
# of the TCP connection. A TCPSocket object will be returned. If
|
|
47
|
+
# a _block_ is given, it will be passed the newly created TCPSocket
|
|
48
|
+
# object.
|
|
49
|
+
#
|
|
42
50
|
def tcp_connect(&block)
|
|
43
|
-
|
|
44
|
-
raise(ParamNotFound,"Missing parameter '#{describe_param(:rhost)}'",caller)
|
|
45
|
-
end
|
|
51
|
+
require_params :host, :port
|
|
46
52
|
|
|
47
|
-
|
|
48
|
-
raise(ParamNotFound,"Missing parameter '#{describe_param(:rport)}'",caller)
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
return ::Net.tcp_connect(@rhost,@rport,@lhost,@lport,&block)
|
|
53
|
+
return ::Net.tcp_connect(@host,@port,@local_host,@local_port,&block)
|
|
52
54
|
end
|
|
53
55
|
|
|
56
|
+
#
|
|
57
|
+
# Connects to the host and port specified by the +host+ and +port+
|
|
58
|
+
# parameters, then sends the specified _data_. If a _block_ is given,
|
|
59
|
+
# it will be passed the newly created TCPSocket object.
|
|
60
|
+
#
|
|
54
61
|
def tcp_connect_and_send(data,&block)
|
|
55
|
-
|
|
56
|
-
raise(ParamNotFound,"Missing parameter '#{describe_param(:rhost)}'",caller)
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
unless @rport
|
|
60
|
-
raise(ParamNotFound,"Missing parameter '#{describe_param(:rport)}'",caller)
|
|
61
|
-
end
|
|
62
|
+
require_params :host, :port
|
|
62
63
|
|
|
63
|
-
return ::Net.tcp_connect_and_send(data,@
|
|
64
|
+
return ::Net.tcp_connect_and_send(data,@host,@port,@local_host,@local_port,&block)
|
|
64
65
|
end
|
|
65
66
|
|
|
67
|
+
#
|
|
68
|
+
# Creates a TCP session to the host and port specified by the
|
|
69
|
+
# +host+ and +port+ parameters. If a _block_ is given, it will be
|
|
70
|
+
# passed the temporary TCPSocket object. After the given _block_
|
|
71
|
+
# has returned, the TCPSocket object will be closed.
|
|
72
|
+
#
|
|
66
73
|
def tcp_session(&block)
|
|
67
|
-
|
|
68
|
-
raise(ParamNotFound,"Missing parameter '#{describe_param(:rhost)}'",caller)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
unless @rport
|
|
72
|
-
raise(ParamNotFound,"Missing parameter '#{describe_param(:rport)}'",caller)
|
|
73
|
-
end
|
|
74
|
+
require_params :host, :port
|
|
74
75
|
|
|
75
|
-
return Net.tcp_session(@
|
|
76
|
+
return Net.tcp_session(@host,@port,@local_host,@local_port,&block)
|
|
76
77
|
end
|
|
77
78
|
|
|
79
|
+
#
|
|
80
|
+
# Connects to the host and port specified by the +host+ and +port+
|
|
81
|
+
# parameters, reads the banner then closes the connection, returning
|
|
82
|
+
# the banner String. If a _block_ is given, it will be passed the
|
|
83
|
+
# banner String.
|
|
84
|
+
#
|
|
78
85
|
def tcp_banner(&block)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
require_params :host, :port
|
|
87
|
+
|
|
88
|
+
return ::Net.tcp_banner(@host,@port,@local_host,@local_port,&block)
|
|
89
|
+
end
|
|
82
90
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
#
|
|
92
|
+
# Connects to the host and port specified by the +host+ and +port+
|
|
93
|
+
# parameters, sends the specified _data_ and then closes the
|
|
94
|
+
# connection. Returns +true+ if the data was successfully sent.
|
|
95
|
+
#
|
|
96
|
+
def tcp_send(data)
|
|
97
|
+
require_params :host, :port
|
|
86
98
|
|
|
87
|
-
return ::Net.
|
|
99
|
+
return ::Net.tcp_send(data,@host,@port,@local_host,@local_port)
|
|
88
100
|
end
|
|
89
101
|
end
|
|
90
102
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A ruby development platform designed for information security
|
|
4
4
|
# and data exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -30,10 +30,9 @@ module Ronin
|
|
|
30
30
|
include Session
|
|
31
31
|
|
|
32
32
|
setup_session do
|
|
33
|
-
parameter :
|
|
34
|
-
parameter :
|
|
35
|
-
|
|
36
|
-
:description => 'Telnet port'
|
|
33
|
+
parameter :host, :description => 'Telnet host'
|
|
34
|
+
parameter :port, :value => Network::Telnet.default_port,
|
|
35
|
+
:description => 'Telnet port'
|
|
37
36
|
|
|
38
37
|
parameter :telnet_user, :description => 'Telnet user'
|
|
39
38
|
parameter :telnet_password, :description => 'Telnet password'
|
|
@@ -45,18 +44,16 @@ module Ronin
|
|
|
45
44
|
protected
|
|
46
45
|
|
|
47
46
|
def telnet_connect(options={},&block)
|
|
48
|
-
|
|
49
|
-
raise(ParamNotFound,"Missing parameter '#{describe_param(:telnet_host)}'",caller)
|
|
50
|
-
end
|
|
47
|
+
require_params :host
|
|
51
48
|
|
|
52
|
-
options[:port] ||= @
|
|
49
|
+
options[:port] ||= @port
|
|
53
50
|
options[:user] ||= @telnet_user
|
|
54
51
|
options[:password] ||= @telnet_password
|
|
55
52
|
|
|
56
53
|
options[:proxy] ||= @telnet_proxy
|
|
57
54
|
options[:ssl] ||= @telnet_ssl
|
|
58
55
|
|
|
59
|
-
return ::Net.telnet_connect(@
|
|
56
|
+
return ::Net.telnet_connect(@host,options,&block)
|
|
60
57
|
end
|
|
61
58
|
|
|
62
59
|
def telnet_session(options={},&block)
|
data/lib/ronin/sessions/udp.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A ruby development platform designed for information security
|
|
4
4
|
# and data exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -30,49 +30,48 @@ module Ronin
|
|
|
30
30
|
include Session
|
|
31
31
|
|
|
32
32
|
setup_session do
|
|
33
|
-
parameter :
|
|
34
|
-
parameter :
|
|
33
|
+
parameter :local_host, :description => 'local host'
|
|
34
|
+
parameter :local_port, :description => 'local port'
|
|
35
35
|
|
|
36
|
-
parameter :
|
|
37
|
-
parameter :
|
|
36
|
+
parameter :host, :description => 'remote host'
|
|
37
|
+
parameter :port, :description => 'remote port'
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
protected
|
|
41
41
|
|
|
42
|
+
#
|
|
43
|
+
# Opens a UDP connection to the host and port specified by the
|
|
44
|
+
# +host+ and +port+ parameters. If the +local_host+ and +local_port+
|
|
45
|
+
# parameters are set, they will be used for the local host and port
|
|
46
|
+
# of the UDP connection. A UDPSocket object will be returned.
|
|
47
|
+
#
|
|
42
48
|
def udp_connect(&block)
|
|
43
|
-
|
|
44
|
-
raise(ParamNotFound,"Missing '#{describe_param(:rhost)}' parameter",caller)
|
|
45
|
-
end
|
|
49
|
+
require_params :host, :port
|
|
46
50
|
|
|
47
|
-
|
|
48
|
-
raise(ParamNotFound,"Missing '#{describe_param(:rport)}' parameter",caller)
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
return ::Net.udp_connect(@rhost,@rport,@lhost,@lport,&block)
|
|
51
|
+
return ::Net.udp_connect(@host,@port,@local_host,@local_port,&block)
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
#
|
|
55
|
+
# Connects to the host and port specified by the +host+ and +port+
|
|
56
|
+
# parameters, then sends the specified _data_. If a _block_ is given,
|
|
57
|
+
# it will be passed the newly created UDPSocket object.
|
|
58
|
+
#
|
|
54
59
|
def udp_connect_and_send(data,&block)
|
|
55
|
-
|
|
56
|
-
raise(ParamNotFound,"Missing '#{describe_param(:rhost)}' parameter",caller)
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
unless @rport
|
|
60
|
-
raise(ParamNotFound,"Missing '#{describe_param(:rport)}' parameter",caller)
|
|
61
|
-
end
|
|
60
|
+
require_params :host, :port
|
|
62
61
|
|
|
63
|
-
return ::Net.udp_connect_and_send(data,@
|
|
62
|
+
return ::Net.udp_connect_and_send(data,@host,@port,@local_host,@local_port,&block)
|
|
64
63
|
end
|
|
65
64
|
|
|
65
|
+
#
|
|
66
|
+
# Creates a UDP session to the host and port specified by the
|
|
67
|
+
# +host+ and +port+ parameters. If a _block_ is given, it will be
|
|
68
|
+
# passed the temporary UDPSocket object. After the given _block_
|
|
69
|
+
# has returned, the UDPSocket object will be closed.
|
|
70
|
+
#
|
|
66
71
|
def udp_session(&block)
|
|
67
|
-
|
|
68
|
-
raise(ParamNotFound,"Missing parameter '#{describe_param(:rhost)}'",caller)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
unless @rport
|
|
72
|
-
raise(ParamNotFound,"Missing parameter '#{describe_param(:rport)}'",caller)
|
|
73
|
-
end
|
|
72
|
+
require_params :host, :port
|
|
74
73
|
|
|
75
|
-
return ::Net.udp_session(@
|
|
74
|
+
return ::Net.udp_session(@host,@port,@local_host,@local_port,&block)
|
|
76
75
|
end
|
|
77
76
|
end
|
|
78
77
|
end
|
data/lib/ronin/sessions/web.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A ruby development platform designed for information security
|
|
4
4
|
# and data exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -30,13 +30,11 @@ module Ronin
|
|
|
30
30
|
include Session
|
|
31
31
|
|
|
32
32
|
setup_session do
|
|
33
|
-
parameter :web_proxy,
|
|
34
|
-
|
|
35
|
-
:description => 'Web Proxy'
|
|
33
|
+
parameter :web_proxy, :value => Ronin::Web.proxy,
|
|
34
|
+
:description => 'Web Proxy'
|
|
36
35
|
|
|
37
|
-
parameter :web_user_agent,
|
|
38
|
-
|
|
39
|
-
:description => 'Web User-Agent'
|
|
36
|
+
parameter :web_user_agent, :value => Ronin::Web.user_agent,
|
|
37
|
+
:description => 'Web User-Agent'
|
|
40
38
|
end
|
|
41
39
|
|
|
42
40
|
protected
|
data/lib/ronin/target.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|