SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
libimobiledevice
пятница, 26 июля 13 г.
libimobiledevice.org
пятница, 26 июля 13 г.
usbmuxd
http://cgit.sukimashita.com/usbmuxd.git/
A socket daemon to multiplex connections from and to iOS
devices.
Mac OS, Linux: /var/run/usbmuxd
Windows: localhost:27015
пятница, 26 июля 13 г.
iTunes
пятница, 26 июля 13 г.
Apple Mobile Device Support
пятница, 26 июля 13 г.
Socat - http://www.dest-unreach.org/socat/
$ brew install socat
sudo mv /var/run/usbmuxd /var/run/usbmuxx
sudo socat -t100 -x -v UNIX-LISTEN:/var/run/
usbmuxd,mode=777,reuseaddr,fork UNIX-CONNECT:/var/run/usbmuxx > ~/
Desktop/usbmuxd.log 2>&1
Sniffing
пятница, 26 июля 13 г.
> 2013/07/03 18:05:32.872128 length=513 from=0 to=512
01 02 00 00 01 00 00 00 08 00 00 00 f8 00 00 00 ................
3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 <?xml version="1
2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 .0" encoding="UT
46 2d 38 22 3f 3e 0a F-8"?>.
3c 21 44 4f 43 54 59 50 45 20 70 6c 69 73 74 20 <!DOCTYPE plist
50 55 42 4c 49 43 20 22 2d 2f 2f 41 70 70 6c 65 PUBLIC "-//Apple
2f 2f 44 54 44 20 50 4c 49 53 54 20 31 2e 30 2f //DTD PLIST 1.0/
2f 45 4e 22 20 22 68 74 74 70 3a 2f 2f 77 77 77 /EN" "http://www
2e 61 70 70 6c 65 2e 63 6f 6d 2f 44 54 44 73 2f .apple.com/DTDs/
50 72 6f 70 65 72 74 79 4c 69 73 74 2d 31 2e 30 PropertyList-1.0
2e 64 74 64 22 3e 0a .dtd">.
3c 70 6c 69 73 74 20 76 65 72 73 69 6f 6e 3d 22 <plist version="
31 2e 30 22 3e 0a 1.0">.
3c 64 69 63 74 3e 0a <dict>.
09 3c 6b 65 79 3e 42 75 6e 64 6c 65 49 44 3c 2f .<key>BundleID</
6b 65 79 3e 0a key>.
09 3c 73 74 72 69 6e 67 3e 63 6f 6d 2e 61 70 70 .<string>com.app
6c 65 2e 64 74 2e 58 63 6f 64 65 3c 2f 73 74 72 le.dt.Xcode</str
69 6e 67 3e 0a ing>.
09 3c 6b 65 79 3e 43 6c 69 65 6e 74 56 65 72 73 .<key>ClientVers
69 6f 6e 53 74 72 69 6e 67 3c 2f 6b 65 79 3e 0a ionString</key>.
09 3c 73 74 72 69 6e 67 3e 75 73 62 6d 75 78 64 .<string>usbmuxd
2d 33 31 37 3c 2f 73 74 72 69 6e 67 3e 0a -317</string>.
09 3c 6b 65 79 3e 43 6f 6e 6e 54 79 70 65 3c 2f .<key>ConnType</
6b 65 79 3e 0a key>.
09 3c 69 6e 74 65 67 65 72 3e 30 3c 2f 69 6e 74 .<integer>0</int
65 67 65 72 3e 0a eger>.
09 3c 6b 65 79 3e 4d 65 73 73 61 67 65 54 79 70 .<key>MessageTyp
65 3c 2f 6b 65 79 3e 0a e</key>.
09 3c 73 74 72 69 6e 67 3e 4c 69 73 74 65 6e 3c .<string>Listen<
2f 73 74 72 69 6e 67 3e 0a /string>.
09 3c 6b 65 79 3e 50 72 6f 67 4e 61 6d 65 3c 2f .<key>ProgName</
6b 65 79 3e 0a key>.
09 3c 73 74 72 69 6e 67 3e 58 63 6f 64 65 3c 2f .<string>Xcode</
73 74 72 69 6e 67 3e 0a string>.
09 3c 6b 65 79 3e 6b 4c 69 62 55 53 42 4d 75 78 .<key>kLibUSBMux
56 65 72 73 69 6f 6e 3c 2f 6b 65 79 3e 0a Version</key>.
09 3c 69 6e 74 65 67 65 72 3e 33 3c 2f 69 6e 74 .<integer>3</int
65 67 65 72 3e 0a eger>.
3c 2f 64 69 63 74 3e 0a </dict>.
3c 2f 70 6c 69 73 74 3e 0a </plist>.
--
< 2013/07/03 18:05:32.874439 length=294 from=0 to=293
26 01 00 00 01 00 00 00 08 00 00 00 f8 00 00 00 &...............
3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 <?xml version="1
2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 .0" encoding="UT
46 2d 38 22 3f 3e 0a F-8"?>.
3c 21 44 4f 43 54 59 50 45 20 70 6c 69 73 74 20 <!DOCTYPE plist
50 55 42 4c 49 43 20 22 2d 2f 2f 41 70 70 6c 65 PUBLIC "-//Apple
2f 2f 44 54 44 20 50 4c 49 53 54 20 31 2e 30 2f //DTD PLIST 1.0/
2f 45 4e 22 20 22 68 74 74 70 3a 2f 2f 77 77 77 /EN" "http://www
2e 61 70 70 6c 65 2e 63 6f 6d 2f 44 54 44 73 2f .apple.com/DTDs/
50 72 6f 70 65 72 74 79 4c 69 73 74 2d 31 2e 30 PropertyList-1.0
Typical log
пятница, 26 июля 13 г.
Packet analyzer:
https://github.com/storoj/idevice-packet-analyzer
cd /path/to/packet/analyzer
bash ioslog2html.sh /path/to/usbmuxd.log /path/to/usbmuxd.html
Help is on the way
пятница, 26 июля 13 г.
Pretty log
пятница, 26 июля 13 г.
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#include <libimobiledevice/screenshotr.h>
int main(int argc, char **argv)
{
! idevice_t device = NULL;
! lockdownd_client_t lckd = NULL;
! screenshotr_client_t shotr = NULL;
! lockdownd_service_descriptor_t service = NULL;
! const char *udid = "your udid here";
! if (IDEVICE_E_SUCCESS != idevice_new(&device, udid)) {
! ! return -1;
! }
! if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, NULL)) {
! ! return -1;
! }
! if (LOCKDOWN_E_SUCCESS != lockdownd_start_service(lckd, "com.apple.mobile.screenshotr", &service)) {
! ! return -1;
! }
! if (screenshotr_client_new(device, service, &shotr) != SCREENSHOTR_E_SUCCESS) {
! ! return -1;
! }
! if (screenshotr_take_screenshot(shotr, &imgdata, &imgsize) == SCREENSHOTR_E_SUCCESS) {
! ! // screenshot taken
! }
! // ...
}
Screnshotter client
пятница, 26 июля 13 г.
$ idevicescreenshot
Could not start screenshotr service! Remember that you have to
mount the Developer disk image on your device if you want to use
the screenshotr service.
$ ideviceinfo | grep ProductVersion | awk '{ print $2 }'
6.1.3
$ export DeviceSupport=/Applications/Xcode.app/Contents/Developer/
Platforms/iPhoneOS.platform/DeviceSupport/
$ ideviceimagemounter 
“$DeviceSupport/6.1 (10B141)/DeveloperDiskImage.dmg”
$ idevicescreenshot
Screenshot saved to screenshot-2013-06-13-07-40-00.tiff
Screenshot
пятница, 26 июля 13 г.
$ ls /Applications/Xcode.app/Contents/Developer/Platforms/
iPhoneOS.platform/DeviceSupport/
4.2 5.0 6.0 4.3 5.1
6.1 (10B141)
DeveloperDiskImage.dmg
DeveloperDiskImage.dmg.signature
Developer Images
пятница, 26 июля 13 г.
Developer Images
No developer image Developer image mounted
пятница, 26 июля 13 г.
Screenshotr service
пятница, 26 июля 13 г.
Official
http://www.libimobiledevice.org/
http://cgit.sukimashita.com/libimobiledevice.git/
VS project
https://github.com/storoj/libimobiledevice-win32
Mac OSX binaries
https://github.com/benvium/libimobiledevice-macosx
Libimobiledevice
пятница, 26 июля 13 г.

