- Local time
- 5:49 PM
- Posts
- 3,037
- OS
- Windows 11 Pro
so in the following python script, we have:
The above numbers are corresponding to these REG_BINARY Keys (which obviously change ever time the toggle is flipped, but the mathematics work despite the changes as they are absolute)
and in bytes:
and that toggles to:
and in bytes:
SO.. given this template and seeing how it got the byte_array numbers, what are the correct numbers to plug in for the following keys?:
and in bytes:
and that toggles to:
and in bytes:
Code:
def process_data(byte_array):
process_is_on = False
ch = byte_array[18]
size = len(byte_array)
if ch == 0x15:
process_is_on = True
for i in range(10, 15):
ch = byte_array[i]
if ch != 0xff:
byte_array[i] += 1
break
byte_array[18] = 0x13
for i in range(24, 22, -1):
for j in range(i, size - 2):
byte_array[j] = byte_array[j + 1]
elif ch == 0x13:
process_is_on = False
for i in range(10, 15):
ch = byte_array[i]
if ch != 0xff:
byte_array[i] += 1
break
byte_array[18] = 0x15
n = 0
while n < 2:
for j in range(size - 1, 23, -1):
byte_array[j] = byte_array[j - 1]
n += 1
byte_array[23] = 0x10
byte_array[24] = 0x00
# extend array
ba = bytearray(1)
ba[0] = 0x00
byte_array.extend(ba)
byte_array.extend(ba)
return process_is_on
def write_data_to_registry(byte_array, process_state):
size = len(byte_array)
retval = False
try:
hKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, STATUS_PATH, 0, winreg.KEY_SET_VALUE)
winreg.SetValueEx(hKey, STATE_VALUE_NAME, 0, winreg.REG_BINARY, byte_array[:size])
winreg.CloseKey(hKey)
retval = True
except:
pass
return retval
The above numbers are corresponding to these REG_BINARY Keys (which obviously change ever time the toggle is flipped, but the mathematics work despite the changes as they are absolute)
Code:
"Data"=hex:43 42 01 00 0a 02 01 00 2a 06 ff ff e6 be 06 2a 2b 0e 13 43 42 01 00 d0 0a 02 c6 14 f7 a8 eb 97 db f6 e5 ed 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Code:
34 33 20 34 32 20 30 31 20 30 30 20 30 61 20 30 32 20 30 31 20 30 30 20 32 61 20 30 36 20 66 66 20 66 66 20 65 36 20 62 65 20 30 36 20 32 61 20 32 62 20 30 65 20 31 33 20 34 33 20 34 32 20 30 31 20 30 30 20 64 30 20 30 61 20 30 32 20 63 36 20 31 34 20 66 37 20 61 38 20 65 62 20 39 37 20 64 62 20 66 36 20 65 35 20 65 64 20 30 31 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30
and that toggles to:
Code:
"Data"=hex:43 42 01 00 0a 02 01 00 2a 06 ff ff e7 be 06 2a 2b 0e 15 43 42 01 00 10 00 d0 0a 02 c6 14 f7 a8 eb 97 db f6 e5 ed 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Code:
34 33 20 34 32 20 30 31 20 30 30 20 30 61 20 30 32 20 30 31 20 30 30 20 32 61 20 30 36 20 66 66 20 66 66 20 65 37 20 62 65 20 30 36 20 32 61 20 32 62 20 30 65 20 31 35 20 34 33 20 34 32 20 30 31 20 30 30 20 31 30 20 30 30 20 64 30 20 30 61 20 30 32 20 63 36 20 31 34 20 66 37 20 61 38 20 65 62 20 39 37 20 64 62 20 66 36 20 65 35 20 65 64 20 30 31 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30
SO.. given this template and seeing how it got the byte_array numbers, what are the correct numbers to plug in for the following keys?:
Code:
"Data"=hex:02,00,00,00,90,4c,66,1a,5f,9c,db,01,00,00,00,00,43,42,01,00,c2,0a,\
01,d2,14,28,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,51,\
00,75,00,69,00,65,00,74,00,48,00,6f,00,75,00,72,00,73,00,50,00,72,00,6f,00,\
66,00,69,00,6c,00,65,00,2e,00,55,00,6e,00,72,00,65,00,73,00,74,00,72,00,69,\
00,63,00,74,00,65,00,64,00,ca,28,00,00
Code:
30 32 20 30 30 20 30 30 20 30 30 20 39 30 20 34 63 20 36 36 20 31 61 20 35 66 20 39 63 20 64 62 20 30 31 20 30 30 20 30 30 20 30 30 20 30 30 20 34 33 20 34 32 20 30 31 20 30 30 20 63 32 20 30 61 20 20 30 31 20 64 32 20 31 34 20 32 38 20 34 64 20 30 30 20 36 39 20 30 30 20 36 33 20 30 30 20 37 32 20 30 30 20 36 66 20 30 30 20 37 33 20 30 30 20 36 66 20 30 30 20 36 36 20 30 30 20 37 34 20 30 30 20 32 65 20 30 30 20 35 31 20 0a 30 30 20 37 35 20 30 30 20 36 39 20 30 30 20 36 35 20 30 30 20 37 34 20 30 30 20 34 38 20 30 30 20 36 66 20 30 30 20 37 35 20 30 30 20 37 32 20 30 30 20 37 33 20 30 30 20 35 30 20 30 30 20 37 32 20 30 30 20 36 66 20 30 30 20 36 36 20 30 30 20 36 39 20 30 30 20 36 63 20 30 30 20 36 35 20 30 30 20 32 65 20 30 30 20 35 35 20 30 30 20 36 65 20 30 30 20 37 32 20 30 30 20 36 35 20 30 30 20 37 33 20 30 30 20 37 34 20 30 30 20 37 32 20 30 30 20 36 39 20 30 30 20 36 33 20 30 30 20 37 34 20 30 30 20 36 35 20 30 30 20 36 34 20 30 30 20 63 61 20 32 38 20 30 30 20 30 30
and that toggles to:
Code:
"Data"=hex:02,00,00,00,c1,ca,60,27,5f,9c,db,01,00,00,00,00,43,42,01,00,c2,0a,\
01,d2,14,28,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,51,\
00,75,00,69,00,65,00,74,00,48,00,6f,00,75,00,72,00,73,00,50,00,72,00,6f,00,\
66,00,69,00,6c,00,65,00,2e,00,50,00,72,00,69,00,6f,00,72,00,69,00,74,00,79,\
00,4f,00,6e,00,6c,00,79,00,ca,28,00,00
Code:
30 32 20 30 30 20 30 30 20 30 30 20 63 31 20 63 61 20 36 30 20 32 37 20 35 66 20 39 63 20 64 62 20 30 31 20 30 30 20 30 30 20 30 30 20 30 30 20 34 33 20 34 32 20 30 31 20 30 30 20 63 32 20 30 61 20 30 31 20 64 32 20 31 34 20 32 38 20 34 64 20 30 30 20 36 39 20 30 30 20 36 33 20 30 30 20 37 32 20 30 30 20 36 66 20 30 30 20 37 33 20 30 30 20 36 66 20 30 30 20 36 36 20 30 30 20 37 34 20 30 30 20 32 65 20 30 30 20 35 31 20 30 30 20 37 35 20 30 30 20 36 39 20 30 30 20 36 35 20 30 30 20 37 34 20 30 30 20 34 38 20 30 30 20 36 66 20 30 30 20 37 35 20 30 30 20 37 32 20 30 30 20 37 33 20 30 30 20 35 30 20 30 30 20 37 32 20 30 30 20 36 66 20 30 30 20 36 36 20 30 30 20 36 39 20 30 30 20 36 63 20 30 30 20 36 35 20 30 30 20 32 65 20 30 30 20 35 30 20 30 30 20 37 32 20 30 30 20 36 39 20 30 30 20 36 66 20 30 30 20 37 32 20 30 30 20 36 39 20 30 30 20 37 34 20 30 30 20 37 39 20 30 30 20 34 66 20 30 30 20 36 65 20 30 30 20 36 63 20 30 30 20 37 39 20 30 30 20 63 61 20 32 38 20 30 30 20 30 30 0a 0a
My Computer
System One
-
- OS
- Windows 11 Pro