J'ai réussi à me connecter au wifi grâce à ce code:
1 2 3 4 5 6 7 8 9 10 11
| from subprocess import Popen, STDOUT, PIPE
handle = Popen('netsh wlan connect {0}'.format("Nom_Wifi"),
shell=True,
stdout=PIPE,
stderr=STDOUT,
stdin=PIPE)
handle.stdin.write("Mot_de_passe_wifi")
while handle.poll() == None:
print handle.stdout.readline().strip() |
cependant quand j'essaye de me connecter à un réseau wifi disponible mais non connu du pc, ce code affiche:
Il n'existe aucun profil ®ÿNom_Wifiÿ¯ affect
l'interface spcifie.
Avez-vous une solution?
merci de votre aide
Partager