Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fix "NameError: name 'iface' is not defined " #68

Open
abundant-ray opened this issue Sep 23, 2021 · 0 comments
Open

How to fix "NameError: name 'iface' is not defined " #68

abundant-ray opened this issue Sep 23, 2021 · 0 comments

Comments

@abundant-ray
Copy link

abundant-ray commented Sep 23, 2021

It comes up with this whenever i run this script

import pywifi
from pywifi import PyWiFi
from pywifi import const
from pywifi import Profile

This is the part of the code that fails

profile.key = password # use generated password
    iface.remove_all_network_profiles() # remove all the profiles which are previously connected to device
    tmp_profile = iface.add_network_profile(profile) # add new profile 
    time.sleep(0.1) # if script not working change time to 1 !!!!!!
    iface.connect(tmp_profile) # trying to Connect
    time.sleep(0.35) # 1s

Error message

File "passcracker.py", line 63, in main
iface.remove_all_network_profiles() # remove all the profiles which are previously connected to device
NameError: name 'iface' is not defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant