Python - Fabric - Functions

preview_player
Показать описание
Check out my video for #fabric #functions, as to how you can simplify your daily routine.

Рекомендации по теме
Комментарии
Автор

Nice video. However, what your doing here has the potential of becoming a bit dangerous down the line!

Imagine what would happen if someone passed the process name " zzz'; echo BOOM' " as the parameter to this function. The same problem would occur if you were just trying to find a process with an actual quote character in its name.

You could fix this by escaping the parameter using the "quote" function from the "shlex" module, and then inserting the returned string into the command without quotation marks.

jocketf