Skip to content

Instantly share code, notes, and snippets.

@patcon
Created November 6, 2018 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patcon/b7e8c20cf586db63504eabe68345be4d to your computer and use it in GitHub Desktop.
Save patcon/b7e8c20cf586db63504eabe68345be4d to your computer and use it in GitHub Desktop.
A quick little script to get the internal OAuth API token from Gitter desktop (Mac).
cat query.sql | sqlite3 ~/Library/Caches/com.troupe.gitter.mac.Gitter/Cache.db
plutil -convert xml1 /tmp/request_object.plist
cat /tmp/request_object.plist | grep Bearer
SELECT Writefile('/tmp/request_object.plist', b.request_object)
FROM cfurl_cache_response AS r
INNER JOIN cfurl_cache_blob_data AS b
ON r.entry_id = b.entry_id
WHERE r.request_key LIKE '%/api/private/%'
LIMIT 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment