Skip to content

Instantly share code, notes, and snippets.

@kawaz
Created Sep 16, 2019
Embed
What would you like to do?
iphoneを探すのメモ
#!/bin/bash
username='apple-id@example.com'
password='apple-id-no-password'
authheader="Authorization: Basic $(echo -n "$username:$password" | base64)"
url_initClient="https://fmipmobile.icloud.com/fmipservice/device/$username/initClient"
url_playSound="https://fmipmobile.icloud.com/fmipservice/device/$username/playSound"
# initClient
curl -vXPOST "$url_initClient" -H "$authheader" > initClient.json
# デバイス一覧
cat initClient.json | jq '.content|map({id,name,deviceClass,deviceModel,deviceDisplayName,rawDeviceModel,modelDisplayName,deviceDisplayName,passcodeLength,deviceModel,modelDisplayName})'
# playSound
curl -vXPOST "$url_playSound" -H "$authheader" -d '{"device":"deviceidxxxxxxxxxxxxxxxxxxxxxxxxxxxx","subject":"探し中"}' > tee playSound.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment