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

Python3 Bug in /WPAxFuzz/dos-sae.py #6

Open
Th3Tr1ckst3r opened this issue Sep 26, 2024 · 0 comments
Open

Python3 Bug in /WPAxFuzz/dos-sae.py #6

Th3Tr1ckst3r opened this issue Sep 26, 2024 · 0 comments

Comments

@Th3Tr1ckst3r
Copy link

Python3 bug related to concatenating integers with strings in /WPAxFuzz/dos-sae.py:

Traceback (most recent call last):
  File "/home/th3tr1ckst3r/Desktop/WPAxFuzz/dos-sae.py", line 761, in <module>
    print(('  ' + bcolors.STH + 'AP_CHANNEL:   ' + AP_CHANNEL + bcolors.ENDC).center(terminal_width))
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
TypeError: can only concatenate str (not "int") to str

I've also included a patch, the key here being wrapping the integers with str(), mitigating the issue.

terminal_width = int(subprocess.check_output(['stty', 'size']).split()[1])
print("\n")
print('-'*terminal_width)
print((bcolors.OKGREEN + "INFORMATION RETRIEVED FROM CONFIG FILE" + bcolors.ENDC).center(terminal_width))
print(('  ' + bcolors.STH + 'AP_MAC:   ' + AP_MAC_ADDRESS + bcolors.ENDC).center(terminal_width))
print(('  ' + bcolors.STH + 'AP_CHANNEL:   ' + str(AP_CHANNEL) + bcolors.ENDC).center(terminal_width))  # Converted int to str here
print("\n")
print((bcolors.STH + 'AP_MAC_DIFFERENT_FREQUENCY:   ' + AP_MAC_DIFFERENT_FREQUENCY + bcolors.ENDC).center(terminal_width))
print(('  ' + bcolors.STH + 'CHANNEL_DIFFERENT_FREQUENCY:   ' + str(CHANNEL_DIFFERENT_FREQUENCY) + bcolors.ENDC).center(terminal_width))  # Converted int to str here
print("\n")
print(('  ' + bcolors.STH + 'TARGETED_STA_MAC_ADDRESS:   ' + TARGETED_STA_MAC_ADDRESS + bcolors.ENDC).center(terminal_width))
print("\n")
print(('  ' + bcolors.STH + 'ATTACKING INTERFACE:   ' + ATTACKING_INTERFACE + bcolors.ENDC).center(terminal_width))
print(('  ' + bcolors.STH + 'MONITORING INTERFACE:   ' + MONITORING_INTERFACE + bcolors.ENDC).center(terminal_width))
print("\n")
print(('  ' + bcolors.STH + 'PASSWORD:   ' + PASSWORD + bcolors.ENDC).center(terminal_width))
print('-'*terminal_width)

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