Contenu connexe

Similaire à Алексей Сторожев «Библиотека libimobiledevice»

Similaire à Алексей Сторожев «Библиотека libimobiledevice» (11)

WinDbg в руках .NET разработчика
WinDbg в руках .NET разработчикаWinDbg в руках .NET разработчика
WinDbg в руках .NET разработчика
 
Олег Мохов "Драматическая история одной маленькой промостранички"
Олег Мохов "Драматическая история одной маленькой промостранички"Олег Мохов "Драматическая история одной маленькой промостранички"
Олег Мохов "Драматическая история одной маленькой промостранички"
 
WinDbg со товарищи
WinDbg со товарищиWinDbg со товарищи
WinDbg со товарищи
 
Михаил Щербаков "WinDbg сотоварищи"
Михаил Щербаков "WinDbg сотоварищи"Михаил Щербаков "WinDbg сотоварищи"
Михаил Щербаков "WinDbg сотоварищи"
 
Где кончается react native? / Павел Кондратенко (Rambler&Co)
Где кончается react native? / Павел Кондратенко (Rambler&Co)Где кончается react native? / Павел Кондратенко (Rambler&Co)
Где кончается react native? / Павел Кондратенко (Rambler&Co)
 
Оптимизация UI потока / Дмитрий Куркин (Mail.Ru)
Оптимизация UI потока / Дмитрий Куркин (Mail.Ru)Оптимизация UI потока / Дмитрий Куркин (Mail.Ru)
Оптимизация UI потока / Дмитрий Куркин (Mail.Ru)
 
