one_gadget 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/one_gadget.rb +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: b8f1c8cde974d024db8e485e9891dd01a8bc0d35
|
4
|
+
data.tar.gz: d8a48feb0e8ca9fa3df8aac6083161deb9f091e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a649c1390edf31cab22b5affbea70f30a565ab80c5ab919dad9d1d4a9af35cc66e86012e7f888989f24602b412fcfde18cb2aeb268e8917fc7238e0e49133a3
|
7
|
+
data.tar.gz: ee422f8b2fa9fb1c0afdfb393678d78e956baf6ecd8b3c4cbd48b0556bcf54642729065e15a92b88115172b9acb8b29fe34b6315a59923919e4915e14799837c
|
data/README.md
CHANGED
@@ -27,6 +27,8 @@ gem install one_gadget
|
|
27
27
|
|
28
28
|
OneGadget use simple self-implement symbolic execution to find the constraints of gadgets.
|
29
29
|
|
30
|
+
The article introducing how I developed this tool can be found [here](https://david942j.blogspot.com/2017/02/project-one-gadget-in-glibc.html).
|
31
|
+
|
30
32
|
## Usage
|
31
33
|
|
32
34
|
### Command Line Tool
|
@@ -101,6 +103,13 @@ one_gadget ./spec/data/libc-2.19.so -s 'echo "offset ->"'
|
|
101
103
|
require 'one_gadget'
|
102
104
|
OneGadget.gadgets(file: '/lib/x86_64-linux-gnu/libc.so.6')
|
103
105
|
# => [283242, 980676, 984423, 836931, 837144, 1006352]
|
106
|
+
# or in shorter way
|
107
|
+
one_gadget(file: '/lib/x86_64-linux-gnu/libc.so.6')
|
108
|
+
# => [283242, 980676, 984423, 836931, 837144, 1006352]
|
109
|
+
|
110
|
+
# from build id
|
111
|
+
one_gadget(build_id: '60131540dadc6796cab33388349e6e4e68692053')
|
112
|
+
# => [283242, 980676, 984423, 836931, 837144, 1006352]
|
104
113
|
```
|
105
114
|
|
106
115
|
## Screenshots
|
data/lib/one_gadget.rb
CHANGED
@@ -37,6 +37,15 @@ module OneGadget
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
+
# Shorter way to use one gadget.
|
41
|
+
# @param [Mixed] args
|
42
|
+
# See {OneGadget#gadgets} for more information.
|
43
|
+
# @return [Array<OneGadget::Gadget::Gadget>, Array<Integer>]
|
44
|
+
# The gadgets found.
|
45
|
+
def one_gadget(*args)
|
46
|
+
OneGadget.gadgets(*args)
|
47
|
+
end
|
48
|
+
|
40
49
|
require 'one_gadget/fetcher'
|
41
50
|
require 'one_gadget/helper'
|
42
51
|
require 'one_gadget/logger'
|
data/lib/one_gadget/helper.rb
CHANGED
@@ -47,11 +47,10 @@ module OneGadget
|
|
47
47
|
# Color codes for pretty print
|
48
48
|
COLOR_CODE = {
|
49
49
|
esc_m: "\e[0m",
|
50
|
-
normal_s: "\e[
|
51
|
-
integer: "\e[
|
52
|
-
|
53
|
-
|
54
|
-
sym: "\e[38;5;229m", # pry like
|
50
|
+
normal_s: "\e[31m", # red
|
51
|
+
integer: "\e[1m\e[34m", # light blue
|
52
|
+
reg: "\e[32m", # light green
|
53
|
+
sym: "\e[33m", # pry like
|
55
54
|
}.freeze
|
56
55
|
|
57
56
|
# Wrapper color codes for pretty inspect.
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- david942j
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|