ronin-core 0.1.1 → 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.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +3 -2
- data/ChangeLog.md +14 -0
- data/README.md +0 -1
- data/lib/ronin/core/class_registry.rb +5 -6
- data/lib/ronin/core/cli/ruby_shell.rb +13 -2
- data/lib/ronin/core/params/types.rb +1 -1
- data/lib/ronin/core/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e61fdc08b8e215624863cd59c443f5b5e41c25d8cf6427df9b903aa2458fcb3
|
4
|
+
data.tar.gz: b2598fe308eeb283bbcfd6ec817bfb3c3c94f34e3d1fb93aac98d345078c1129
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73d16460be02608e46d22de62311f45d1fc4b01c40fac304222fc90ae321a7cf57ff5a29663eee49ae0ea84c8106e3fd548db65d3b48b9879f445e7aaf597094
|
7
|
+
data.tar.gz: 8c6f88d8caac5a0f6af9a2838cae33a97a7796b66872c17dde4a225e9e2195451637d553db349a3eab3a16c238621b7c069f5a4f7cd1ce092250490785f2bdc6
|
data/.github/workflows/ruby.yml
CHANGED
@@ -12,11 +12,12 @@ jobs:
|
|
12
12
|
- '3.0'
|
13
13
|
- '3.1'
|
14
14
|
- '3.2'
|
15
|
+
- '3.3'
|
15
16
|
- jruby
|
16
17
|
- truffleruby
|
17
18
|
name: Ruby ${{ matrix.ruby }}
|
18
19
|
steps:
|
19
|
-
- uses: actions/checkout@
|
20
|
+
- uses: actions/checkout@v4
|
20
21
|
- name: Set up Ruby
|
21
22
|
uses: ruby/setup-ruby@v1
|
22
23
|
with:
|
@@ -31,7 +32,7 @@ jobs:
|
|
31
32
|
rubocop:
|
32
33
|
runs-on: ubuntu-latest
|
33
34
|
steps:
|
34
|
-
- uses: actions/checkout@
|
35
|
+
- uses: actions/checkout@v4
|
35
36
|
- name: Set up Ruby
|
36
37
|
uses: ruby/setup-ruby@v1
|
37
38
|
with:
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
### 0.1.3 / 2024-06-19
|
2
|
+
|
3
|
+
* Improved {Ronin::Core::ClassRegistry::ClassMethods#load_class_from_file}
|
4
|
+
to handle returning the class when the file has already been loaded.
|
5
|
+
|
6
|
+
### 0.1.2 / 2023-07-18
|
7
|
+
|
8
|
+
#### CLI
|
9
|
+
|
10
|
+
* Changed {Ronin::Core::CLI::RubyShell#initialize} to wrap a `Module` `context:`
|
11
|
+
value in an `Object` instance which includes the module. This allows the
|
12
|
+
IRB session to gain access to the module's constants and instances methods,
|
13
|
+
as well as correctly define and call instance methods in the IRB session.
|
14
|
+
|
1
15
|
### 0.1.1 / 2023-03-01
|
2
16
|
|
3
17
|
#### CLI
|
data/README.md
CHANGED
@@ -9,7 +9,6 @@
|
|
9
9
|
* [Issues](https://github.com/ronin-rb/ronin-core/issues)
|
10
10
|
* [Documentation](https://ronin-rb.dev/docs/ronin-core/frames)
|
11
11
|
* [Discord](https://discord.gg/6WAb3PsVX9) |
|
12
|
-
[Twitter](https://twitter.com/ronin_rb) |
|
13
12
|
[Mastodon](https://infosec.exchange/@ronin_rb)
|
14
13
|
|
15
14
|
## Description
|
@@ -190,17 +190,15 @@ module Ronin
|
|
190
190
|
raise(ClassNotFound,"no such file or directory: #{file.inspect}")
|
191
191
|
end
|
192
192
|
|
193
|
-
previous_entries = registry.keys
|
194
|
-
|
195
193
|
require(file)
|
196
194
|
|
197
|
-
|
195
|
+
registry.each_value do |worker_class|
|
196
|
+
class_file, = worker_class.const_source_location(worker_class.name)
|
198
197
|
|
199
|
-
|
200
|
-
raise(ClassNotFound,"file did not register a class: #{file.inspect}")
|
198
|
+
return worker_class if class_file == file
|
201
199
|
end
|
202
200
|
|
203
|
-
|
201
|
+
raise(ClassNotFound,"file did not register a class: #{file.inspect}")
|
204
202
|
end
|
205
203
|
|
206
204
|
#
|
@@ -231,6 +229,7 @@ module Ronin
|
|
231
229
|
end
|
232
230
|
|
233
231
|
previous_entries = registry.keys
|
232
|
+
|
234
233
|
require(path)
|
235
234
|
|
236
235
|
unless (klass = registry[id])
|
@@ -48,7 +48,7 @@ module Ronin
|
|
48
48
|
# @param [String] name
|
49
49
|
# The name of the IRB console.
|
50
50
|
#
|
51
|
-
# @param [Object] context
|
51
|
+
# @param [Object, Module] context
|
52
52
|
# Custom context to launch IRB from within.
|
53
53
|
#
|
54
54
|
# @param [Hash{Symbol => Object}] kwargs
|
@@ -58,7 +58,18 @@ module Ronin
|
|
58
58
|
super(**kwargs)
|
59
59
|
|
60
60
|
@name = name
|
61
|
-
@context = context
|
61
|
+
@context = case context
|
62
|
+
when Module
|
63
|
+
Object.new.tap do |obj|
|
64
|
+
obj.singleton_class.include(context)
|
65
|
+
obj.singleton_class.define_singleton_method(:const_missing,&context.method(:const_missing))
|
66
|
+
obj.define_singleton_method(:inspect) do
|
67
|
+
"#<#{context}>"
|
68
|
+
end
|
69
|
+
end
|
70
|
+
else
|
71
|
+
context
|
72
|
+
end
|
62
73
|
end
|
63
74
|
|
64
75
|
#
|
data/lib/ronin/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ronin-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: reline
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
- !ruby/object:Gem::Version
|
161
161
|
version: '0'
|
162
162
|
requirements: []
|
163
|
-
rubygems_version: 3.3.
|
163
|
+
rubygems_version: 3.3.27
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: A core library for all ronin libraries.
|