Long story short, I got jumped by 3 thugs on the RER (Parisian ghetto-to-ghetto metro which goes through the capital), fought off 2/3 while the third went through my stuff and jacked my Toshiba netbook (on the right)
Now stuck on medical leave after injuring my weak-ass back during the ass-kick, which I did most of. :bragging rights here, then remembers netbook is still gone:
So I'm now working on a script to send a hypothetically stolen host's public IP to a remote location which is half-done.
I'm sure there's a way to make this portion of the script even shorter, better, safer, faster.Code:#!/bin/bash date=$(date +%d.%h.%Y-%H.%M.%S) myip=$(curl ifconfig.me) echo " - Retrieving remote file.. -" scp firstname.lastname@example.org:~/ipdb/db1 db1 echo " - Deleting remote file.. -" ssh email@example.com "rm ~/ipdb/db1" echo " - Displaying retrieved file contents.. -" cat db1 echo " - Appending new info.. -" echo "$date $myip" >> db1 echo " - Sending file.. -" scp db1 firstname.lastname@example.org:~/ipdb/db1
If you haven't caught it yet, this is obviously SUPER UNSAFE, as this script implies password/passphraseless ssh to the remote location is possible.
Then again, a thug would have to:
A. Know how to even use the host
B. Find this script to be aware of said vulnerability
in which case I'm almost 100% safe given a hypothetical thug's IQ I might come across on my occasional train commute.
Now I'm looking into how to listen to whether the host gets online, and consequently run the script automagically.
Comments always welcome.