twib 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +2 -2
- data/lib/twib.rb +1 -1
- data/lib/twib/interfaces/ITwibDebugger.rb +5 -3
- data/lib/twib/interfaces/ITwibMetaInterface.rb +3 -1
- data/lib/twib/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8a26649a38a5e8d6c227549582134bce5b80bb0ad05937148f81d6cd6f8fe5b0
|
4
|
+
data.tar.gz: b3e043a2df363f1dfa4106c2bbe0728b0f6623fd0abf2a5e8fa1f01badbd7127
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c3f1ddf2bcbed2e237e48b6ca51266d4908dde541859ac5527e4616ea5a5c5b897c430fc44e14bc3f326cb86081c0eb71d21318640d9215eeb0b48468007191
|
7
|
+
data.tar.gz: 723fcacd98e07f863c3f290fcf59f44319c5c944f9d1b5083e1b7ccc9b144d8453a1efa1276260dd6f8e235d1b51607128679fc79d9f1e24203c594fe905281d
|
data/Gemfile.lock
CHANGED
data/lib/twib.rb
CHANGED
@@ -97,7 +97,7 @@ module Twib
|
|
97
97
|
# Connects to twibd using the standard UNIX socket address.
|
98
98
|
# @return [TwibConnection]
|
99
99
|
def self.connect_unix
|
100
|
-
return self.new(UNIXSocket.new("/var/run/twibd.sock"))
|
100
|
+
return self.new(UNIXSocket.new(ENV["TWIB_UNIX_FRONTEND_PATH"] || "/var/run/twibd.sock"))
|
101
101
|
end
|
102
102
|
|
103
103
|
# Creates a TwibConnection using the specified socket
|
@@ -41,7 +41,9 @@ module Twib
|
|
41
41
|
# @param size [Integer] How many bytes to read
|
42
42
|
# @return [String]
|
43
43
|
def read_memory(addr, size)
|
44
|
-
send(Command::READ_MEMORY, [addr, size].pack("Q<Q<")).wait_ok.payload
|
44
|
+
response = send(Command::READ_MEMORY, [addr, size].pack("Q<Q<")).wait_ok.payload
|
45
|
+
length = response.unpack("Q<")[0]
|
46
|
+
return response[8, length]
|
45
47
|
end
|
46
48
|
|
47
49
|
# Writes to process memory at the given address.
|
@@ -49,7 +51,7 @@ module Twib
|
|
49
51
|
# @param string [String] Data to write
|
50
52
|
# @return [String]
|
51
53
|
def write_memory(addr, string)
|
52
|
-
send(Command::WRITE_MEMORY, [addr].pack("Q<") + string).wait_ok
|
54
|
+
send(Command::WRITE_MEMORY, [addr, string.bytesize].pack("Q<Q<") + string).wait_ok
|
53
55
|
string
|
54
56
|
end
|
55
57
|
|
@@ -87,7 +89,7 @@ module Twib
|
|
87
89
|
# @param flags [Integer] See http://www.switchbrew.org/index.php?title=SVC#ContinueDebugFlagsOld
|
88
90
|
# @return [self]
|
89
91
|
def continue_debug_event(flags, thread_ids=[])
|
90
|
-
send(Command::CONTINUE_DEBUG_EVENT, ([flags] + thread_ids).pack("L<Q<*")).wait_ok
|
92
|
+
send(Command::CONTINUE_DEBUG_EVENT, ([flags, thread_ids.length] + thread_ids).pack("L<Q<Q<*")).wait_ok
|
91
93
|
self
|
92
94
|
end
|
93
95
|
|
@@ -14,7 +14,9 @@ module Twib
|
|
14
14
|
# Lists devices known to twibd.
|
15
15
|
# @return [Array<Hash>]
|
16
16
|
def list_devices
|
17
|
-
|
17
|
+
response = send(Command::LIST_DEVICES).wait_ok.payload
|
18
|
+
size = response.unpack("Q<")[0]
|
19
|
+
MessagePack.unpack(response[8, size])
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
data/lib/twib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twib
|
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
|
- misson20000
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
113
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.
|
114
|
+
rubygems_version: 2.7.7
|
115
115
|
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: Twili bridge client for Ruby
|