实施空投协议 [英] Implementing the AirDrop protocol

查看:213
本文介绍了实施空投协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我感兴趣的是一台设备上实现空投作为客户端,如在iPad或Windows电脑。任何人都可以点我在正确的方向实施空投协议Python或C.任何帮助就这将是极大的AP preciated。先谢谢了。

I am interested in implementing AirDrop as a client on a device such as an iPad or Windows computer. Can anyone point me in the right direction for implementing the AirDrop protocol in either Python or C. Any help on this would be greatly appreciated. Thanks in advance.

推荐答案

有关您的利益或任何人谁​​都会尝试逆向工程和实施空投,这里是我发现,你将不得不做上手什么

For the benefit of you or anyone who will try to reverse-engineer and implement Airdrop, here is what I found and what you will have to do to get started:

有涉及两个步骤,它们可以在独立地或并行地进行。

There are two steps involved and they can be done in independently or in parallel.


  1. 逆向工程的方式,物理WLAN创建ad-hoc网络和名为

要做到这一点,从这里 http://istumbler.net/ 得到iStumbler和尝试看看,如果一个额外的ad-hoc网络节目若空投正在运行。我已经简要地尝试和似乎有一个未加密,即席的802.11b网络,它的名称开始一个H。 (但我可能是错的,自己试用。)尝试找到用于空投命名的图案或标识该网络。从多台Mac电脑试图找到这一点。

To do this, get iStumbler from here http://istumbler.net/ and try to see if an additional ad-hoc network shows up when airdrop is running. I have briefly tried and there seems to be an unencrypted, ad-hoc 802.11b network, its name starting with an "H". (But I could be wrong, try this yourself.) Try to find the pattern used by Airdrop to name or identify the network. Try from multiple Macs to find this.


  1. 逆向工程协议

在客户端加入了WiFi网络,空投将使用Bonjour在检测到其他客户端。

Once clients have joined the WiFi network, Airdrop will detect other clients using Bonjour.

首先,如在<一个描述href=\"http://osxdaily.com/2011/09/16/enable-airdrop-ethernet-and-unsupported-macs/\">http://osxdaily.com/2011/09/16/enable-airdrop-ethernet-and-unsupported-macs/ ,在终端运行该得到的东西的工作的没有的隐藏的ad-hoc网络:

First, as described at http://osxdaily.com/2011/09/16/enable-airdrop-ethernet-and-unsupported-macs/ , run this in your Terminal to get things working without the hidden ad-hoc network:

默认写com.apple.NetworkBrowser BrowseAllInterfaces 1

defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1

然后重新启动搜索。

从这里获取卓悦浏览器:tildesoft.com

Get the Bonjour Browser from here: tildesoft.com

在开始空投,你会发现你的Mac发布服务_airdrop._tcp。还出版了主机和端口的各种IP不会忽略(一个新的每次创建空投在Finder中打开),您的Mac正在监听。还出版了计算机的名称,以及具有值为1。你必须看看这两个哈希值是如何生成的,如果他们需要两把钥匙ehash和phash一键标志 。也许他们是。尝试发布使用可用的卓悦库之一的第二台计算机上自己的数据,看看他们是否显示在空投(在Finder中)。

When starting Airdrop you will find that your mac advertises a service "_airdrop._tcp". It also publishes the various IP adresses of the host and the port (a new one is created each time Airdrop is opened in Finder) that your mac is listening on. It also publishes the name of the Computer as well as a two keys "ehash" and "phash" and one key "flags" that has a value of 1. You would have to look how these two hashes are generated and if they are required. Probably they are. Try to publish your own data on a second computer using one of the Bonjour libraries available and look if they show up in Airdrop (in Finder).

我已经发现,通过每个客户端露出的TCP服务使用SSL连接。服务器证书似乎被链接到您的Apple ID。您可以在钥匙串证书。客户端证书也由服务器请求。这可能是从其他计算机一样的的Apple ID证书。您将与这个实验。

I have found that the TCP service exposed by each client is using an SSL connection. The server certificate seems to be linked to your Apple ID. You can find the certificate in the Keychain. A client certificate is also requested by the server. This is probably just the same Apple ID certificate from the other computer. You will have to experiment with this.

不知使用什么协议,SSL连接内并且没有获得第二MAC目前进行调查。你将不得不MITM连接,找出(尝试查尔斯和Wireshark)。在任何情况下,将用于传送用户图标以及协商传输并且还可能移动的实际数据。

I don't know what protocol is used inside that SSL connection and don't have access to a second Mac to investigate currently. You will have to MITM the connection to find out (try Charles and Wireshark). In any case it will be used to transfer the user icon as well as negotiate the transfer and possibly also to move the actual data.

我认为一个开放的实施,这将是有很大好处,即使它会变成最终限于用户提供一个Apple ID - 它们是免费的毕竟

I think an open implementation of this would be of great benefit, even if it would turn out in the end to be limited to users with an Apple ID - they are free after all.

祝你好运!

这篇关于实施空投协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