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]: Command 'wmic cpu get name' returned non-zero exit status 1. #1159

Open
Ceddicedced opened this issue Dec 11, 2024 · 1 comment
Open
Labels
agent Hashtopolis Agent related bug Something isn't working

Comments

@Ceddicedced
Copy link

Version Information

hashtopolis/backend:latest sha256:22be0c644c3eff473b5bc10c99f360659de8aed74bc1c2a719d3e49baeb5f00e

Hashcat

6.2.6

Description

Description:

The Hashtopolis client fails to run on my Windows 11 system due to an issue with the wmic command. The error occurs when the client tries to retrieve CPU information using wmic. However, wmic is deprecated and no longer available on modern Windows 11 installations. This results in a subprocess.CalledProcessError.

Steps to Reproduce:

  1. Download agent.zip
  2. Run python main.py on a Windows 11 system.
  3. Observe the error.

Output

~\Downloads\hashtopolis(1) via 🐍 v3.12.7
❯ python .\__main__.py
Found existing lock.pid, checking if python process is running...
Ignoring lock.pid file because PID is not existent anymore or not running python!
Starting client 's3-python-0.7.2.4'...
Collecting agent data...
Der Befehl "wmic" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Traceback (most recent call last):
  File "C:\Users\ceddi\Downloads\hashtopolis(1)\__main__.py", line 377, in <module>
    init(args)
  File "C:\Users\ceddi\Downloads\hashtopolis(1)\__main__.py", line 164, in init
    Initialize().run(args)
  File "C:\Users\ceddi\Downloads\hashtopolis(1)\htpclient\initialize.py", line 25, in run
    self.__update_information()
  File "C:\Users\ceddi\Downloads\hashtopolis(1)\htpclient\initialize.py", line 107, in __update_information
    output = subprocess.check_output("wmic cpu get name", shell=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ceddi\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ceddi\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'wmic cpu get name' returned non-zero exit status 1.

Fatfetch

~ via 🐍 v3.12.7
❯ fastfetch
/////////////////  /////////////////    ceddi@desktop
/////////////////  /////////////////    -------------
/////////////////  /////////////////    OS: Windows 11 (Pro) x86_64
/////////////////  /////////////////    Host: MS-7B86 (5.0)
/////////////////  /////////////////    Kernel: WIN32_NT 10.0.26100.2454 (24H2)
/////////////////  /////////////////    Uptime: 3 hours, 14 mins
/////////////////  /////////////////    Packages: 2 (choco)
/////////////////  /////////////////    Shell: Windows PowerShell 5.1.26100.2161
                                        Display (BenQ G2410HD): 1920x1080 @ 60 Hz in 23" [External]
/////////////////  /////////////////    Display (BenQ GL2450): 1920x1080 @ 60 Hz in 24" [External] *
/////////////////  /////////////////    DE: Fluent
/////////////////  /////////////////    WM: Desktop Window Manager
/////////////////  /////////////////    WM Theme: Custom - Blue (System: Dark, Apps: Dark)
/////////////////  /////////////////    Icons: Recycle Bin
/////////////////  /////////////////    Font: Segoe UI (12pt) [Caption / Menu / Message / Status]
/////////////////  /////////////////    Cursor: Windows-Voreinstellung (32px)
/////////////////  /////////////////    Terminal: Windows Terminal 1.21.3231.0
                                        Terminal Font: Cascadia Mono (12pt)
                                        CPU: AMD Ryzen 5 5600 (12) @ 4,45 GHz
                                        GPU 1: NVIDIA GeForce GTX 970 (3,94 GiB) [Discrete]
                                        GPU 2: NVIDIA GeForce RTX 2070 SUPER (7,80 GiB) [Discrete]
                                        Memory: 16,90 GiB / 47,93 GiB (35%)
                                        Swap: 0 B / 3,00 GiB (0%)
                                        Disk (C:\): 227,07 GiB / 442,47 GiB (51%) - NTFS
                                        Disk (D:\): 68,26 GiB / 100,00 GiB (68%) - FAT32
                                        Disk (E:\): 115,91 GiB / 488,28 GiB (24%) - NTFS
                                        Disk (F:\): 34,51 GiB / 111,77 GiB (31%) - NTFS
                                        Disk (G:\): 389,02 GiB / 465,75 GiB (84%) - NTFS
                                        Local IP (Ethernet): 192.168.178.91/24
                                        Locale: de-DE

@Ceddicedced Ceddicedced added the bug Something isn't working label Dec 11, 2024
@jessevz
Copy link
Contributor

jessevz commented Dec 11, 2024

Thanks for your detailed bug report. I think the best solution for this would be to use python code to determine the cpu architecture when on windows. For example use the platform.processor() function. That way we wont be reliant on which windows version is being used.

@jessevz jessevz added the agent Hashtopolis Agent related label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent Hashtopolis Agent related bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants