Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- #include <String.au3>
- DirCreate ("C:\System")
- If FileExists("C:\System\Daten.ini") = 0 Then
- $pw = InputBox("Passworteingabe", "Bitte einmalig dein Passwort eingeben.","","x")
- $pw1 = _StringEncrypt(1, $pw, "lolator")
- IniWrite("C:\System\Daten.ini", "Sektion9", "pw", $pw1)
- EndIf
- Do
- $in = InputBox("Passwort", "Bitte Passwort eingeben","","x")
- $pw2 = IniRead("C:\System\Daten.ini", "Sektion9", "pw", "")
- $pw3 = _StringEncrypt(0, $pw2, "lolator")
- If $in = $pw3 Then
- #Region ### START Koda GUI section ### Form=
- $Form1 = GUICreate("Textspeicher", 490, 436, 192, 124)
- $Checkbox1 = GUICtrlCreateCheckbox("Sektion 2", 108, 8, 97, 17)
- $Checkbox2 = GUICtrlCreateCheckbox("Sektion 1", 8, 8, 97, 17)
- $Button1 = GUICtrlCreateButton("Einlesen", 8, 368, 227, 25, $WS_GROUP)
- $Button2 = GUICtrlCreateButton("Auslesen", 248, 368, 227, 25, $WS_GROUP)
- $Eingabefeld = GUICtrlCreateEdit("", 8, 32, 465, 321)
- GUICtrlSetData(-1, "Hier Daten eingeben! Bitte vorher eine Sektion auswählen, die benutzt werden soll.")
- $Checkbox3 = GUICtrlCreateCheckbox("Sektion 3", 208, 8, 97, 17)
- $Checkbox4 = GUICtrlCreateCheckbox("Sektion 4", 308, 8, 97, 17)
- $Checkbox5 = GUICtrlCreateCheckbox("Sektion 5", 408, 8, 97, 17)
- $Button3 = GUICtrlCreateButton("Reset", 8, 400, 227, 25, $WS_GROUP)
- $Button4 = GUICtrlCreateButton("Neues Passwort", 248, 400, 227, 25, $WS_GROUP)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Checkbox1
- $sektion = ("1")
- Case $Checkbox2
- $sektion = ("2")
- Case $Checkbox3
- $sektion = ("3")
- Case $Checkbox4
- $sektion = ("4")
- Case $Checkbox5
- $sektion = ("5")
- Case $Button1
- $text = _StringEncrypt(1, GUICtrlRead($Eingabefeld), "galile463")
- IniWrite("C:\System\Daten.ini", "Sektion1", $sektion, $text)
- Case $Button2
- $data = IniRead("C:\System\Daten.ini", "Sektion1", $sektion, "")
- $rdata = _StringEncrypt(0, $data, "galile463")
- GUICtrlSetData($Eingabefeld, $rdata)
- Case $Button3
- FileDelete("C:\System\Daten.ini")
- Case $Button4
- Do
- $in = InputBox("Passwort", "Bitte altes Passwort eingeben.","","x")
- If $in = $pw3 Then
- $pw = InputBox("Passworteingabe", "Bitte neues Passwort eingeben.","","x")
- $pw1 = _StringEncrypt(1, $pw, "lolator")
- IniWrite("C:\System\Daten.ini", "Sektion9", "pw", $pw1)
- Else
- MsgBox(0, "Achtung", "Passwort ist falsch!")
- EndIf
- Until $in = $pw3
- MsgBox (0,"Passwort","Passwort erfolgreich geändert.")
- EndSwitch
- WEnd
- Else
- MsgBox(0, "Achtung", "Passwort ist falsch!")
- EndIf
- Until $in = $pw3
- Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement