Comments (4)
I wrote a quick little way this might be accomplished (with simple XOR encryption), but there's no (good) way in my implementation to check if the user provided the correct password to decrypt their credentials. The only way to know if they got their password wrong would be to see if Spotify throws an error back.
Normally a known string might be used to verify the correctness of a password, but with my shitty XOR cipher, this could just lead to the trivial decoding of the user's credentials.
Not making a PR yet, but feel free to look at the diff in my fork, and maybe you can use / improve on some of it. Or not. No difference to me really.
This also doesn't address the case where a user might already have stored credentials without a password, and updates their repo to use this (they'd have to delete credentials.json
and re-enter their credentials the next time they run the script.
Not really making a good sales pitch for my work right now, but I've written too much NOT to post this so ok here goes
from spotibyeads.
Nice... That last line's the best
@michaeljgallagher I'll check out your implementation soon and get back to you.
I actually already figured out a method that will make verification possible, just yet to implement.
As for the updating case, I suggest we use an entirely new file name "credentials.bin", since the new store can potentially contain non-printable characters and should be considered binary data.
The program will check for the existence of the JSON file, if found, it'll be loaded, the data will be encrypted and saved in the new file, then the JSON file can be safely deleted.
From this point, versioning of the project will start. So after some versions, the support for the JSON files will be removed and users that update after then will be required to re-enter their credentials.
What do you say about this?
from spotibyeads.
As for the updating case, I suggest we use an entirely new file name "credentials.bin", since the new store can potentially contain non-printable characters and should be considered binary data.
That was actually something I was running into issues with initially; I had originally been trying to use simple-crypt, but couldn't write the output to a .json
since they were bytes. Hence why I implemented a slipshod version of XOR encryption :p
Your vision for this sounds great. Glad I didn't waste anyone's time by making PR for someone to just have to close it out. I took it on because I thought it would be a fun little exercise to implement some type of XORing algo.
from spotibyeads.
What a great spirit you've got, keep it up. Never let closed PRs weigh you down
Definitely, working with encryption is fun. As for the simple-crypt library, I'm not sure it's necessary. Yes, it'll provide added security but it'll just be another added requirement... too many dependencies for a single script and another quirk for those updating :).
Hopefully, I can work on my implementation today... I'll open a PR once I'm done, you could check it out.
from spotibyeads.
Related Issues (20)
- Can't find spotify.exe HOT 4
- Is it possible to bundle the python interpreter installer with main.py in an exe file? HOT 9
- running the program HOT 24
- write credential inside the main folder HOT 3
- Need for a stable and standard update mechanism. HOT 3
- Prebuilt executables HOT 18
- New documentation theme HOT 6
- Way to reduce number of requests sent HOT 9
- TypeError : 'method' object is not subscriptable HOT 4
- Might not skip ads when the user manually skips a track or changes playlist. HOT 1
- cannot open localhost8080 in firefox HOT 29
- Queue disappears aftert restart HOT 7
- the script stopped when detected an ad I guess
- Automatic resume of songs after add skipped HOT 10
- Wrong badge link HOT 1
- Can we add web version ? HOT 2
- How about hotkeys? HOT 1
- Not working at all~~~ HOT 1
- doesn't block ads HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spotibyeads.