If you are a Linux user and are not aware of such security threats, I very much encourage you to read that entry. If you have, you will likely remember I shared a simple script that would help in checking the content of those shortcut files that could potentially be so harmful. That script was obviously a disaster, a result of my lack of experience and command line skills... (But hey, I tried! ;-) )
I want to share a slight modification of that script, a more elegant way of doing the same thing, both for KDE and GNOME users. Here it goes:
1.- Start by creating a script file on a location of your choice. I recommend you do so at your home folder, so my example will base on that. You can use the text editor of your choice, from the GUI or CLI. I like using gedit.
2.- Now, enter the following code:
zenity --info --text "$(less ~/.local/share/applications/*.desktop | grep Exec)"
kdialog --title "Security Check" --passivepopup "$(less ~/.local/share/applications/*.desktop | grep Exec)"
3.- Save your script.
4.- In order to be able to trigger it from a shortcut, as I will be covering in this example, you need to modify your script privileges, so it can be executed. Since you are the owner of the script, it is pretty simple:
chmod 744 security_check
5.- You are all set now, just need to create a shortcut from which you can trigger this simple script. Here's how I did it:
And here's what you will see when the script runs:
Obviously, you could also automate the triggering of these scripts, perhaps when your session starts, perhaps as a scheduled task, etc. I will leave that at your discretion, but I do encourage you to run this little script every now an then to ensure none of those ".desktop" shortcuts is doing something nasty.