Killer is useless on a system that isn't encrypted. So, this should be checked.
import subprocess
physical_volumes = subprocess.check_output(['pvs', '-o', 'pv_name']).decode().split('\n')[1:-1]
for physical_volume in physical_volumes:
physical_volume = physical_volume.strip()
cryptsetup_status = subprocess.check_output(['cryptsetup', 'status', physical_volume]).decode().split('\n')
_, type = cryptsetup_status[1].split()
if type == 'LUKS2':
print(f'{physical_volume} is encrypted with LUKS!')
the above is a great first step. Will need to do verification/checks on external drives that are encrypted, though.
Looks like it works just fine on an external drive connected via USB, as the external doesn't show up.
But am unsure ( and can't test ) on two or more internal drives that are encrypted.
The above is great for LUKS, but VeraCrypt needs checked too. maybe VeraCrypt needs checked? I can't imagine the amount of people on Linux that opt to not use LUKS and instead use VeraCrypt is incredibly high.
Killer is useless on a system that isn't encrypted. So, this should be checked.
the above is a great first step.
Will need to do verification/checks on external drives that are encrypted, though.Looks like it works just fine on an external drive connected via USB, as the external doesn't show up. But am unsure ( and can't test ) on two or more internal drives that are encrypted.