one_gadget 1.3.6 → 1.3.7
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/bin/one_gadget +9 -0
- data/lib/one_gadget/helper.rb +4 -5
- data/lib/one_gadget/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33da33103c5c21696048389d2e3d0bf28518d5c7
|
4
|
+
data.tar.gz: f9db6d8f8492fb3333e64c32e465117e12b8316f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e6812ce5a3014b3b0decf022ee10091c1c5ef0ece3fcf95b9633ed2c1cfaeb8711022dba8115d7c2ce8fb131da0687e921d5ff4d6fdf5570566a7a187d1be58
|
7
|
+
data.tar.gz: 25fa9d3d24bc875c1fff2c96d125d650ade69cf5099433e5d8801cab90eeaf942071bcecdc65b0469902de27b88abd3effe726f9e8ed8a604eb9fd9bb64e485e
|
data/bin/one_gadget
CHANGED
@@ -23,9 +23,18 @@ parser = OptionParser.new do |opts|
|
|
23
23
|
'The script will be run as \'exploit-script $offset\'.') do |script|
|
24
24
|
options[:script] = script
|
25
25
|
end
|
26
|
+
|
27
|
+
opts.on('--version', 'Current gem version.') do |v|
|
28
|
+
options[:version] = v
|
29
|
+
end
|
26
30
|
end
|
27
31
|
parser.parse!
|
28
32
|
|
33
|
+
if options[:version]
|
34
|
+
puts "OneGadget Version #{OneGadget::VERSION}"
|
35
|
+
exit(0)
|
36
|
+
end
|
37
|
+
|
29
38
|
def execute(script, offset)
|
30
39
|
pid = fork do
|
31
40
|
exec([script, offset.to_s].join(' '))
|
data/lib/one_gadget/helper.rb
CHANGED
@@ -46,15 +46,14 @@ module OneGadget
|
|
46
46
|
# Color codes for pretty print
|
47
47
|
COLOR_CODE = {
|
48
48
|
esc_m: "\e[0m",
|
49
|
-
normal_s: "\e[
|
50
|
-
integer: "\e[
|
51
|
-
reg: "\e[
|
52
|
-
sym: "\e[33m", # pry like
|
49
|
+
normal_s: "\e[38;5;203m", # red
|
50
|
+
integer: "\e[38;5;189m", # light purple
|
51
|
+
reg: "\e[38;5;82m", # light green
|
53
52
|
}.freeze
|
54
53
|
|
55
54
|
# Wrapper color codes for pretty inspect.
|
56
55
|
# @param [String] str Contents to colorize.
|
57
|
-
# @
|
56
|
+
# @param [Symbol] sev Specific which kind of color want to use, valid symbols are defined in +COLOR_CODE+.
|
58
57
|
# @return [String] Wrapper with color codes.
|
59
58
|
def colorize(str, sev: :normal_s)
|
60
59
|
return str if @disable_color
|
data/lib/one_gadget/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: one_gadget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- david942j
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: elftools
|