Closed scaery closed 5 years ago
Could you provide the OS distribution name and do some debugging for me, pls?
In order not to ask you for the whole syslog file, just output the line where the regex crashes by wrapping this fragment in usbevents.py in try-except-else
block like this:
...
if 'disconnect' in line:
try:
port = re_port.search(line).group(1)
except AttributeError:
print(f'DEBUG: {line}')
else:
for i in range(len(all_events)-1, -1, -1):
if all_events[i]['port'] == port:
all_events[i]['disconn'] = date
break
...
Rerun the events history
command and show me this line, please.
Thank you for the quick response and for your time, this is what i got:
DEBUG: Aug 25 15:31:19 kali kernel: [ 4839.627427] dvb_usb_v2: 'TerraTec Cinergy T Stick RC (Rev. 3):1-2' successfully deinitialized and disconnected
Thanks for the feedback! Not sure why this syslog message was generated that way. I guess the usb port part is just missing, as for me it should look like this (port number is rnd):
Aug 25 15:31:19 kali kernel: [ 4839.627427] usb 1-5: dvb_usb_v2: 'TerraTec Cinergy T Stick RC (Rev. 3):1-2' successfully deinitialized and disconnected
Nevertheless, I've updated the tool with some extra try-except
wrapping for now. Will examine this case more precisely when I have time.
What issue is causing this?
A small change did the trick: remove ".group()1" Edit 409: port = re_port.search(line) #.group(1)