Update UsbKeyboardExtract.py

update bluetooth
This commit is contained in:
FW_Mumuzi 2023-10-18 17:33:28 +08:00 committed by GitHub
parent 8c61a882a1
commit db70564a39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ shiftKeys = {"04":"A", "05":"B", "06":"C", "07":"D", "08":"E", "09":"F", "0a":"G
def extract_data(types,filename): def extract_data(types,filename):
presses = [] presses = []
type_dicts = {"capdata": "usb.capdata", "usbhid": "usbhid.data"} type_dicts = {"capdata": "usb.capdata", "usbhid": "usbhid.data","bluetooth":"btatt.value"}
mytype = type_dicts[types] mytype = type_dicts[types]
os.system(f'tshark.exe -r "{filename}" -T fields -e {mytype} > usb.dat') os.system(f'tshark.exe -r "{filename}" -T fields -e {mytype} > usb.dat')
@ -71,4 +71,4 @@ def process_data(res):
datas = ''.join(datas) datas = ''.join(datas)
delete_data = ''.join(delete_data) delete_data = ''.join(delete_data)
return datas,delete_data return datas,delete_data