Bonsoir,

J'ai besoin de "bypass" une condition. Voici le script, il seras plus explicite:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
def exec_ping():
    forbidden = ['&', ';', '-', '`', '||', '|']
    command = input('Enter an IP: ')
    for i in forbidden:
        if i in command:
            print('Got you')
            exit()
    os.system('ping ' + command)
Ce script tourne sous linux, et je voudrais pouvoir entrer en commande: "localhost ; cat /root/Downloads/test.txt" mais comme vous le voyez, certains caractères sont interdits...

Je précise que je ne peut pas changer le script, sinon ce n'est plus du jeu

Comment faire ?

Merci,

EyesGammer