MxxRu::externals: Repositoryless Dependency Manager
MxxRu::externals: Repositoryless Dependency ManagerMxxRu::externals: Repositoryless Dependency Manager
MxxRu::externals: Repositoryless Dependency Manager
 
Всеволод Шмыров, Яндекс
Всеволод Шмыров, ЯндексВсеволод Шмыров, Яндекс
Всеволод Шмыров, Яндекс
 
Делаем кроссбраузерные тесты поверх Webdriver
Делаем кроссбраузерные тесты поверх WebdriverДелаем кроссбраузерные тесты поверх Webdriver
Делаем кроссбраузерные тесты поверх Webdriver
 
Почему Mojolicious?
Почему Mojolicious?Почему Mojolicious?
Почему Mojolicious?
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 

Plus de e-Legion

Plus de e-Legion (20)

MBLT16: Elena Rydkina, Pure
MBLT16: Elena Rydkina, PureMBLT16: Elena Rydkina, Pure
MBLT16: Elena Rydkina, Pure
 
MBLT16: Alexander Lukin, AppMetrica
MBLT16: Alexander Lukin, AppMetricaMBLT16: Alexander Lukin, AppMetrica
MBLT16: Alexander Lukin, AppMetrica
 
MBLT16: Vincent Wu, Alibaba Mobile
MBLT16: Vincent Wu, Alibaba MobileMBLT16: Vincent Wu, Alibaba Mobile
MBLT16: Vincent Wu, Alibaba Mobile
 
MBLT16: Dmitriy Geranin, Afisha Restorany
MBLT16: Dmitriy Geranin, Afisha RestoranyMBLT16: Dmitriy Geranin, Afisha Restorany
MBLT16: Dmitriy Geranin, Afisha Restorany
 
MBLT16: Marvin Liao, 500Startups
MBLT16: Marvin Liao, 500StartupsMBLT16: Marvin Liao, 500Startups
MBLT16: Marvin Liao, 500Startups
 
MBLT16: Andrey Maslak, Aviasales
MBLT16: Andrey Maslak, AviasalesMBLT16: Andrey Maslak, Aviasales
MBLT16: Andrey Maslak, Aviasales
 
MBLT16: Andrey Bakalenko, Sberbank Online
MBLT16: Andrey Bakalenko, Sberbank OnlineMBLT16: Andrey Bakalenko, Sberbank Online
MBLT16: Andrey Bakalenko, Sberbank Online
 
Rx Java architecture
Rx Java architectureRx Java architecture
Rx Java architecture
 
