Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix profile line / csv for delimiter char existing in values #6

Open
ThomasWaldmann opened this issue Jan 19, 2018 · 4 comments
Open

Comments

@ThomasWaldmann
Copy link
Collaborator

currently ";" is used as csv delimiter.
guess one will run into a problem if the ssid or password contains a ";".

@tayfunulu
Copy link
Owner

okey. whats is your suggestion to separate - tab, space or special character ?

@ThomasWaldmann
Copy link
Collaborator Author

well, we don't know what people put in their ssids / passwords - could be anything (anything except 0x00 maybe due to C limitations)?

so an easy solution could be to use 0x00 as separator - slightly ugly because we have a text file containing zero bytes then.

another way would be to just encode/decode the ssid / password part, e.g. using base64 (unreadable for humans) or some repr-like encoding and use any char as delimiter that is not in the possible encoder output values.

or give up csv and just use pickle.dump?

@yeyeto2788
Copy link

Hey there, just passing by this repository and found this issue and it came to my mind that instead of saving it into CSV format maybe it can be saved into JSON format and if any special character needs to be saved why not escaping them?

Also it came to my mind to encode the password string as Base64 which for example:

"hello world!" will be converted into ImhlbGxvIHdvcmxkISI=

One limitation I see on the last option will be memory space used but it might be a way to handle any password with special characters

@ThomasWaldmann
Copy link
Collaborator Author

ThomasWaldmann commented Feb 27, 2018

JSON is not directly usable as it can not have arbitrary bytes in it, so we would need to encode all stuff that can be arbitrary bytes (password, ssid, ...).

But if we encode that much, what's left? We could also use pickle if it is not readable anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants