Is it possible to find somewhere the protocol used to pair/authenticate a by AirPlay
and that is mandatory on tvOS
10.2? A quick Wireshark
of iTunes
controlling an AppleTV
gives a rough idea of what's happening but does not gives the format of what is exchanges.
Thanks
POST /pair-pin-start RTSP/1.0 CSeq: 1 User-Agent: iTunes/12.6 (Windows; Microsoft Windows 7 x64 Ultimate Edition Service Pack 1 (Build 7601); x64) Client-Instance: A2FAF33ECFE99167 DACP-ID: A2FAF33ECFE99167 Active-Remote: 3742669230
RTSP/1.0 200 OK Server: AirTunes/320.20 CSeq: 1
POST /pair-setup-pin RTSP/1.0 CSeq: 2 Content-Type: application/x-apple-binary-plist Content-Length: 86 User-Agent: iTunes/12.6 (Windows; Microsoft Windows 7 x64 Ultimate Edition Service Pack 1 (Build 7601); x64) Client-Instance: A2FAF33ECFE99167 DACP-ID: A2FAF33ECFE99167 Active-Remote: 3742669230
bplist00.....VmethodTuserSpin_..00:FF:E1:61:F9:87. ..................................1
RTSP/1.0 200 OK Content-Length: 342 Content-Type: application/x-apple-binary-plist Server: AirTunes/320.20 CSeq: 2
bplist00.....RpkTsaltO....c.Li.4...L.............~....%k#..P2.5...G.U..Y..R..{<...r..O....f#.|65ds....+....Nd..PtSp.g.....S..A..k..c.N...D.B$../....|..^.Y...J^I...h;..|6........H.H.8q8....L........]fw....k.....|..7B>....6.z....+.9Es.7(...8E...j.W....U...f..`.H...HE........onv>f.O......7.;&C..U.z@{... .....................................,
POST /pair-setup-pin RTSP/1.0 CSeq: 3 Content-Type: application/x-apple-binary-plist Content-Length: 347 User-Agent: iTunes/12.6 (Windows; Microsoft Windows 7 x64 Ultimate Edition Service Pack 1 (Build 7601); x64) Client-Instance: A2FAF33ECFE99167 DACP-ID: A2FAF33ECFE99167 Active-Remote: 3742669230
bplist00.....RpkUproofO.....~.!..S|..5..M..)7..r.?.....j.N..0...[K.uu.. q+..O.0...c.!...\O......*.[k(.6.?Mv..-yS.......;[email protected][email protected].. ..... V.._k..........E.^}0.&...mvwpA=)X.}....OF...JZQ...o.,..(..G.g.{...0....wj,?...........G.m,..... .0.)..S....7...1.Q9PA.ni.d=....<=..}.O..2....d...... ..Z..j.... .....................................1
RTSP/1.0 200 OK Content-Length: 75 Content-Type: application/x-apple-binary-plist Server: AirTunes/320.20 CSeq: 3
bplist00...UproofO...G.f.)....A....q.P)...................................(POST /pair-setup-pin RTSP/1.0 CSeq: 4 Content-Type: application/x-apple-binary-plist Content-Length: 116 User-Agent: iTunes/12.6 (Windows; Microsoft Windows 7 x64 Ultimate Edition Service Pack 1 (Build 7601); x64) Client-Instance: A2FAF33ECFE99167 DACP-ID: A2FAF33ECFE99167 Active-Remote: 3742669230
bplist00.....SepkWauthTagO. .p..^.......vLk.&....&.(A.].....O..K...sW.&#..Q..... ..<...............................O
RTSP/1.0 200 OK Content-Length: 116 Content-Type: application/x-apple-binary-plist Server: AirTunes/320.20 CSeq: 4
bplist00.....SepkWauthTagO. [email protected].&ED...Q
POST /pair-verify RTSP/1.0 CSeq: 5 Content-Type: application/octet-stream Content-Length: 68 X-Apple-PD: 1 User-Agent: iTunes/12.6 (Windows; Microsoft Windows 7 x64 Ultimate Edition Service Pack 1 (Build 7601); x64) Client-Instance: A2FAF33ECFE99167 DACP-ID: A2FAF33ECFE99167 Active-Remote: 3742669230
.........?./.U..{..2.*'...bx).on.s.5...L.c.....{q..V^s?A4.P.mJ J...s
RTSP/1.0 200 OK Content-Length: 96 Content-Type: application/octet-stream Server: AirTunes/320.20 CSeq: 5
The Apple TV device verification has been reverse engineered. Here is the link to the project https://github.com/funtax/AirPlayAuth.