Rx java
Rx javaRx java
Rx java
 
MBLTDev15: Hector Zarate, Spotify
MBLTDev15: Hector Zarate, SpotifyMBLTDev15: Hector Zarate, Spotify
MBLTDev15: Hector Zarate, Spotify
 
MBLTDev15: Cesar Valiente, Wunderlist
MBLTDev15: Cesar Valiente, WunderlistMBLTDev15: Cesar Valiente, Wunderlist
MBLTDev15: Cesar Valiente, Wunderlist
 
MBLTDev15: Brigit Lyons, Soundcloud
MBLTDev15: Brigit Lyons, SoundcloudMBLTDev15: Brigit Lyons, Soundcloud
MBLTDev15: Brigit Lyons, Soundcloud
 
MBLTDev15: Egor Tolstoy, Rambler&Co
MBLTDev15: Egor Tolstoy, Rambler&CoMBLTDev15: Egor Tolstoy, Rambler&Co
MBLTDev15: Egor Tolstoy, Rambler&Co
 
MBLTDev15: Alexander Orlov, Postforpost
MBLTDev15: Alexander Orlov, PostforpostMBLTDev15: Alexander Orlov, Postforpost
MBLTDev15: Alexander Orlov, Postforpost
 
MBLTDev15: Artemiy Sobolev, Parallels
MBLTDev15: Artemiy Sobolev, ParallelsMBLTDev15: Artemiy Sobolev, Parallels
MBLTDev15: Artemiy Sobolev, Parallels
 
MBLTDev15: Alexander Dimchenko, DIT
MBLTDev15: Alexander Dimchenko, DITMBLTDev15: Alexander Dimchenko, DIT
MBLTDev15: Alexander Dimchenko, DIT
 
MBLTDev: Evgeny Lisovsky, Litres
MBLTDev: Evgeny Lisovsky, LitresMBLTDev: Evgeny Lisovsky, Litres
MBLTDev: Evgeny Lisovsky, Litres
 
MBLTDev: Alexander Dimchenko, Bright Box
MBLTDev: Alexander Dimchenko, Bright Box MBLTDev: Alexander Dimchenko, Bright Box
MBLTDev: Alexander Dimchenko, Bright Box
 
MBLTDev15: Konstantin Goldshtein, Microsoft
MBLTDev15: Konstantin Goldshtein, MicrosoftMBLTDev15: Konstantin Goldshtein, Microsoft
MBLTDev15: Konstantin Goldshtein, Microsoft
 
MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank
MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank
MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank
 

Dernier

CVE. The Fortra's GoAnywhere MFT [RU].pdf
CVE. The Fortra's GoAnywhere MFT [RU].pdfCVE. The Fortra's GoAnywhere MFT [RU].pdf
CVE. The Fortra's GoAnywhere MFT [RU].pdf
Хроники кибер-безопасника
 
2023 Q4. The Ransomware report. [RU].pdf
2023 Q4. The Ransomware report. [RU].pdf2023 Q4. The Ransomware report. [RU].pdf
2023 Q4. The Ransomware report. [RU].pdf
Хроники кибер-безопасника
 
ИСТОЧНИКИ ИННОВАЦИОННОСТИ КИТАЯ (ПО ВЕРСИИ DGAP) | The Sources of China’s Inn...
ИСТОЧНИКИ ИННОВАЦИОННОСТИ КИТАЯ (ПО ВЕРСИИ DGAP) | The Sources of China’s Inn...ИСТОЧНИКИ ИННОВАЦИОННОСТИ КИТАЯ (ПО ВЕРСИИ DGAP) | The Sources of China’s Inn...
ИСТОЧНИКИ ИННОВАЦИОННОСТИ КИТАЯ (ПО ВЕРСИИ DGAP) | The Sources of China’s Inn...
Ирония безопасности
 
СИСТЕМА ОЦЕНКИ УЯЗВИМОСТЕЙ CVSS 4.0 / CVSS v4.0 [RU].pdf
СИСТЕМА ОЦЕНКИ УЯЗВИМОСТЕЙ CVSS 4.0 / CVSS v4.0 [RU].pdfСИСТЕМА ОЦЕНКИ УЯЗВИМОСТЕЙ CVSS 4.0 / CVSS v4.0 [RU].pdf
СИСТЕМА ОЦЕНКИ УЯЗВИМОСТЕЙ CVSS 4.0 / CVSS v4.0 [RU].pdf
Хроники кибер-безопасника
 
