seemoo-lab / opendrop

An open Apple AirDrop implementation written in Python
https://owlink.org
GNU General Public License v3.0
8.63k stars 273 forks source link

Sending URLs does not work #67

Closed VladislavEkimtcov closed 3 years ago

VladislavEkimtcov commented 3 years ago

I am planning on hosting an app launch party. One idea is to have a jockey copy-paste device IDs from one terminal window into another with a send script, sharing urls to a landing webpage with an app clip banner to the participants, logging their responses (or have a computer do something similar). We are doing this because we're are investigating AirDrop as a marketing method among youth.

The problems start at the conceptual stage. I've tried airdropping a webpage to an OpenDrop receiver, and got a *.webloc file. Great. The file starts with bplist00 and is similar to a file you get by dragging a safari url onto desktop.

The problem is, when I try to opendrop the exact same file back, I get this:

Mysteriously, airdropping the file seems to work fine and launches Safari on the iPhone.

Does this have to do something with the specifics of the send_upload implementation? Does OpenDrop not advertise some sort of capability?

ps Thank you for your amazingly interesting paper and all the effort of making airdrop open :)

VladislavEkimtcov commented 3 years ago

https://github.com/seemoo-lab/opendrop/issues/56 Is webloc one of these types?

VladislavEkimtcov commented 3 years ago

note to not sleep deprived tomorrow self: webloc is "application/octet-stream" mime type

schmittner commented 3 years ago

This one was really not trivial, had to dig a bit deeper. You can now specify a --url flag to state that -f,--file should in fact be treated as an URL. The solution only works for devices that announce support for URLs (which most current Apple devices do as far as I know). Let me know if it works for you.

Added for completeness: it was not because of missing UTI support (which I suspected) but actually because sending URLs uses different protocol fields (Items instead of File array in the Ask request) and does not trigger and Upload request.