Skip to content

Instantly share code, notes, and snippets.

@kawaz
Created September 16, 2019 02:14
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kawaz/21dc0849c917c4c55ee12756c897472f to your computer and use it in GitHub Desktop.
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