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

Error TypeError: expected str, bytes or os.PathLike object, not NoneType on selecting network to crack zizzania handshake #28

Closed
1mehdifaraji opened this issue Jul 25, 2024 · 3 comments

Comments

@1mehdifaraji
Copy link

1mehdifaraji commented Jul 25, 2024

After selecting the network to crach, it throws the error TypeError: expected str, bytes or os.PathLike object, not NoneType.

Mac M1 Ventura 13.3.1.

Screenshot 1403-05-04 at 23 37 57

Screenshot 1403-05-04 at 23 38 06

@1mehdifaraji 1mehdifaraji changed the title Error TypeError: expected str, bytes or os.PathLike object, not NoneType on selecting network to crack Error TypeError: expected str, bytes or os.PathLike object, not NoneType on selecting network to crack zizzania handshake Jul 25, 2024
@phenotypic
Copy link
Owner

For CoreWLAN-related bugs, please refer to issue #19.

If you receive the Unable to obtain authorisation, exiting... error, ensure Python has been granted Location Services permissions by going to System Settings > Privacy & Security > Location Services and checking next to Python.

@1mehdifaraji
Copy link
Author

@phenotypic

I don't think it's a location permission issue, can you confirm it by the logs below?

Screenshot 1403-05-05 at 02 00 10

Screenshot 1403-05-05 at 02 01 26

Initiating zizzania to capture handshake...

Traceback (most recent call last):
  File "/Users/mehdi/Desktop/WiFiCrackPy/WiFiCrackPy.py", line 159, in <module>
    scan_networks()
  File "/Users/mehdi/Desktop/WiFiCrackPy/WiFiCrackPy.py", line 99, in scan_networks
    capture_network(networks_sorted[x]['bssid'], networks_sorted[x]['channel_object'])
  File "/Users/mehdi/Desktop/WiFiCrackPy/WiFiCrackPy.py", line 118, in capture_network
    subprocess.run(['sudo', zizzania_path, '-i', iface, '-b', bssid, '-w', 'capture.pcap', '-q'] + ['-n'] * args.d)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1754, in _execute_child
    self.pid = _posixsubprocess.fork_exec(
TypeError: expected str, bytes or os.PathLike object, not NoneType

@1mehdifaraji
Copy link
Author

1mehdifaraji commented Jul 25, 2024

It turns out python version 3.9.6 won't get BSSID of the networks so I did install version 3.9.13 and for some reason it worked and now it reveals the BSSID of networks. However now I get the error FileNotFoundError: [Errno 2] No such file or directory: 'hcxpcapngtool'

Full error log

Select a network to crack: 2

Initiating zizzania to capture handshake...

sudo: /Users/mehdi/zizzania/src/zizzania: command not found
Traceback (most recent call last):
  File "/Users/mehdi/Desktop/WiFiCrackPy/WiFiCrackPy.py", line 159, in <module>
    scan_networks()
  File "/Users/mehdi/Desktop/WiFiCrackPy/WiFiCrackPy.py", line 99, in scan_networks
    capture_network(networks_sorted[x]['bssid'], networks_sorted[x]['channel_object'])
  File "/Users/mehdi/Desktop/WiFiCrackPy/WiFiCrackPy.py", line 121, in capture_network
    subprocess.run(['hcxpcapngtool', '-o', 'capture.hc22000', 'capture.pcap'], stdout=subprocess.PIPE)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'hcxpcapngtool'

Update: FIxed the issue by installing brew install hcxtools.

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

2 participants