Cyberprint. Dark Pink Apt Group [RU].pdf
Cyberprint. Dark Pink Apt Group [RU].pdfCyberprint. Dark Pink Apt Group [RU].pdf
Cyberprint. Dark Pink Apt Group [RU].pdf
Хроники кибер-безопасника
 
Cyber Defense Doctrine Managing the Risk Full Applied Guide to Organizational...
Cyber Defense Doctrine Managing the Risk Full Applied Guide to Organizational...Cyber Defense Doctrine Managing the Risk Full Applied Guide to Organizational...
Cyber Defense Doctrine Managing the Risk Full Applied Guide to Organizational...
Ирония безопасности
 

Dernier (9)

Malware. DCRAT (DARK CRYSTAL RAT) [RU].pdf
Malware. DCRAT (DARK CRYSTAL RAT) [RU].pdfMalware. DCRAT (DARK CRYSTAL RAT) [RU].pdf
Malware. DCRAT (DARK CRYSTAL RAT) [RU].pdf
 
CVE. The Fortra's GoAnywhere MFT [RU].pdf
CVE. The Fortra's GoAnywhere MFT [RU].pdfCVE. The Fortra's GoAnywhere MFT [RU].pdf
CVE. The Fortra's GoAnywhere MFT [RU].pdf
 
MS Navigating Incident Response [RU].pdf
MS Navigating Incident Response [RU].pdfMS Navigating Incident Response [RU].pdf
MS Navigating Incident Response [RU].pdf
 
2023 Q4. The Ransomware report. [RU].pdf
2023 Q4. The Ransomware report. [RU].pdf2023 Q4. The Ransomware report. [RU].pdf
2023 Q4. The Ransomware report. [RU].pdf
 
ИСТОЧНИКИ ИННОВАЦИОННОСТИ КИТАЯ (ПО ВЕРСИИ DGAP) | The Sources of China’s Inn...
ИСТОЧНИКИ ИННОВАЦИОННОСТИ КИТАЯ (ПО ВЕРСИИ DGAP) | The Sources of China’s Inn...ИСТОЧНИКИ ИННОВАЦИОННОСТИ КИТАЯ (ПО ВЕРСИИ DGAP) | The Sources of China’s Inn...
ИСТОЧНИКИ ИННОВАЦИОННОСТИ КИТАЯ (ПО ВЕРСИИ DGAP) | The Sources of China’s Inn...
 
Ransomware_Q3 2023. The report [RU].pdf
Ransomware_Q3 2023.  The report [RU].pdfRansomware_Q3 2023.  The report [RU].pdf
Ransomware_Q3 2023. The report [RU].pdf
 
СИСТЕМА ОЦЕНКИ УЯЗВИМОСТЕЙ CVSS 4.0 / CVSS v4.0 [RU].pdf
СИСТЕМА ОЦЕНКИ УЯЗВИМОСТЕЙ CVSS 4.0 / CVSS v4.0 [RU].pdfСИСТЕМА ОЦЕНКИ УЯЗВИМОСТЕЙ CVSS 4.0 / CVSS v4.0 [RU].pdf
СИСТЕМА ОЦЕНКИ УЯЗВИМОСТЕЙ CVSS 4.0 / CVSS v4.0 [RU].pdf
 
Cyberprint. Dark Pink Apt Group [RU].pdf
Cyberprint. Dark Pink Apt Group [RU].pdfCyberprint. Dark Pink Apt Group [RU].pdf
Cyberprint. Dark Pink Apt Group [RU].pdf
 
Cyber Defense Doctrine Managing the Risk Full Applied Guide to Organizational...
Cyber Defense Doctrine Managing the Risk Full Applied Guide to Organizational...Cyber Defense Doctrine Managing the Risk Full Applied Guide to Organizational...
Cyber Defense Doctrine Managing the Risk Full Applied Guide to Organizational...
 

