How to get iDevice’s UDID from Mobile Safari?

This is an old topic, just make it as an intro to the coming article.

If you want to collect iOS users’ device detail, such as Serial Number, UDID, IMEI, you’ll find Apple provides an application called ‘iPhone Configuration Utility’.
You can download the iPhone Configuration Utility for Windows here and for OS X here.
Guys who ever tried to get an iOS Beta installed and worked might know this because of the mobileprovision stuff.
Run IPCU, choose ‘Configuration profiles’ and click the ‘New’ icon, you’ll see something like this:
ipcu snapshot

Write something and export as an unsigned mobileconfig file. Then open it with text editor, you’ll find a XML which means you can write your own without ipcu.
Take a look at this: https://developer.apple.com/library/ios/documentation/networkinginternet/conceptual/iphoneotaconfiguration/ConfigurationProfileExamples/ConfigurationProfileExamples.html, you’ll find more.


Here’s a sample mobileconfig

And the php file in URL:

Now you can visit https://sskaje.me/sskaje/ios/1.mobileconfig on your mobile safari, you’ll see these:
IMG_1030
IMG_1031
IMG_1032
If you don’t want the RED ‘unsigned’ notice, buy a certificate and sign your mobileconfig.

Then try to find files named like sss_* in your server’s /tmp, you may find files with a size of 3KB~4KB.
Open with vim, random codes with visible XML in it.
QQ20131016-1

You can match the xml part by regexp. Or, you may need the next article: Apple signed fake device attributes?(Password protected :P)

How to get iDevice’s UDID from Mobile Safari? by @sskaje: https://sskaje.me/2013/10/how-to-get-idevices-udid-from-mobile-safari/