idevice 1.2.0.0 → 1.2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3867a2667e69135b791c66243133fb41be666d4
4
- data.tar.gz: f52e4350ac91e369d6ac5b9d134e94468b6af8a2
3
+ metadata.gz: b4f203872bbc25edda027187975557c822108f27
4
+ data.tar.gz: 49cf123bd6339e5e8729aec816b230db38f78a18
5
5
  SHA512:
6
- metadata.gz: f91455a89762e6310521467480844aea8b66353335e1f09588c00e3bd6b3442214e69140003ea9379629a456324a86ae19679a71b5e0cda00949b7abae1906bb
7
- data.tar.gz: 9c04cc42e49eef5ec5525f181b085a35ada04c2b0ec52e697f22b6278c2d86d6b80b5020fd71bd488c9fcb22b97555371710a93dcce89e8add8508a76a872592
6
+ metadata.gz: 5196520f23e977f730fa9a815399b550bdf7bc5ea056a0c74149d90a05d664dcbaf2df9b4f154ec2a1a679b1c5ad4bcdb1499c24a1797ec33cc4cc926583ac5c
7
+ data.tar.gz: 3ce551858f28a4906c33e6667a5a6c8f5907a5409f6f7e82083a5492ec7ea34a7a3bc31a9befaa424d50a3cd146b8520e91cbf2e5081fc03b694e44a701af5b7
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Copyright (c) 2013 Eric Monti - Bluebox Security
4
+ #
5
+ # Licensed to the Apache Software Foundation (ASF) under one
6
+ # or more contributor license agreements. See the NOTICE file
7
+ # distributed with this work for additional information
8
+ # regarding copyright ownership. The ASF licenses this file
9
+ # to you under the Apache License, Version 2.0 (the
10
+ # "License"); you may not use this file except in compliance
11
+ # with the License. You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing,
16
+ # software distributed under the License is distributed on an
17
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18
+ # KIND, either express or implied. See the License for the
19
+ # specific language governing permissions and limitations
20
+ # under the License.
21
+
22
+
23
+ require 'bundler/setup'
24
+ require 'idevice'
25
+ require 'json'
26
+
27
+ idev = Idevice::Idevice.attach
28
+ ldcli = Idevice::LockdownClient.attach(idevice:idev)
29
+ diag_ldsvc = ldcli.start_service("com.apple.iosdiagnostics.relay")
30
+ diag_relay = idev.connect(diag_ldsvc[:port])
31
+
32
+ diag_relay.send_lockdown_message(Request: "All")
33
+ puts JSON.pretty_generate(diag_relay.receive_lockdown_message())
34
+ diag_relay.send_lockdown_message(Request: "Goodbye")
35
+ diag_relay.disconnect
@@ -173,6 +173,26 @@ module Idevice
173
173
  end
174
174
  return recvdata.string
175
175
  end
176
+
177
+ def send_lockdown_message(msg)
178
+ dat = msg.to_plist
179
+ send_data([dat.bytesize].pack("N") << dat)
180
+ end
181
+
182
+ def receive_lockdown_message
183
+ len = receive_data(4).unpack("N").first
184
+ dat = receive_data(len)
185
+ case dat[0,6]
186
+ when "<?xml "
187
+ return Plist.parse_xml(dat)
188
+ when "bplist"
189
+ return Plist.parse_binary(dat)
190
+ else
191
+ # just return raw data if this appears as something else
192
+ return dat
193
+ end
194
+ end
195
+
176
196
  end
177
197
 
178
198
  module C
@@ -1,3 +1,3 @@
1
1
  module Idevice
2
- VERSION = "1.2.0.0"
2
+ VERSION = "1.2.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idevice
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.0
4
+ version: 1.2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Monti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-14 00:00:00.000000000 Z
11
+ date: 2015-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -115,6 +115,7 @@ files:
115
115
  - examples/ilistudids
116
116
  - examples/ilog
117
117
  - examples/installipa
118
+ - examples/iosdiagnostics
118
119
  - examples/iremoveapp
119
120
  - examples/irename
120
121
  - examples/irestart