Hey,
hab gradn problem.
Ich versuche jeden key den ich generiert habe zu crypten und dann in nem array zu speichern sprich $key[0]
der 2te generierte dann $key[2] unsoweiter...
aber ich habs net so mit for schleifen, bzw damit kann man mich jagen ...
kann mir einer zeigen wie ich das am Besten mache?
also es solln unendlich arrays gemacht werden, so oft halt wie ich den button klicke um nen neuen key zu generieren.
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <Array.au3>
#include <String.au3>
FileDelete(@ScriptDir & "\sessionkeys.rg")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Local $key[21]
Local $rkey[21]
Global $lol
Global $xD
Global $value1
Global $value2
Global $value3
Global $value4
GUICreate("Crypt Key Generator", 350, 220)
$create = GUICtrlCreateButton("Create Key", 30, 20, 120, 25)
GUICtrlCreateLabel("Created Key:", 30, 130, 120, 25)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateLabel("Password for Cryption:", 200, 40, 200, 25)
GUICtrlSetState(-1, $GUI_DISABLE)
$generated = GUICtrlCreateInput("", 30, 160, 150, 25)
$pass = GUICtrlCreateInput("risZerG", 200, 60, 100, 25)
$save = GUICtrlCreateButton("Save Key to File", 30, 60, 120, 25)
GUICtrlCreateButton("Update Database", 30, 90, 120, 25)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
Switch $msg
Case $create
create()
Case $save
save()
EndSwitch
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
Func randome()
$lol = Random(0, 9, 4)
$xD = _StringBetween($lol, ".", "")
$value1 = StringTrimRight($xD[0], 10)
$value2 = StringTrimLeft($xD[0], 10)
$random2 = Random(0, 9)
$key = _StringBetween($random2, ".", "")
$value3 = StringTrimRight($key[0], 10)
$value4 = StringTrimLeft($key[0], 10)
EndFunc ;==>randome
Func create()
randome()
GUICtrlSetData($generated, $value1 & "-" & $value2 & "-" & $value3 & "-" & $value4)
EndFunc ;==>create
Func save()
$i = 0
For $i = 0 To UBound($key) + 1
$key = _StringEncrypt(1, $value1 & "-" & $value2 & "-" & $value3 & "-" & $value4, GUICtrlRead($pass), 5)
MsgBox(0, "", $key)
Next
EndFunc ;==>save
Gruß