I recently found a set of scripts that lets your u3 flashdrive send an email if it is stolen.
It consists of a batch file that autoruns from the flashdrive and a .php that needs to be on a server.
The batch file:
rem Check if file with name '%COMPUTERNAME%' already exists
rem If so, skip
rem If not, create it and call home
if EXIST %COMPUTERNAME% goto end
echo. > %COMPUTERNAME%
start /min The adress of your php file?username:"%USERNAME%"__computername:"%COMPUTERNAME%"__domain:"%USERDOMAIN%"__dnsdomain:"%USERDNSDOMAIN%"__home:"%HOME%"
The php file:
$strTo = "youremail(at)address(dot)com";
$strSubject = "USB stick is calling home";
$strHeaders = "From: USB stick <youremail(at)address(dot)com>";
$strBodyText = "IP address: ".$_SERVER;
$strBodyText .= $_REQUEST;
mail($strTo, $strSubject, $strBodyText, $strHeaders);
<!-- This last line redirects to another site, hoping the 'user' doesn't notice anything -->
<meta http-equiv="refresh" content="0; url=http://www.google.com/">
From the website: http://www.ruwebit.net/article/197
I tried this but all I got in the email was:
IP address: ArrayArray
Is there a error in the script somewhere?
Is it possible to get send a custom variable from the batch file to the php script and use it in the email?