So I was writing a "program" and I was wondering how could one make a kill-switch for it? Like if I would like to suddenly, for some reason, remove it and everything associated with it.
My first idea was to make the program connect to a server and request, lets say a text file. If text file contains 0 then it does nothing, if it contains 1 then the program wipes itself without a trace. But that would be a major problem for more than 1 user, because then all of the programs would be removed.
Second idea was to make it filter by the IP. When a program is ran, it would connect to the server and put it's IP. Then I could issue a kill-command to some text file, it checks if the IP matches and acts accordingly. But that would also be a major problem with LAN networks where there are more than 1 computer.
I got an idea writing this - what if the program upon execution would generate a unique key, write it somewhere safe, like deep in a registry and then connect to the server and put the IP and the unique key. So when I would like to kill a specific program, I would just issue the unique key for it... but I guess it would be a problem with PC's without internet. Then maybe a timer...?
lolz, I probably answered my own question with the last idea
But I'd like to hear other thoughts anyway.