Peloton and Garmin credential encryption #66
juanlazarde
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi philosowaffle,
Grateful for your work here, as I was FRUSTRATED with Peloton and Garmin about the whole sync issue. You're a lifesaver!!
I customized your program though.
It may be just me, but, I cringe when I see my Peloton and Garmin credentials naked, in plain sight.
So, I customized your ver. 1.0.1 to have encrypted credentials.
But, then 1.0.3 came along, and instead of changing your code, I've decided to create a sort of wrapper around your peloton-to-garmin.py leveraging arguments to avoid having to edit your code with every update.
So, in honor of your program and to keep it short, I've called it
pel2gar.py
.Here's my day-to-day on this one:
pel2gar.py -pwd 123 -num 3
pel2gar then reads the config.ini and creates a command to run peloton-to-garmin.py with all corresponding arguments.
pel2gar edits your config.ini, and places encrypted strings where the plain text used to be.
It uses the cryptography package.
It's very simple, but to make it easy to use and in one file it ended being kind of a long code.
Here's what you do to encrypt:
pel2gar.py -encrypt
It runs a sort of wizard from there.
I tried to remain consistent with your coding style and the format of the commands/arguments.
For example, if you want to encrypt without wizard:
pel2gar.py -encrypt -pwd 123 -email [email protected] -password pel_pas
.... and so on. It will encrypt it in one line.I'd love to hear from you, and see if you find any value to it. I just program for fun and haven't shared code with anyone, so would like to get some feedback.
Get the file here: https://github.com/juanlazarde/pel2gar/blob/main/pel2gar.py
The code is for anyone to use it. Of course, I'd like to hear what works, what doesn't, to make it better.
Take care.
Juan
P.S. Tried uploading the file here on the Discussion, but it doesn't allow .py
Beta Was this translation helpful? Give feedback.
All reactions