Compare commits

...

5 Commits
1.1.1 ... main

Author SHA1 Message Date
Natalia Serrano 719cfff000 Merge pull request 'refs #2608: Fix: avoid crash in _clientip when ip output includes empty entries' (#105) from ticket-2608 into main
ogclient/pipeline/head This commit looks good Details
ogclient/pipeline/tag This commit looks good Details
Reviewed-on: #105
2025-08-08 10:12:38 +02:00
Natalia Serrano c6207a3dee refs #2608 add changelog 2025-08-08 10:11:08 +02:00
Nicolas Arenas d34d3b7a66 refs #2608: Fix: avoid crash in _clientip when ip output includes empty entries 2025-08-08 02:58:58 +02:00
Natalia Serrano 2c3d256d30 Merge pull request 'refs #2581 try several encodings on hivexregedit output' (#104) from hivexregedit-decode into main
ogclient/pipeline/head This commit looks good Details
ogclient/pipeline/tag This commit looks good Details
Reviewed-on: #104
2025-08-01 14:01:52 +02:00
Natalia Serrano 65c739eff6 refs #2581 try several encodings on hivexregedit output 2025-08-01 14:01:33 +02:00
3 changed files with 24 additions and 2 deletions

View File

@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.1.3] - 2025-08-08
### Fixed
- Fix parsing of the output of '/bin/ip -json'
## [1.1.2] - 2025-07-31
### Changed
- Try several encodings on hivexregedit output
## [1.1.1] - 2025-07-29
### Fixed

View File

@ -266,8 +266,16 @@ def ogListSoftware (disk, par):
if shutil.which ('hivexregedit'):
hive = RegistryLib.ogGetHivePath (mntdir, 'software')
if hive:
cmd1_out = subprocess.run (['hivexregedit', '--unsafe-printable-strings', '--export', hive, r'\Microsoft\Windows\CurrentVersion\Uninstall'], capture_output=True, text=True, encoding='utf-16le').stdout
cmd1_out += subprocess.run (['hivexregedit', '--unsafe-printable-strings', '--export', hive, r'\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall'], capture_output=True, text=True, encoding='utf-16le').stdout
cmd1_out_bytes = subprocess.run (['hivexregedit', '--unsafe-printable-strings', '--export', hive, r'\Microsoft\Windows\CurrentVersion\Uninstall'], capture_output=True).stdout
cmd1_out_bytes += subprocess.run (['hivexregedit', '--unsafe-printable-strings', '--export', hive, r'\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall'], capture_output=True).stdout
try:
cmd1_out = cmd1_out_bytes.decode ('utf-16le')
except:
try:
cmd1_out = cmd1_out_bytes.decode ('utf-8')
except:
cmd1_out = cmd1_out_bytes.decode ('latin1')
out = name = ''
for l in cmd1_out.splitlines():
words = l.split ('"')

View File

@ -241,6 +241,8 @@ def _clientip():
ipasj = json.loads (ipas)
addresses = []
for e in ipasj:
if not isinstance(e, dict): continue
if 'ifname' not in e: continue
if 'lo' == e['ifname']: continue
if 'addr_info' not in e: continue
addrs = e['addr_info']