r2pipe 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/r2pipe.rb +12 -10
- data/lib/r2pipe/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5815400a10873eee220bb59709c3b33c0b507bc3
|
4
|
+
data.tar.gz: a3d828c7554e137e3091f923b1e348c0b9d8ae3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cc2d21f5ad3b466fd382b3da39f8b2599ae9544c661a9e92b4dce62e830a173db6ef263bc9bd3d27d243f0ed91ca6c3c94f62904127bdf55a07bed2c535ccad
|
7
|
+
data.tar.gz: 36fd14b1bea6bd8e46de3cd26e640a896f3e9f4c7be4e111bd7fff5713c9c1c511d5fbdf3196db9d96fda31f7721fd1db532df15bb6f3cd7a839082fd7991720
|
data/README.md
CHANGED
data/lib/r2pipe.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# author pancake@nopcode.org
|
4
|
+
|
5
|
+
require 'open3'
|
3
6
|
require 'json'
|
4
7
|
require 'shellwords'
|
5
8
|
|
@@ -17,13 +20,12 @@ class R2Pipe
|
|
17
20
|
@write = IO.new(fdOut, 'w')
|
18
21
|
@pid = -1
|
19
22
|
else
|
20
|
-
exec = "
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
end
|
23
|
+
exec = "radare2 -q0 #{Shellwords.shellescape file} 2>/dev/null"
|
24
|
+
write, read, wait_thr = Open3.popen2(exec)
|
25
|
+
@read = read
|
26
|
+
@write = write
|
27
|
+
@pid = wait_thr.pid
|
28
|
+
@read.gets("\0")
|
27
29
|
end
|
28
30
|
end
|
29
31
|
|
@@ -47,7 +49,7 @@ class R2Pipe
|
|
47
49
|
end
|
48
50
|
|
49
51
|
def json(str)
|
50
|
-
if
|
52
|
+
if str != nil
|
51
53
|
JSON.parse str.sub("\n", '').sub("\r", '')
|
52
54
|
end
|
53
55
|
end
|
data/lib/r2pipe/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r2pipe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeffrey Crowell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-11-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.6.
|
85
|
+
rubygems_version: 2.6.14
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Communicate with Radare2 via pipes.
|