Skip to content

Instantly share code, notes, and snippets.

@jkitching
Created August 25, 2023 04:17
Show Gist options
  • Select an option

  • Save jkitching/7c66f1680dcd2df517ae728c445089d4 to your computer and use it in GitHub Desktop.

Select an option

Save jkitching/7c66f1680dcd2df517ae728c445089d4 to your computer and use it in GitHub Desktop.
# Usage:
#
# $ docker build -t gpsoauth_login -f gpsoauth_login.Dockerfile .
# $ docker run -it --rm gpsoauth_login
# <stdin: username>
# <stdin: password>
# <stdin: android_id>
# {'SID': 'BAD_COOKIE', 'LSID': 'BAD_COOKIE', 'Token': ... }
FROM alpine:3.16
RUN apk upgrade --update-cache --available && \
apk add python3 py3-pip && \
pip install gpsoauth 'urllib3<=1.25.11'
RUN echo $'import gpsoauth; import json\n\
ret = gpsoauth.perform_master_login(input(), input(), input())\n\
print(json.dumps(ret))' > /glogin.py
ENTRYPOINT ["python3", "/glogin.py"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment