279009500 Posted June 11, 2008 Share Posted June 11, 2008 (edited) If Not FileExists(@SystemDir & "\myusb.ini") Then $drive = DriveGetDrive("REMOVABLE") If Not @error Then For $i = 1 To $drive[0] ;~ MsgBox(4096, "", $drive[$i]) $var = DriveGetSerial($drive[$i]) ;~ MsgBox(4096, "Serial Number: ", $var) IniWrite(@SystemDir & "\myusb.ini", "Serial", "Serial", $var) $ser = $var Next EndIf Else $ser = IniRead(@SystemDir & "\myusb.ini", "Serial", "Serial","") EndIfoÝ÷ Ù«¢+Ù%ÀÌØíÍÉ¥°ôÀÌØíÍÈQ¡¸ Edited June 11, 2008 by 279009500 Link to comment Share on other sites More sharing options...
realkiller Posted June 11, 2008 Author Share Posted June 11, 2008 it is more difficult to crack hardware token then software (ini file) Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Link to comment Share on other sites More sharing options...
7h331337 Posted June 11, 2008 Share Posted June 11, 2008 if you push ctrl + alt + del then you can just cancel the proses but you got to be quick Link to comment Share on other sites More sharing options...
realkiller Posted June 12, 2008 Author Share Posted June 12, 2008 if you push ctrl + alt + del then you can just cancel the proses but you got to be quicktry the new version i don;t think you can crack it:p Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Link to comment Share on other sites More sharing options...
bird42 Posted June 14, 2008 Share Posted June 14, 2008 (edited) Thanks for sharing, really useful. I made this : CODE #include <Misc.au3> #include <guiconstants.au3> #NoTrayIcon $gg=GUICreate("PC security by Fedex",320,350) GUICtrlCreateLabel("Select a removable drive",10,320,150,20) $l=GUICtrlCreateList("",10,10,100,300) $s=GUICtrlCreateList("",120,10,180,300) $b=GUICtrlCreateButton("Go",150,320,60,20) $r=GUICtrlCreateButton("Refresh",220,320,60,20) $var = DriveGetDrive( "REMOVABLE" ) For $i = 1 to $var[0]-1 $ser = DriveGetSerial($var[$i]) $lab = DriveGetLabel($var[$i]) GUICtrlSetData($l,$lab) GUICtrlSetData($s,$ser) Next GUISetState() while 1 $m=GUIGetMsg() Select case $m=$gui_event_close Exit case $m=$b $sersel=guictrlread($s) lockon() case $m=$r $var = DriveGetDrive( "REMOVABLE" ) For $i = 1 to $var[0]-1 $ser = DriveGetSerial($var[$i]) $lab = DriveGetLabel($var[$i]) GUICtrlSetData($l,$lab) GUICtrlSetData($s,$ser) next EndSelect WEnd func lockon() GUIDelete() MsgBox(0,"PC security","PC locked."&@CRLF&"Please unplug selected drive.") $gui=GUICreate("PC security",200,200,0,0) GUICtrlCreateLabel("LOCKED",50,50,100,20) GUISetState() while 1 Sleep(1000) BlockInput(1) check() WEnd EndFunc Func lockoff() GUIDelete() BlockInput(0) MsgBox(0,"PC security","UNLOCKED") Exit EndFunc func check() if ProcessExists("taskmgr.exe") Then ProcessClose("taskmgr.exe") $var = DriveGetDrive( "REMOVABLE" ) If NOT @error Then For $i = 1 to $var[0] $serial = DriveGetSerial($var[$i]) if $serial =$sersel Then lockoff() ;usb serial number next EndIf EndFunc p.s.: im a noob it may not work. Edited June 14, 2008 by zentral Link to comment Share on other sites More sharing options...
pollop Posted June 14, 2008 Share Posted June 14, 2008 I found a tip to crack it Remove all your "removable devices". The soft lock the computer by using this loop For $i = 1 To Number_of_device If $i = Number_of_device Then lock() Endif Next So if you have no device connected, the program do not go into the loop and do not lock the computer. Sry for my english xD I'm working on a better version with a GUI Link to comment Share on other sites More sharing options...
Danny35d Posted June 15, 2008 Share Posted June 15, 2008 anyone other ideas or weaknesses in my programm? btw thx all for replying:DThis is a great script thanks for sharing. These are the weaknesses I found: 1) HotKeySet(Esc) doesn't work. I can press Esc as many time I want and the script won't stop or quit. 2) If I add a second USB stick your script will stay in a loop of locking and unlocking the computer very fast. The only way out is by pressing and holding the computer on/off switch. 3) My computer floppy drive it driving me crazy. Every time your script check for serial number I can hear the floppy drive constantly running. 4) Your code need a little bit of clean up. There are some lines of code that are not needed. Like aan() and uit() functions are not needed they are not been use anywhere in your script. To fix item 2 in function securityuit() add ExitLoop. If $serial = 2556945413 Then HotKeySet("{ESC}", "uit") BlockInput(0) ElseIf $serial = 2556945413 Then HotKeySet("{ESC}", "uit") BlockInput(0) ExitLoop Else To fix item 3 add If $var[$i] = 'a:' Or $var[$i] = 'b:' Then ContinueLoop in both of the For Next functions For $i = 1 To $var[0] $serial = DriveGetSerial($var[$i]) If $serial = 2556945413 ThenFor $i = 1 To $var[0] If $var[$i] = 'a:' Or $var[$i] = 'b:' Then ContinueLoop ; Added this line to skipt floppy drive. $serial = DriveGetSerial($var[$i]) If $serial = 2556945413 Then Thanks to your code I came out with this other flavor. You need to run the script from the usb stick. The first thing the script does is to copy himself from the usb stick to @TempDir, read the usb serial number and then rerun the script from @TempDir with the usb serial number. When exit the script self delete from the @TempDir, also because I couldn't get HotKeySet working I enable traymenu and added About and Exit choices. Thanks again for sharing and the usb lock idea.... AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
realkiller Posted June 17, 2008 Author Share Posted June 17, 2008 thx for this script:D it works great:) mine whas more a prove of concept:) you can add more stuff 2 it if you like it:) Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Link to comment Share on other sites More sharing options...
GtaSpider Posted June 17, 2008 Share Posted June 17, 2008 Well, nice. But WARNING: If you use DriveGetDrive( "REMOVABLE" ) too often in a While (sleep(1)) then its possible to destroy a USB Stick.I made the script that u made a cuple of months ago with sleep(50) and after 5 days one of my USB sticks wich was allways connected was destroyed Mfg / Best regards spider www.AutoIt.de - Moderator of the German AutoIt Forum Link to comment Share on other sites More sharing options...
longtex Posted June 17, 2008 Share Posted June 17, 2008 Well, nice. But WARNING: If you use DriveGetDrive( "REMOVABLE" ) too often in a While (sleep(1)) then its possible to destroy a USB Stick.I made the script that u made a cuple of months ago with sleep(50) and after 5 days one of my USB sticks wich was allways connected was destroyed Mfg / Best regards spider??? How did that happen? Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too? Link to comment Share on other sites More sharing options...
GtaSpider Posted June 17, 2008 Share Posted June 17, 2008 Hi While 1 $aDgD = DriveGetDrive("REMOVABLE") ;..... Sleep(50) WEnd Afer 5 days one of my usb sticks wont work (this usb stick was allways connected) Not founded in windows, not founded in linux and not founded in BIOS or other PCs Spider www.AutoIt.de - Moderator of the German AutoIt Forum Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted June 18, 2008 Share Posted June 18, 2008 (edited) hmmm .. just press control - alt - delete and enter computer is locked no just kiddin.. i like this idea maybe you should write this for an u3 device U3 uses Enviroment settings for example $U3IDA = EnvGet("U3_IS_DEVICE_AVAILABLE") returns true or false this will reduce the writting to the disk Edited June 18, 2008 by Emiel Wieldraaijer Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
tkware Posted June 23, 2008 Share Posted June 23, 2008 Good day, I tried the code, and it does work. I did find that when I use the code my floppy disk drive turns on and stays on until I stop the program. I tried the program on two different computers with the same results. Any ideas? TIA Link to comment Share on other sites More sharing options...
Danny35d Posted June 23, 2008 Share Posted June 23, 2008 Good day,I tried the code, and it does work. I did find that when I use the code my floppy disk drive turns on and stays on until I stop the program. I tried the program on two different computers with the same results.Any ideas?TIAHi tkware welcome to autoit. Take a look to this post LINK AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Gillboss Posted June 23, 2008 Share Posted June 23, 2008 cool! thanks for sharing and i have idea for you, you said: " if you go away for a few sec and you don't want people to view your files " do Minimize to all windows. Good Luck Link to comment Share on other sites More sharing options...
Gillboss Posted June 24, 2008 Share Posted June 24, 2008 hi... perfer to change this..: expandcollapse popup#NoTrayIcon #include <GuiConstants.au3> #include <Misc.au3> #include <WindowsConstants.au3> securityuit() func securityuit() While 1 $var = DriveGetDrive( "REMOVABLE" ) If NOT @error Then For $i = 1 to $var[0] $serial = DriveGetSerial($var[$i]) if $serial = 946103347 Then HotKeySet("{ESC}", "uit") blockinput(0) Else if $i = $var[0] Then HotKeySet("{ESC}") securityaan() EndIf Endif sleep(1) Next EndIf WEnd endfunc func securityaan() Dim $GUI, $coords[4], $msg $GUI = GUICreate("PC Security = ON", 100, 100,0,0,"",$WS_EX_TOPMOST) GUICtrlCreateLabel("PC Security = ON",5,5) GUISetState(@SW_SHOW) while 1 Sleep(1) WinMove("PC Security = ON", "", 0, 0, 100, 100) MouseMove(0,0,0) $coords = WinGetPos($GUI) _MouseTrap($coords[0]+40, $coords[1]+40, $coords[0]-40 + $coords[2], $coords[1] + $coords[3]-40) BlockInput(1) if ProcessExists("taskmgr.exe") Then ProcessClose("taskmgr.exe") EndIf $var = DriveGetDrive( "REMOVABLE" ) If NOT @error Then For $i = 1 to $var[0] $serial = DriveGetSerial($var[$i]) if $serial = 946103347 Then GUISetState(@SW_HIDE) securityuit() EndIf next endif $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Case Else ;;; EndSelect WEnd EndFunc func aan() MsgBox(0,"Pc Security","Pc Security = On",1) EndFunc func uit() MsgBox(0,"Pc Security","Pc Security = OFF",1) Exit EndFunc Link to comment Share on other sites More sharing options...
realkiller Posted June 24, 2008 Author Share Posted June 24, 2008 i adjusted my version see start no floppy check, at the start of the sourcecode is the serial usb number, increases usb lifetime Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Link to comment Share on other sites More sharing options...
timistar Posted June 25, 2008 Share Posted June 25, 2008 While 1 $aDgD = DriveGetDrive("REMOVABLE") ;..... Sleep(50) WEnd wow men , remember in the sleep comand 1000 = 1 second that was the reaseon why your pen dirve damaged , uf you put less of 1000 that is near the speed light and the chip burn Link to comment Share on other sites More sharing options...
realkiller Posted June 25, 2008 Author Share Posted June 25, 2008 your usb stick can handle 1 mil or more read or writes after that it is broken Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now