Тёмный

Why Eval And Exec Are The WORST Python Functions [Tech Rants] 

CodingLikeMad
Подписаться 3,4 тыс.
Просмотров 1,9 тыс.
50% 1

In this video we go over the Eval and exec functions in python, and discuss what it's for and why it's really insecure. The video is intended for educational purposes only - please be kind to each others code!
You can checkout my live stream content on twitch at:
/ spshkyros

Наука

Опубликовано:

 

26 янв 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@mthees08
@mthees08 2 года назад
Some of us just like to live dangerously.
@squarerootof2
@squarerootof2 2 года назад
I've also got total control of my machine. I'm terrified by what I can do. I can even "su" to root!!!
@CodingLikeMad
@CodingLikeMad 2 года назад
The risk is when you let others use software you write ;)
@squarerootof2
@squarerootof2 2 года назад
@@CodingLikeMad I know, I was just kidding. Like you said, the greater the power the more responsible you have to be. It's not the tools' fault, it's how you use them.
@CodingLikeMad
@CodingLikeMad 2 года назад
Yeah, 100%. I guess the question is how trustworthy are people. I like people, but do I trust them? Mmm, not so much :p
@CodingLikeMad
@CodingLikeMad 2 года назад
On a side note, I too can use su. I once deleted most of /bin before realizing I was not where I thought I was when I used rm -rf :/
@squarerootof2
@squarerootof2 2 года назад
@@CodingLikeMad Lol, it would be even more tragic if you really wanted or needed to do that but instead you got an error message saying - "Permission denied. User root not trusted. Too irresponsible!".
@rubidi7624
@rubidi7624 Год назад
All these problems are easily solved if you do a search through regular expressions and delete words such as os, import
@CodingLikeMad
@CodingLikeMad Год назад
The point is that you need to think of EVERY such word. Solving one is easy. Good luck catching them all.
@QuarktaschemitSenf
@QuarktaschemitSenf Год назад
To solve your plot-options-problem. Append the plot-options to a list, compare them to a list of allowed options, then just run the exec() on the ones that match. Also i like your function-plotter. Code available?
@turiyathe4th
@turiyathe4th 2 месяца назад
Yeah, I also thought the same. What's the issue with that ?
@CodingLikeMad
@CodingLikeMad 2 месяца назад
I cannot think of an easy way to break that. But in that case, why not just make a list of options available? The issue is when free form code is allowed, and getting the benefits of that without insecurity is the problem. I would argue that in doing that comparison, you've basically made it totally pointless to do in the first place - it's just a more convoluted input system.
@kabokbl2412
@kabokbl2412 2 года назад
wow
@FlippinFingers
@FlippinFingers Год назад
priv esc
Далее
Be Careful When Using exec() or eval() in Python
9:17
skibidi toilet multiverse 039 (part 1)
05:29
Просмотров 5 млн
Exec() VS Eval() Explained In Python Tutorial 2023
6:44
Python eval() - Evaluate Expressions Dynamically
14:02
Derivatives In PYTHON (Symbolic AND Numeric)
17:37
Просмотров 46 тыс.
Why do C Programmers Always Obfuscate Their Code?
2:01:57
What Is The Most Complicated Lock Pattern?
27:29
Просмотров 1,3 млн
This is why Deep Learning is really weird.
2:06:38
Просмотров 358 тыс.
Развод с OZON - ноутбук за 2875₽
17:48
Что не так с Sharp? #sharp
0:55
Просмотров 96 тыс.