from flask import Flask, request, render_template_stringapp =Flask(__name__)blacklist = ['.','}}','*','[',']',"'",'{{','_','+','/','-','<','>','self','globals','builtins','import','init','class','mro','getitem','config','base','safe']@app.route('/')defindex(): param = request.args.get('cmd', '') error =Noneifany(blacklisted_word in param for blacklisted_word in blacklist): error ="L'utilisation de certains mots n'est pas autorisée."returnrender_template_string("Error")returnrender_template_string(param, error=error)if__name__=='__main__': app.run(debug=True)