You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.1 KiB
30 lines
1.1 KiB
6 years ago
|
#!/usr/bin/env python3
|
||
6 years ago
|
from panda import Panda
|
||
|
from hexdump import hexdump
|
||
|
|
||
|
DEBUG = False
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
p = Panda()
|
||
|
|
||
|
len = p._handle.controlRead(Panda.REQUEST_IN, 0x06, 3 << 8 | 238, 0, 1)
|
||
6 years ago
|
print('Microsoft OS String Descriptor')
|
||
6 years ago
|
dat = p._handle.controlRead(Panda.REQUEST_IN, 0x06, 3 << 8 | 238, 0, len[0])
|
||
6 years ago
|
if DEBUG: print('LEN: {}'.format(hex(len[0])))
|
||
6 years ago
|
hexdump("".join(map(chr, dat)))
|
||
|
|
||
|
ms_vendor_code = dat[16]
|
||
6 years ago
|
if DEBUG: print('MS_VENDOR_CODE: {}'.format(hex(len[0])))
|
||
6 years ago
|
|
||
6 years ago
|
print('\nMicrosoft Compatible ID Feature Descriptor')
|
||
6 years ago
|
len = p._handle.controlRead(Panda.REQUEST_IN, ms_vendor_code, 0, 4, 1)
|
||
6 years ago
|
if DEBUG: print('LEN: {}'.format(hex(len[0])))
|
||
6 years ago
|
dat = p._handle.controlRead(Panda.REQUEST_IN, ms_vendor_code, 0, 4, len[0])
|
||
|
hexdump("".join(map(chr, dat)))
|
||
|
|
||
6 years ago
|
print('\nMicrosoft Extended Properties Feature Descriptor')
|
||
6 years ago
|
len = p._handle.controlRead(Panda.REQUEST_IN, ms_vendor_code, 0, 5, 1)
|
||
6 years ago
|
if DEBUG: print('LEN: {}'.format(hex(len[0])))
|
||
6 years ago
|
dat = p._handle.controlRead(Panda.REQUEST_IN, ms_vendor_code, 0, 5, len[0])
|
||
|
hexdump("".join(map(chr, dat)))
|