DON'T USE THE eval() FUNCTION IN PYTHON!

Veröffentlicht am: 14 August 2021
auf dem Kanal: Elliot's Hacking Heaven!
1,047
25

In this video I try to explain why you shouldn't use eval() function in your python code with the help of a practical real world example, which is just a simple test flask server.

I have noticed how when you google "What is eval() in python?" the first result which comes up is this link [https://towardsdatascience.com/python....] from towardsdatascience which says:

eval is a built-in- function used in python, eval function parses the expression argument and evaluates it as a python expression. In simple words, the eval function evaluates the “String” like a python expression and returns the result as an integer.


This is in fact a dangerously incomplete answer. The real answer is that it executes python statements which you pass in and returns the answer back to you. To convert a string number into integer, the safest way you can take is by using the int() function to safeguard your projects.

I hope that this video can help raise awareness to such minute security details that often times developers miss. I will try my best to make more content and increase it's quality with time.

You can find the code base I used in this video here: https://github.com/0x0elliot/codeinvi...

You can find the blog form of this video here: [insert medium link once the article is done]

Feel free to follow me on my socials:

twitter:   / 0x0elliot   [I mostly shitpost here and talk about tech in general]

medium:   / 0x0elliot  
discord server:   / discord  

I am also thinking of making a Python for beginners course soon enough. There are enough of Python tutorials you will find online on youtube but I want to make something that potentially gives something more to the students like Python Projects to work on, Python code assignments etc along with the Python Basics in the coding tutorial.

I am also planning on releasing a cybersecurity for beginners video series that aims at explaining the niche spectrums of cybersecurity that I have picked up on in the past two years even though I am a huge noob.


Auf dieser Seite können Sie das Online-Video DON'T USE THE eval() FUNCTION IN PYTHON! mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Elliot's Hacking Heaven! 14 August 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,047 Mal angesehen und es wurde von 25 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!