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

Bug Report: Unhandled exception "UnicodeEncodeError: 'charmap' codec can't encode character '\x80' in position 337: character maps to <undefined>" (#012670b2) #997

Open
commixreporter opened this issue Jan 24, 2025 · 1 comment

Comments

@commixreporter
Copy link

Commix version: 4.1-dev#6
Python version: 3.12.4
Operating system: nt
Command line: commix.py -r ********* 
Traceback (most recent call last):
  File \"commix.py", line 36, in <module>
    main()
  File \"commix.py", line 31, in main
    import src.core.main
  File \"main.py", line 903, in <module>
    main(filename, url, http_request_method)
  File \"main.py", line 561, in main
    controller.do_check(url, http_request_method, filename)
  File \"controller.py", line 760, in do_check
    perform_checks(url, http_request_method, filename)
  File \"controller.py", line 729, in perform_checks
    data_checks(url, http_request_method, filename, timesec)
  File \"controller.py", line 646, in data_checks
    if post_request(url, http_request_method, filename, timesec) is None:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"controller.py", line 636, in post_request
    do_injection(found_parameter, settings.HTTPMETHOD.POST, header_name, url, http_request_method, filename, timesec)
  File \"controller.py", line 599, in do_injection
    injection_proccess(url, check_parameter, http_request_method, filename, timesec)
  File \"controller.py", line 423, in injection_proccess
    classic_command_injection_technique(url, timesec, filename, http_request_method)
  File \"controller.py", line 242, in classic_command_injection_technique
    if cb_handler.exploitation(url, timesec, filename, http_request_method, injection_type, technique) != False:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"cb_handler.py", line 33, in exploitation
    return cb_injection_handler(url, timesec, filename, http_request_method, injection_type, technique)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"cb_handler.py", line 26, in cb_injection_handler
    return handler.do_results_based_proccess(url, timesec, filename, http_request_method, injection_type, technique)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"handler.py", line 660, in do_results_based_proccess
    if pseudo_terminal_shell(injector, separator, maxlen, TAG, cmd, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, alter_shell, filename, technique, no_result, timesec, payload, OUTPUT_TEXTFILE, url_time_response) == None:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"handler.py", line 124, in pseudo_terminal_shell
    logs.executed_command(filename, cmd, shell)
  File \"logs.py", line 177, in executed_command
    output_file.write(re.compile(re.compile(settings.ANSI_COLOR_REMOVAL)).sub("",settings.INFO_SIGN) + "Execution output: " + output.encode(settings.DEFAULT_CODEC).decode() + "\n")
  File \"cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\x80' in position 337: character maps to <undefined>
@stasinopoulos
Copy link
Member

Similar with #878

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

No branches or pull requests

2 participants