dieHard4.0?

  • Ich bin immernoch am üben mit AutoIt.
    Heute habe ich mal versucht einen Patcher zu basteln, was sehr gut funktioniert hat. Nun möchte ich mein Programm noch schützen, d.H. bevor das eigentliche GUI kommt, ein Fenster erscheint, dass nach einem Passwort fragt.

    Angehaucht von Matrix hab' ich erst versucht diese grünen Zahlen etc dort einzubauen, was auch funktioniert hat, mich aber optisch nicht sehr angesprochen hat. Nun habe ich im Film Stirb Langsam 4.0 gesehen, dass der fiktive "Matt Farrell" eine Software entwickelt hat, die Verschlüsselt. Juckt ja nicht, welche Funktion sie hat, ich hätte nur gerne das aussehen davon.

    Dort ist links ein 5 Zahlen breites Kästchen mit 7 Zahlen in der Höhe die sich ändern, also nicht wie bei matrix, dass sie runterfallen, sondern sie haben eine absolute position. Nun wollte ich fragen, wie ich das hinbekommen und rechts daneben ein inputfeld in dem ich dann mein Passwort eingeben kann.

  • Wären das dann nicht einfach 5*7=35 Labels mit einer sich ändernden Zahl? Das wäre dann ein einfaches 2D Array (X und Y) mit 1. Dimension bis 5 und 2ter bis 7. Dann kannst du einfach immer den Labels mit

    [autoit]

    GUICtrlSetData()

    [/autoit]

    Einen neuen Wert zuweisen den du aus Random() bekommst.
    Hab ich das richtig verstanden? Evtl ein Bild.

  • Also das nen Algo ;) habs vor 2 jahren schonmal nachgebaut gehabt....
    nicht 1zu1....war mir zu aufwendig aber dennoch......


    *kram*....

    da hamwirs....

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_icon=116990-matte-blue-and-white-square-icon-business-key7.ico
    #AutoIt3Wrapper_outfile=Unbreakable Algorythm.exe
    #AutoIt3Wrapper_UseUpx=n
    #AutoIt3Wrapper_Res_Comment=thx to Schrubbi & Lev
    #AutoIt3Wrapper_Res_Description=Unbreakable Algorythm
    #AutoIt3Wrapper_Res_LegalCopyright=Open Source
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #cs ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    AutoIt Version: 3.3.5.6 (beta)
    Author: Kev.K

    [/autoit] [autoit][/autoit] [autoit]

    Script Function:
    Template AutoIt script.

    [/autoit] [autoit][/autoit] [autoit]

    #ce -deBuggt-by-Techmix---------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    ; Script Start - Add your code below here

    [/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Misc.au3>
    Opt("GUIOnEventMode", 1)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Dim $timing1=320 ; Msec
    Dim $timing2=30 ; Sekunden
    Global $lbl[40], $read[8]
    Global $random, $pass, $inpt, $checkbtn
    Global $password, $GettingPass=0, $step=10, $stepCount=0, $stepCode = Random(0,29,1)

    [/autoit] [autoit][/autoit] [autoit]

    start()
    GUI()
    gen_Pass()
    AdlibRegister("start",$timing1)
    adlibregister("gen_Pass",$timing2 * 1000)

    [/autoit] [autoit][/autoit] [autoit]

    While 1 ; Loop
    Sleep(3) ; sonst ist die Prozzi Last zu hoch!
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func start()
    if $stepCount < $step then ; langsamer Wechsel alle '$step'
    $stepCount += 1
    Else
    $stepCount = 0
    $stepCode = Random(0,29,1)
    EndIf
    $i=0
    while $i <= 29 ; 'while-wend' ist immer etwas schneller als 'for-to-next'!
    if $i <> $stepCode then
    GUICtrlSetData($lbl[$i], chr(random1()) ) ; schneller Wechsel
    Else
    GUICtrlSetData($lbl[$stepCode], $read[$GettingPass] ) ; langsamer Wechsel
    EndIf
    $i+=1
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>start

    [/autoit] [autoit][/autoit] [autoit]

    Func GUI()
    $gui = GUICreate("Unbreakable Algorythm", 415, 280)
    GUISetOnEvent($GUI_EVENT_CLOSE, "exits")
    $lbl[0] = GUICtrlCreateLabel("", 20, 20, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[1] = GUICtrlCreateLabel("", 60, 20, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[2] = GUICtrlCreateLabel("", 100, 20, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[3] = GUICtrlCreateLabel("", 140, 20, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[4] = GUICtrlCreateLabel("", 180, 20, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[5] = GUICtrlCreateLabel("", 220, 20, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[6] = GUICtrlCreateLabel("", 260, 20, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[7] = GUICtrlCreateLabel("", 300, 20, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[8] = GUICtrlCreateLabel("", 340, 20, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[9] = GUICtrlCreateLabel("", 380, 20, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[10] = GUICtrlCreateLabel("", 20, 60, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[11] = GUICtrlCreateLabel("", 60, 60, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[12] = GUICtrlCreateLabel("", 100, 60, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[13] = GUICtrlCreateLabel("", 140, 60, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[14] = GUICtrlCreateLabel("", 180, 60, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[15] = GUICtrlCreateLabel("", 220, 60, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[16] = GUICtrlCreateLabel("", 260, 60, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[17] = GUICtrlCreateLabel("", 300, 60, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[18] = GUICtrlCreateLabel("", 340, 60, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[19] = GUICtrlCreateLabel("", 380, 60, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[20] = GUICtrlCreateLabel("", 20, 100, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[21] = GUICtrlCreateLabel("", 60, 100, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[22] = GUICtrlCreateLabel("", 100, 100, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[23] = GUICtrlCreateLabel("", 140, 100, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[24] = GUICtrlCreateLabel("", 180, 100, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[25] = GUICtrlCreateLabel("", 220, 100, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[26] = GUICtrlCreateLabel("", 260, 100, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[27] = GUICtrlCreateLabel("", 300, 100, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[28] = GUICtrlCreateLabel("", 340, 100, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $lbl[29] = GUICtrlCreateLabel("", 380, 100, 20, 20)
    GUICtrlSetFont(-1, 12)
    GUICtrlSetOnEvent(-1, "_add")
    $inpt = Guictrlcreateinput("",7,210,400,25)
    Guictrlsetstate(-1,$GUI_DISABLE)
    $checkbtn= Guictrlcreatebutton("Enter",160,250,100,25)
    Guictrlsetonevent($checkbtn,"check")
    Guictrlcreatelabel("Password will change every " & $timing2 & " Seconds",110,140,2000,25)
    Guictrlsetstate(-1,$GUI_DISABLE)
    $pass = Guictrlcreatelabel("",160,170,300,25)
    Guictrlsetfont(-1,15,"","","Sylfaen")
    GUISetState(@SW_SHOW) ; Zeigt das leere GUI-Fenster
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    func _add()
    if GUICTRLREAD($lbl[@GUI_CtrlId]-3) = $read[$GettingPass] then ; abfrage ob der geklickte Button auch im Passwort ist
    GUICtrlSetData($inpt, GUICTRLREAD($inpt) & GUICTRLREAD($lbl[@GUI_CtrlId]-3))
    dim $stepCount=0, $stepCode = Random(0,29,1) ; Daten-Reset
    $GettingPass+=1
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func gen_Pass()
    $read[0] = Chr(random1())
    $read[1] = Chr(random1())
    $read[2] = Chr(random1())
    $read[3] = Chr(random1())
    $read[4] = Chr(random1())
    $read[5] = Chr(random1())
    $read[6] = Chr(random1())
    $read[7] = Chr(random1())
    $password = $read[0] & $read[1] & $read[2] & $read[3] & $read[4] & $read[5] & $read[6] & $read[7] ; Passwort setzen
    dim $GettingPass=0, $stepCount=0, $stepCode = Random(0,29,1) ; Daten-Reset
    Guictrlsetdata($pass,$password)
    Guictrlsetdata($inpt,"")
    EndFunc ;==>start

    [/autoit] [autoit][/autoit] [autoit]

    func check()
    if $password = Guictrlread($inpt) Then
    Traytip("Unbreakable Algorythm","Password Check confirmed..continue..",2,1)
    ;start Program here
    Else
    Traytip("Unbreakable Algorythm","Password Check Error.." & @crlf & "resetting..",2,1)
    sleep(2000)
    Traytip("","",1)
    Guictrlsetdata($inpt,"")
    gen_Pass()
    ;or exit
    EndIf
    Endfunc

    [/autoit] [autoit][/autoit] [autoit]

    Func random1()
    $random=Random(48,83,1)
    If $random>57 Then $random +=39
    Return $random
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    func exits()
    exit
    Endfunc

    [/autoit] [autoit][/autoit] [autoit][/autoit]

  • Und wie könnte ich, wenn ich darf, davon nur die bewegenden Zahlen nehmen? :D