Skip to content

Conversation

@NtAlexio2
Copy link
Contributor

@NtAlexio2 NtAlexio2 commented Sep 3, 2024

This PR adds two most wanted PutClass and DeleteClass functions to wmi.py (issue #1186, this Reddit link, wmiexec-Pro project, ...) which unlocks many new features for wmi in future. The PR also includes:

  • Add ObjectFlags constants referenced in MS-WMIO (2.2.6 ObjectFlags) to wmi.py file. It helps to easy debugging and code maintenance.
  • Bug fix in CLASS_AND_METHODS_PART class to handle empty class names.

@NtAlexio2 NtAlexio2 changed the title Add wmi ObjectFlags to improve human-readability Implement PutClass and DeleteClass for WMI Jul 13, 2025
@NtAlexio2
Copy link
Contributor Author

@anadrianmanrique Some updates on this PR. Please check <3

@XiaoliChan
Copy link
Contributor

Wow, this is awesome!!!!

@NtAlexio2
Copy link
Contributor Author

@anadrianmanrique When you get a chance, please review this PR — I’m pretty excited about these changes, they should make a real difference on WMI! 💪

@anadrianmanrique
Copy link
Collaborator

@NtAlexio2 thanks, yes, this PR has been already prioritized to be reviewed/tested in the context of 0.14-dev

@XiaoliChan
Copy link
Contributor

@NtAlexio2 BTW, could you add the test case in https://github.com/fortra/impacket/blob/master/tests/SMB_RPC/test_wmi.py ?

@anadrianmanrique anadrianmanrique added the medium Medium priority item label Oct 30, 2025
@anadrianmanrique anadrianmanrique self-assigned this Oct 30, 2025
@anadrianmanrique
Copy link
Collaborator

Hi @NtAlexio2, as @XiaoliChan pointed out, would it be possible to add tests cases coverage?

@NtAlexio2
Copy link
Contributor Author

sure, I'll fix that asap

@anadrianmanrique anadrianmanrique added the waiting for response Further information is needed from people who opened the issue or pull request label Nov 14, 2025
@NtAlexio2
Copy link
Contributor Author

@anadrianmanrique done

@XiaoliChan
Copy link
Contributor

@NtAlexio2 Man, this is awesome, will improve my wmiexec-Pro after this PR merged!

@anadrianmanrique anadrianmanrique removed the waiting for response Further information is needed from people who opened the issue or pull request label Jan 15, 2026
@anadrianmanrique
Copy link
Collaborator

I added a couple of cases in order to improve coverage of the changes.
@NtAlexio2 can you review that? Also I commented out in test_IWbemServices_PutClass_update_adds_property a test adding a UINT32 attribute as it wasn't passing ok. I that test correct? there could be a bug for that specific case?

Thanks

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

Labels

medium Medium priority item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants