Eval hack
Can someone hack this? Hack = reveal the secret (environmentvariables) variable "y" has the secret
If u can, say the secret and pls say how to fix that too..
Can i safely use this?
Voters
MrVoo
Nobody else can even run the project (as of now), so it seems safe to me
Debarchito
I do think they are safe to use. Like, everyone uses them! Feel free!
environment variables are only set by those that have multiplayer access to the repl or made the repl.
In other words, if you can't edit the repl, the environment variables are hidden.
@Coder100 i should have given more context. I am going to use
eval()
in a discord bot to let users calculate math expressions.... i dont want anyone to find out the bot's token (in an environment variable) by using somethjng like@QuantumCodes Just use
in
to find words like "print", "import", or "token". You probably need more words than that though@MrVoo yea
please read this: https://docs.python.org/3.8/library/functions.html#eval @QuantumCodes
@Coder100 ast.literal_eval should help..