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

Start with Python2/3 result in str() errors #125

Open
Flerov opened this issue Nov 17, 2022 · 5 comments
Open

Start with Python2/3 result in str() errors #125

Flerov opened this issue Nov 17, 2022 · 5 comments

Comments

@Flerov
Copy link

Flerov commented Nov 17, 2022

Python3 not working at all. Python2 finds some Networks before crash
Trying to start in Python3 results in: [
Traceback (most recent call last):
File "./wifijammer", line 476, in
mon_iface = get_mon_iface(args)
File "./wifijammer", line 117, in get_mon_iface
interface = get_iface(interfaces)
File "./wifijammer", line 160, in get_iface
for line in proc.communicate()[0].split('\n'):
TypeError: a bytes-like object is required, not 'str'
]

In Python2 results in: [
[*] Finding the most powerful interface...
[+] Networks discovered by wlan1: 0
[+] Networks discovered by wlan0: 13
[+] Starting monitor mode off wlan0
Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Operation not supported.
Traceback (most recent call last):
File "./wifijammer", line 478, in
mon_MAC = mon_mac(mon_iface)
File "./wifijammer", line 199, in mon_mac
info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', bytes(mon_iface, 'utf-8')[:15]))
TypeError: str() takes at most 1 argument (2 given)
]

Any suggestions?

@letrich
Copy link

letrich commented Nov 23, 2022

Same here

@davidm71
Copy link

Change lines 199 +200 in the wifijammer source code to this:
info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', bytes(mon_iface).encode('utf-8')[:15]))
mac = ':'.join('%02x' % ord(b) for b in info[18:24])

@Rukasyywyw
Copy link

Change lines 199 +200 in the wifijammer source code to this: info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', bytes(mon_iface).encode('utf-8')[:15])) mac = ':'.join('%02x' % ord(b) for b in info[18:24])

raceback (most recent call last):
File "/home/kali/wifijammer/wifijammer", line 478, in
mon_MAC = mon_mac(mon_iface)
File "/home/kali/wifijammer/wifijammer", line 199, in mon_mac
info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', bytes(mon_iface).encode('utf-8')[:15]))
TypeError: string argument without an encoding

@davidm71
Copy link

Worked for me.

@willlem
Copy link

willlem commented Jul 5, 2023

With a raspberry pi3 and raspian I get the same error as Rukadsyywyw. with a new kali installation i get the same error as Rukadsyywyw. who can help me to solve this error?

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

5 participants