Алексей Сторожев «Библиотека libimobiledevice»

  • 3. usbmuxd http://cgit.sukimashita.com/usbmuxd.git/ A socket daemon to multiplex connections from and to iOS devices. Mac OS, Linux: /var/run/usbmuxd Windows: localhost:27015 пятница, 26 июля 13 г.
  • 5. Apple Mobile Device Support пятница, 26 июля 13 г.
  • 6. Socat - http://www.dest-unreach.org/socat/ $ brew install socat sudo mv /var/run/usbmuxd /var/run/usbmuxx sudo socat -t100 -x -v UNIX-LISTEN:/var/run/ usbmuxd,mode=777,reuseaddr,fork UNIX-CONNECT:/var/run/usbmuxx > ~/ Desktop/usbmuxd.log 2>&1 Sniffing пятница, 26 июля 13 г.
  • 7. > 2013/07/03 18:05:32.872128 length=513 from=0 to=512 01 02 00 00 01 00 00 00 08 00 00 00 f8 00 00 00 ................ 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 <?xml version="1 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 .0" encoding="UT 46 2d 38 22 3f 3e 0a F-8"?>. 3c 21 44 4f 43 54 59 50 45 20 70 6c 69 73 74 20 <!DOCTYPE plist 50 55 42 4c 49 43 20 22 2d 2f 2f 41 70 70 6c 65 PUBLIC "-//Apple 2f 2f 44 54 44 20 50 4c 49 53 54 20 31 2e 30 2f //DTD PLIST 1.0/ 2f 45 4e 22 20 22 68 74 74 70 3a 2f 2f 77 77 77 /EN" "http://www 2e 61 70 70 6c 65 2e 63 6f 6d 2f 44 54 44 73 2f .apple.com/DTDs/ 50 72 6f 70 65 72 74 79 4c 69 73 74 2d 31 2e 30 PropertyList-1.0 2e 64 74 64 22 3e 0a .dtd">. 3c 70 6c 69 73 74 20 76 65 72 73 69 6f 6e 3d 22 <plist version=" 31 2e 30 22 3e 0a 1.0">. 3c 64 69 63 74 3e 0a <dict>. 09 3c 6b 65 79 3e 42 75 6e 64 6c 65 49 44 3c 2f .<key>BundleID</ 6b 65 79 3e 0a key>. 09 3c 73 74 72 69 6e 67 3e 63 6f 6d 2e 61 70 70 .<string>com.app 6c 65 2e 64 74 2e 58 63 6f 64 65 3c 2f 73 74 72 le.dt.Xcode</str 69 6e 67 3e 0a ing>. 09 3c 6b 65 79 3e 43 6c 69 65 6e 74 56 65 72 73 .<key>ClientVers 69 6f 6e 53 74 72 69 6e 67 3c 2f 6b 65 79 3e 0a ionString</key>. 09 3c 73 74 72 69 6e 67 3e 75 73 62 6d 75 78 64 .<string>usbmuxd 2d 33 31 37 3c 2f 73 74 72 69 6e 67 3e 0a -317</string>. 09 3c 6b 65 79 3e 43 6f 6e 6e 54 79 70 65 3c 2f .<key>ConnType</ 6b 65 79 3e 0a key>. 09 3c 69 6e 74 65 67 65 72 3e 30 3c 2f 69 6e 74 .<integer>0</int 65 67 65 72 3e 0a eger>. 09 3c 6b 65 79 3e 4d 65 73 73 61 67 65 54 79 70 .<key>MessageTyp 65 3c 2f 6b 65 79 3e 0a e</key>. 09 3c 73 74 72 69 6e 67 3e 4c 69 73 74 65 6e 3c .<string>Listen< 2f 73 74 72 69 6e 67 3e 0a /string>. 09 3c 6b 65 79 3e 50 72 6f 67 4e 61 6d 65 3c 2f .<key>ProgName</ 6b 65 79 3e 0a key>. 09 3c 73 74 72 69 6e 67 3e 58 63 6f 64 65 3c 2f .<string>Xcode</ 73 74 72 69 6e 67 3e 0a string>. 09 3c 6b 65 79 3e 6b 4c 69 62 55 53 42 4d 75 78 .<key>kLibUSBMux 56 65 72 73 69 6f 6e 3c 2f 6b 65 79 3e 0a Version</key>. 09 3c 69 6e 74 65 67 65 72 3e 33 3c 2f 69 6e 74 .<integer>3</int 65 67 65 72 3e 0a eger>. 3c 2f 64 69 63 74 3e 0a </dict>. 3c 2f 70 6c 69 73 74 3e 0a </plist>. -- < 2013/07/03 18:05:32.874439 length=294 from=0 to=293 26 01 00 00 01 00 00 00 08 00 00 00 f8 00 00 00 &............... 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 <?xml version="1 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 .0" encoding="UT 46 2d 38 22 3f 3e 0a F-8"?>. 3c 21 44 4f 43 54 59 50 45 20 70 6c 69 73 74 20 <!DOCTYPE plist 50 55 42 4c 49 43 20 22 2d 2f 2f 41 70 70 6c 65 PUBLIC "-//Apple 2f 2f 44 54 44 20 50 4c 49 53 54 20 31 2e 30 2f //DTD PLIST 1.0/ 2f 45 4e 22 20 22 68 74 74 70 3a 2f 2f 77 77 77 /EN" "http://www 2e 61 70 70 6c 65 2e 63 6f 6d 2f 44 54 44 73 2f .apple.com/DTDs/ 50 72 6f 70 65 72 74 79 4c 69 73 74 2d 31 2e 30 PropertyList-1.0 Typical log пятница, 26 июля 13 г.
  • 8. Packet analyzer: https://github.com/storoj/idevice-packet-analyzer cd /path/to/packet/analyzer bash ioslog2html.sh /path/to/usbmuxd.log /path/to/usbmuxd.html Help is on the way пятница, 26 июля 13 г.
  • 9. Pretty log пятница, 26 июля 13 г.
  • 10. #include <libimobiledevice/libimobiledevice.h> #include <libimobiledevice/lockdown.h> #include <libimobiledevice/screenshotr.h> int main(int argc, char **argv) { ! idevice_t device = NULL; ! lockdownd_client_t lckd = NULL; ! screenshotr_client_t shotr = NULL; ! lockdownd_service_descriptor_t service = NULL; ! const char *udid = "your udid here"; ! if (IDEVICE_E_SUCCESS != idevice_new(&device, udid)) { ! ! return -1; ! } ! if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, NULL)) { ! ! return -1; ! } ! if (LOCKDOWN_E_SUCCESS != lockdownd_start_service(lckd, "com.apple.mobile.screenshotr", &service)) { ! ! return -1; ! } ! if (screenshotr_client_new(device, service, &shotr) != SCREENSHOTR_E_SUCCESS) { ! ! return -1; ! } ! if (screenshotr_take_screenshot(shotr, &imgdata, &imgsize) == SCREENSHOTR_E_SUCCESS) { ! ! // screenshot taken ! } ! // ... } Screnshotter client пятница, 26 июля 13 г.
  • 11. $ idevicescreenshot Could not start screenshotr service! Remember that you have to mount the Developer disk image on your device if you want to use the screenshotr service. $ ideviceinfo | grep ProductVersion | awk '{ print $2 }' 6.1.3 $ export DeviceSupport=/Applications/Xcode.app/Contents/Developer/ Platforms/iPhoneOS.platform/DeviceSupport/ $ ideviceimagemounter “$DeviceSupport/6.1 (10B141)/DeveloperDiskImage.dmg” $ idevicescreenshot Screenshot saved to screenshot-2013-06-13-07-40-00.tiff Screenshot пятница, 26 июля 13 г.
  • 12. $ ls /Applications/Xcode.app/Contents/Developer/Platforms/ iPhoneOS.platform/DeviceSupport/ 4.2 5.0 6.0 4.3 5.1 6.1 (10B141) DeveloperDiskImage.dmg DeveloperDiskImage.dmg.signature Developer Images пятница, 26 июля 13 г.
  • 13. Developer Images No developer image Developer image mounted пятница, 26 июля 13 г.
  • 15. Official http://www.libimobiledevice.org/ http://cgit.sukimashita.com/libimobiledevice.git/ VS project https://github.com/storoj/libimobiledevice-win32 Mac OSX binaries https://github.com/benvium/libimobiledevice-macosx Libimobiledevice пятница, 26 июля 13 г.