Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7883e5f
Added pycompat urepr_unicode for unicode repr in python2 + fix / kuse…
hakril Jul 30, 2020
9eb4405
Passed process relation API to Wide functions
hakril Jul 30, 2020
e313510
Fix object_manager.KernelObject.__repr__ to handle unicode name
hakril Jul 30, 2020
99fbec8
Passed services API to Wide functions
hakril Jul 30, 2020
5217506
Change system.build_numer to actuel int NtBuildNumber + added system.…
hakril Jul 30, 2020
33766c2
Working on WinAPI Wide-transition
hakril May 24, 2021
0a2ed77
Adding encoding documentation
hakril May 24, 2021
9ce6fce
Update ctypes_generation
hakril May 20, 2024
44ac635
ctypes_generation/generate.py works on py3 + deterministic on py2 & py3
hakril May 20, 2024
ae5bf70
Improve ctypes generation determinism for py2 vs py3 generator
hakril May 20, 2024
4120c6e
Fix failed merge
hakril May 20, 2024
72a7f52
Fix enumerate_threads_setup_owners()
hakril May 20, 2024
a580153
More encoding tests
hakril May 20, 2024
7a7e693
More encoding testing of CI
hakril May 20, 2024
6586018
Improve pycompat when stdout is not a tty (no stdout.encoding)
hakril May 20, 2024
412c725
Improve pycompat urepr_encode for non-tty stdout + fix some tests
hakril May 20, 2024
210bc64
Fix error in pycompat
hakril May 20, 2024
1b50970
Remove breakpoint in test_security_descriptor_from_unicode_file()
hakril May 20, 2024
a580d82
More unicode compat / more fix
hakril May 20, 2024
75dfe84
More strange sys.stdout fixes for CI
hakril May 20, 2024
2471401
More tests fix
hakril May 20, 2024
736a722
More pycompat fixes
hakril May 20, 2024
87e1c99
Add test on logicaldrives for py3
hakril May 21, 2024
a8414c9
Pipe API use Wide + support unicode
hakril May 21, 2024
3ad9bad
Trying to improve workflow with better pytest results name
hakril May 22, 2024
4bcec38
volume.py (logicaldrives) now use W() APIs
hakril May 22, 2024
d1e13fd
Improve test for unicode
hakril May 22, 2024
cab8be5
Fix some tests
hakril May 22, 2024
6f55a47
windows.system now use W() APIs
hakril May 22, 2024
5ae315b
winutils fonction use Wide APIs
hakril May 22, 2024
d756cb1
windows.system.etw support unicode + tests
hakril May 22, 2024
bb4271d
windows.system.device_manager handle unicode + test
hakril May 22, 2024
d61067f
Transfering base of symbol API to Wide + tests
hakril May 22, 2024
2c518a7
Improve Symbol API : finish passing to unicode
hakril May 28, 2024
4b5b924
Working on new sample for debug.symbols type exploration
hakril May 28, 2024
13dc869
Add unicode tests + comments
hakril Jun 5, 2024
b003d9e
reintroduce system.build_number as system.versionstr
hakril Jun 5, 2024
8f828a6
Remove breakpoint from test
hakril Jun 5, 2024
36b4bf3
Regen ctypes after rebase
hakril Jun 5, 2024
40f9420
More tests & unicode values
hakril Jun 10, 2024
bcb6327
Trying to fix github CI secondary rate limit errors
hakril Jun 10, 2024
9770165
Update readme
hakril Jun 10, 2024
92742a4
Fix samples for python3
hakril Jun 10, 2024
b1f0d74
Fix serviceManager handle closing + winproxy.SetThreadToken for py3
hakril Jun 10, 2024
bc13f7a
Add check_encoding_config.py sample
hakril Jun 10, 2024
59b3531
Update samples output
hakril Jun 10, 2024
8472fd1
docs/generate_samples.py now use py3
hakril Jun 10, 2024
95c3f81
update readme for official unicode + python3 full support
hakril Jun 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reintroduce system.build_number as system.versionstr
  • Loading branch information
hakril committed Jun 5, 2024
commit b003d9ee32b487651a264f679b1bbfef25341c66
26 changes: 26 additions & 0 deletions 26 windows/winobject/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,32 @@ def build_number(self):
key = windows.system.registry(r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion")
return int(key["CurrentBuildNumber"].value)

@utils.fixedproperty
def versionstr(self):
# Best effort. use get_file_version if registry code fails
try:
# Does not works on Win7..
# Missing CurrentMajorVersionNumber/CurrentMinorVersionNumber/UBR
# We have CurrentVersion instead
# Use this code and get_file_version as a backup ?
curver_key = windows.system.registry(r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion")
try:
major = curver_key["CurrentMajorVersionNumber"].value
minor = curver_key["CurrentMinorVersionNumber"].value
except WindowsError as e:
version = curver_key["CurrentVersion"].value
# May raise ValueError if no "."
major, minor = version.split(".")
build = curver_key["CurrentBuildNumber"].value
# Update Build Revision
try:
ubr = curver_key["UBR"].value
except WindowsError as e:
ubr = 0 # Not present on Win7
return "{0}.{1}.{2}.{3}".format(major, minor, build, ubr)
except (WindowsError, ValueError):
return self.get_file_version("ntdll")

@utils.fixedpropety
def kuser_shared_data(self):
# For now we only returns a "common-group" KUSER which only contains the
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.