tattooman Posted March 4, 2011 Share Posted March 4, 2011 I have a script and i want to know is it possible set like daily password for it with password generator? I have looked last 3 days all the forums but not similar request are there. Thank you TM Link to comment Share on other sites More sharing options...
JohnOne Posted March 4, 2011 Share Posted March 4, 2011 3 days eh? have you tried anything at all in those 3 days? Perhaps if you show what you have tried, then someone might better ubderstand what your needs are and help you because as it stands, I cannot fathom what you need. The more detail you give, the more likely you are to get a relevant hint. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
hannes08 Posted March 4, 2011 Share Posted March 4, 2011 Hey tattooman, you'll have to bould your own system around this if you don't want to use something like "password<month><date>" => "password0304". Is it right you want a function that produces the same results on different computers at a specific date? Then you'll have to write some code that pseudo-randomizes the date. So anything is possible it's just a matter of time / effort. Maybe you already have a piece of code you could show us? Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
tattooman Posted March 4, 2011 Author Share Posted March 4, 2011 yes it can be pseudo date all code is here its simple thing for cleardown data #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Comment=Clarity Cleardown utility #AutoIt3Wrapper_Res_Description=Cleardown util #AutoIt3Wrapper_Res_Fileversion=1.0.0.3 #AutoIt3Wrapper_Res_FileVersion_AutoIncrement=y #AutoIt3Wrapper_Res_LegalCopyright=TTAMM #AutoIt3Wrapper_Res_SaveSource=y #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <date.au3> #include <File.au3> #include <Array.au3> #include <Misc.au3> $sLogPath = "C:\epos\cleardown.log" #Region ### START Koda GUI section ### Form= $Form1_1 = GUICreate("Clarity ClearDown", 328, 580, 376, 122) $Button2 = GUICtrlCreateButton("Copy RAMDRIVE", 80, 72, 177, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xA6CAF0) $Button1 = GUICtrlCreateButton("Kill Epos processes", 80, 24, 177, 25, BitOR($BS_DEFPUSHBUTTON, $WS_GROUP)) GUICtrlSetFont(-1, 10, 800, 0, "Tahoma") GUICtrlSetBkColor(-1, 0xA6CAF0) $Button3 = GUICtrlCreateButton("Make CLEARDOWN", 80, 120, 177, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xA6CAF0) $Button4 = GUICtrlCreateButton("Start EPOS", 80, 264, 177, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xA6CAF0) GUICtrlSetCursor(-1, 2) $Button5 = GUICtrlCreateButton("Kill Order Print", 80, 168, 177, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xA6CAF0) $Button6 = GUICtrlCreateButton("Kill CCTV", 80, 320, 177, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xA6CAF0) $Button7 = GUICtrlCreateButton("Start Order Print", 80, 216, 177, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xA6CAF0) $Button8 = GUICtrlCreateButton("Start CCTV", 80, 360, 177, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xA6CAF0) $Button9 = GUICtrlCreateButton("Clear Temp Ramdrive Folders", 80, 400, 177, 25, BitOR($BS_DEFPUSHBUTTON, $WS_GROUP)) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xA6CAF0) $Button10 = GUICtrlCreateButton("Clear Temp Sessdata Folders", 80, 440, 177, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xA6CAF0) $Label1 = GUICtrlCreateLabel("Copyright @ TTAMM 2011", 84, 560, 161, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("Step1", 140, 0, 49, 25) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Label3 = GUICtrlCreateLabel("Step2", 140, 48, 49, 25) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Label4 = GUICtrlCreateLabel("Step3", 140, 96, 49, 25) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Label5 = GUICtrlCreateLabel("Step4", 140, 144, 49, 25) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Label6 = GUICtrlCreateLabel("Step5", 140, 192, 49, 25) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Label7 = GUICtrlCreateLabel("Step6", 140, 240, 49, 25) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Button11 = GUICtrlCreateButton("Kill Hotsoft Link", 81, 477, 177, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xA6CAF0) $Button12 = GUICtrlCreateButton("Start Hotsoftlink", 79, 518, 177, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xA6CAF0) $Label8 = GUICtrlCreateLabel("ExtraTools", 128, 296, 79, 20) GUICtrlSetFont(-1, 10, 800, 0, "Microsoft Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;processes $ProcessName = "runepos.exe" $ProcessName1 = "orderprinting.exe" $ProcessName2 = "TouchCCTV.exe" $ProcessName3 = "hotsoftlink.exe" ; kill epos processs While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $Button1 For $i = 1 To 5 If ProcessExists('runepos.exe') Then ProcessClose('runepos.exe') Sleep(1000) Else MsgBox(0, "Not Running", $ProcessName & " is stopped") ExitLoop EndIf Next For $i = 1 To 5 If ProcessExists('winrod.exe') Then ProcessClose('winrod.exe') Sleep(1000) Else ExitLoop EndIf Next For $i = 1 To 5 If ProcessExists('winmsg.exe') Then ProcessClose('winmsg.exe') Sleep(1000) Else ExitLoop EndIf Next For $i = 1 To 5 If ProcessExists('winprint.exe') Then ProcessClose('winprint.exe') Sleep(1000) Else ExitLoop EndIf Next _FileWriteLog($sLogPath, "Epos Stopped") ;backup ramdrive and sessdate Case $Button2 DirCopy(@WorkingDir & "\ramdrive", "C:\epos\ramdrv" & @YEAR & @MON & @MDAY & @HOUR & @MIN) DirCreate("C:\epos\sessdat" & @YEAR & @MON & @MDAY & @HOUR & @MIN) FileCopy("C:\epos\sessdata.dbf", "C:\epos\sessdat" & @YEAR & @MON & @MDAY & @HOUR & @MIN) MsgBox(0, "", "Backup done.") _FileWriteLog($sLogPath, "Backup Ramdrive and sessdata ") ;cleardown Case $Button3 FileDelete("C:\epos\*.ROD") FileDelete("C:\epos\*.WIN") FileDelete("C:\epos\ramdrive\*.*") MsgBox(0, "", "Cleardown done.") _FileWriteLog($sLogPath, "Cleardown EPOS files") ;startepos Case $Button4 Run("runepos.exe", @ScriptDir & "\") If @error = 1 Then MsgBox(0, "", "No EPOS Folder Found or no executable.") EndIf _FileWriteLog($sLogPath, "Epos Started") ;kill orderprinting Case $Button5 For $i = 1 To 5 If ProcessExists('orderprinting.exe') Then ProcessClose('orderprinting.exe') Sleep(1000) Else MsgBox(0, "Not Running", $ProcessName1 & " is stopped") ExitLoop EndIf Next _FileWriteLog($sLogPath, "Order Printing Stopped") ;kill cctv Case $Button6 For $i = 1 To 5 If ProcessExists('TouchCCTV.exe') Then ProcessClose('TouchCCTV.exe') Sleep(1000) Else MsgBox(0, "Not Running", $ProcessName2 & " is stopped.") ExitLoop EndIf Next _FileWriteLog($sLogPath, "CCTV Stopped") ;run orderprint Case $Button7 Run("orderprinting.exe", @ScriptDir & "\") If @error = 1 Then MsgBox(0, "", "No EPOS Folder Found or no order printing executable.") EndIf _FileWriteLog($sLogPath, "Order Printing Started") ;run cctv Case $Button8 If ProcessExists("touchcctv.exe") Then ProcessClose('TouchCCTV.exe') Sleep(1000) MsgBox(48, "Warning", "You can run only one instance Touch CCTV executable.") Else EndIf Run("TouchCCTV.exe", @ScriptDir & "\") If @error = 1 Then MsgBox(0, "", "No EPOS Folder Found or no Touch CCTV executable.") EndIf _FileWriteLog($sLogPath, "CCTV Started") ; cleartemp ramdrives Case $Button9 $FileList = _FileListToArray(@WorkingDir, "ramdrv2*", 2) If @error = 4 Then MsgBox(0, "", "No Temp folders to delete.") EndIf If IsArray($FileList) Then For $i = 1 To $FileList[0] $Path = @WorkingDir & "\" & $FileList[$i] DirRemove($Path, 1) Next MsgBox(0, "", "Temp ramdrv folders deleted.") EndIf _FileWriteLog($sLogPath, "Temp Ramdrives deleted") ;clear temp sessdata Case $Button10 $FileList = _FileListToArray(@WorkingDir, "sessdat2*", 2) If @error = 4 Then MsgBox(0, "", "No Temp folders to delete.") EndIf If IsArray($FileList) Then For $i = 1 To $FileList[0] $Path = @WorkingDir & "\" & $FileList[$i] DirRemove($Path, 1) Next MsgBox(0, "", "Temp sessdata folders deleted.") EndIf _FileWriteLog($sLogPath, "Temp Sessdata folders removed") Case $Button11 For $i = 1 To 5 If ProcessExists('hotsoftlink.exe') Then ProcessClose('hotsoftlink.exe') Sleep(1000) Else MsgBox(0, "Not Running", $ProcessName3 & " is stopped.") ExitLoop EndIf Next _FileWriteLog($sLogPath, "HotsoftLink Stopped") Case $Button12 If ProcessExists("hotsoftlink.exe") Then ProcessClose('hotsoftlink.exe') Sleep(1000) MsgBox(48, "Warning", "You can run only one instance hotsoftlink executable.") Else EndIf Run("hotsoftlink.exe", @ScriptDir & "\") If @error = 1 Then MsgBox(0, "", "No EPOS Folder Found or no hotsoftlink executable.") EndIf _FileWriteLog($sLogPath, "Hotsoftlink Started") EndSwitch WEnd Link to comment Share on other sites More sharing options...
Malkey Posted March 4, 2011 Share Posted March 4, 2011 Here is a little simple password routine. ;======================= Password Routine =============================== ; Insert into script after include file declaration/s. Local $aWeek[8] = [7, "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] Local $sPW = InputBox("Date: " & $aWeek[@WDAY] & ", " & @MDAY & "/" & @MON & "/" & @YEAR, _ "Enter today's password", "", "*", -1, 60) ; For this particular password, remember:- ; Add 1 to year, and add 2 to month, and add 3 to day, and ; also enter the the first 3 characters of tomorrow's day of the week (with first character uppercase). ; e.g. for Friday, 04/03/2011, the password is "201257Sat". If $sPW == (@YEAR + 1) & (@MON + 2) & (@MDAY + 3) & StringLeft($aWeek[Mod(@WDAY, 7) + 1], 3) Then MsgBox(0, "Results", "Correct Password", 2) Else MsgBox(0, "Results", "Incorrect Password", 2) Exit EndIf ;==================> End of Password Routine =============================== Link to comment Share on other sites More sharing options...
tattooman Posted March 5, 2011 Author Share Posted March 5, 2011 thanks malkey that is perfect other thing is is there a way build password generator for this function? Link to comment Share on other sites More sharing options...
Developers Jos Posted March 5, 2011 Developers Share Posted March 5, 2011 thanks malkeythat is perfect other thing is is there a way build password generator for this function? so you are looking for a random password to ensure you never can run your script anymore? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
tattooman Posted March 5, 2011 Author Share Posted March 5, 2011 no i need daily password to run it . So users cannot run it next day with the same password Link to comment Share on other sites More sharing options...
Developers Jos Posted March 5, 2011 Developers Share Posted March 5, 2011 (edited) ... and how do you see this working with something random? Edited March 5, 2011 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
tattooman Posted March 5, 2011 Author Share Posted March 5, 2011 same example what malkey gave ;======================= password Routine =============================== ; Insert into script after include file declaration/s. Local $aWeek[8] = [7, "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] Local $sPW = InputBox("Date: " & $aWeek[@WDAY] & ", " & @MDAY & "/" & @MON & "/" & @YEAR, _ "Enter today's password", "", "*", -1, 60) ; For this particular password, remember:- ; Add 1 to year, and add 2 to month, and add 3 to day, and ; also enter the the first 3 characters of tomorrow's day of the week (with first character uppercase). ; e.g. for Friday, 04/03/2011, the password is "201257Sat". If $sPW == (@YEAR + 1) & (@MON + 2) & (@MDAY + 3) & StringLeft($aWeek[Mod(@WDAY, 7) + 1], 3) Then MsgBox(0, "Results", "Correct password", 2) Else MsgBox(0, "Results", "Incorrect password", 2) Exit EndIf ;==================> End of password Routine =============================== i need build now generator for users to generate password Link to comment Share on other sites More sharing options...
Developers Jos Posted March 5, 2011 Developers Share Posted March 5, 2011 That isn't random but calculated logic, which makes it able for you to figure out what the password needs to be. This is with Random generated passwords seldom the case. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
tattooman Posted March 5, 2011 Author Share Posted March 5, 2011 thanks for everyone i managed get password protectio this script. Random is calculated from date is fine by me. Thanks all of you i can start script on monday Link to comment Share on other sites More sharing options...
Malkey Posted March 6, 2011 Share Posted March 6, 2011 My post #5 is like a lock. A lock that needs a specific key or password to open. Like a physical door key, the groves on the key are not randomly cut. The groves are specifically tailored for a particular lock. So, if the lock is changed each day, a key has to be specifically made each day for that lock - not randomly made. A random lock and/or a random key has a very, very low chance of successfully matching. Here is my idea of a "password generator" compatible with post #5 script. expandcollapse popup;========================= Password Generator ====================================== ; This key script is for lock script @ Post #5 here"- ; http://www.autoitscript.com/forum/topic/126141-is-it-possible-put-random-password-for-script/page__view__findpost__p__875774 ; Instructions:- ; 1. Compile or build this script. ; 2. Run the resultant .exe (executable) file. ; ; Description:- ; The executable file when opened, or when it is running, will wait for the password pop-up window to appear from Post #5. ; Then, a pop-up window will appear showing the password. Press "OK" button to exit. (If this "Display password routine" is ; not needed delete this routine and re-compile this script) ; Then, the executable key script will enter today's password, wait 1.5 secs, then press enter. ; Thus, the password is automatically entered. ; Local $aWeek[8] = [7, "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] ;Local $begin = TimerInit() ; Uncomment if a script running time limit is required. (In case no pop-up window appears) While 1 Sleep(50) Local $sTitle = "[TITLE:Date: " & $aWeek[@WDAY] & ", " & @MDAY & "/" & @MON & "/" & @YEAR & "; CLASS:#32770]" If WinExists($sTitle, "") Then Local $sPassWord = (@YEAR + 1) & (@MON + 2) & (@MDAY + 3) & StringLeft($aWeek[Mod(@WDAY, 7) + 1], 3) ;#cs ;======= Display password routine ====================== Local $aPos = WinGetPos($sTitle, "") Local $hWnd = GUICreate('', 245, 80, $aPos[0], $aPos[1] + $aPos[3] - 38) GUICtrlCreateLabel("Today's password is:", 10, 10, 100, 20) GUICtrlCreateInput($sPassWord, 130, 10, 100, 20) Local $OkBut = GUICtrlCreateButton("OK", 102, 40, 40, 30) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = -3 Or $msg = $OkBut or WinExists($sTitle, "") = 0 Then ExitLoop WEnd GUIDelete($hWnd) ;=======> End of Display password routine ================ ;#ce ; Send password and enter. ControlSend($sTitle, "", "Edit1", $sPassWord) Sleep(1500) ; This not really necessary. Only here to see password being entered. ControlSend($sTitle, "", "Edit1", "{ENTER}") ExitLoop EndIf ;If TimerDiff($begin) > 10000 Then ExitLoop ; Uncomment if a script running time limit is required. WEnd Link to comment Share on other sites More sharing options...
tattooman Posted March 7, 2011 Author Share Posted March 7, 2011 again you malkey saved me brain to explode this is perfect i must send u a beer for it Thanks for everyone who helped Regards TM 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