Go Back   Gaming Gutter > Non-Gaming > Programming > Source Code


Source Code - Have a source code/project files you want to post? Do so here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post On a serious note
Today 07:28 PM
by Bex
Last post by Bex
Today 07:29 PM
1 Replies, 2 Views
Go to first new post Froze-owned
11-03-2008 08:32 PM
by Reemer
Last post by checkone
Today 07:27 PM
15 Replies, 314 Views
Go to first new post Heather wants to kill a...
Today 06:49 PM
Last post by .BloodyNightmare
Today 07:26 PM
12 Replies, 47 Views
Go to first new post The ctrl v button game!
04-07-2007 02:50 PM
Last post by Axed
Today 07:26 PM
764 Replies, 6,540 Views
Go to first new post forgot my birthday i put...
10-30-2008 09:27 AM
by dookie
Last post by checkone
Today 07:25 PM
22 Replies, 463 Views
Reply
 
LinkBack Thread Tools Display Modes

 Key Gen ( For your own AU3 programs)
Old 07-27-2008, 05:47 PM   #1 (permalink)
Cogito, ergo sum.

Male Check is online now
 
Join Date: Feb 2008
Posts: 1,821
GPoints: 1,004
iTrader: 7 / 100%
Check Is a Lord of AwesomenessCheck Is a Lord of AwesomenessCheck Is a Lord of AwesomenessCheck Is a Lord of Awesomeness
Rep Power: 9
Key Gen ( For your own AU3 programs)

Code:
#include <String.au3>
#include <GUIConstants.au3>
Global $Key , $Strength , $CryptKey
GUICreate("Key Gen...", 200, 75)
$Name = GUICtrlCreateInput("Name", 0, 0, 200, 20)
$Email = GUICtrlCreateInput("Email@hotmail.com", 0, 25, 200, 20)
$Gen = GUICtrlCreateButton("Gen Key", 0, 50, 75, 25, 0)
$Rev = GUICtrlCreateButton("Reverse Key", 80 , 50, 75, 25, 0)
GUISetState(@SW_SHOW)

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Gen
            If GUICtrlRead($Name) = "" Or GUICtrlRead($Email) = "" Then
                MsgBox(0 , "Error." , "your name and email are required.")
            ElseIf StringIsDigit(GUICtrlRead($Name)) Then
                MsgBox(0 , "Error." , "no numbers allowed in your name.")
            ElseIf Not StringInStr(GUICtrlRead($Email) , "@" , 1) Then
                MsgBox(0 , "Error." , "your email is incorrect it should look something like this" & @CRLF & "" & @CRLF & "test@hotmail.com")
            Else
                GUICtrlSetState($Name , $GUI_DISABLE)
                GUICtrlSetState($Email , $GUI_DISABLE)
                GUICtrlSetState($Gen , $GUI_DISABLE)
                GUICtrlSetData($Name ,StringLower(GUICtrlRead($Name)))
                GUICtrlSetData($Email ,StringLower(GUICtrlRead($Email)))
                _Gen(GUICtrlRead($Name) , GUICtrlRead($Email))
                GUICtrlSetState($Name , $GUI_ENABLE)
                GUICtrlSetState($Email , $GUI_ENABLE)
                GUICtrlSetState($Gen , $GUI_ENABLE)
                MsgBox(0 , "" , "This is your key" & @CRLF & @CRLF & $CryptKey)
            EndIf
        ;Case $Rev
        ;   If GUICtrlRead($Name) = "" Or GUICtrlRead($Email) = "" Then
        ;      MsgBox(0 , "Error." , "your name and email are required.")
        ;   ElseIf StringIsDigit(GUICtrlRead($Name)) Then
        ;      MsgBox(0 , "Error." , "no numbers allowed in your name.")
        ;   ElseIf Not StringInStr(GUICtrlRead($Email) , "@hotmail.com" , 1) Then
        ;      MsgBox(0 , "Error." , "your email is incorrect it should look something like this" & @CRLF & "" & @CRLF & "test@hotmail.com")
        ;   Else
        ;      GUICtrlSetState($Name , $GUI_ENABLE)
        ;      GUICtrlSetState($Email , $GUI_ENABLE)
        ;      GUICtrlSetState($Gen , $GUI_ENABLE)
        ;      GUICtrlSetData($Name ,StringLower(GUICtrlRead($Name)))
        ;      GUICtrlSetData($Email ,StringLower(GUICtrlRead($Email)))
        ;      _Rev(GUICtrlRead($Name) , GUICtrlRead($Email))
        ;      GUICtrlSetState($Name , $GUI_ENABLE)
        ;      GUICtrlSetState($Email , $GUI_ENABLE)
        ;      GUICtrlSetState($Gen , $GUI_ENABLE)
        ;      MsgBox(0 , "" , "This is your key" & @CRLF & @CRLF & $CryptKey)
        ;      EndIf
    EndSwitch
WEnd

Func _Gen($Key , $Strength)
    $Reverse = _StringReverse($Key)
    $Hex = _StringToHex($Reverse)
    $Bin = StringToBinary($Hex)
    $CryptKey = _StringEncrypt(1 , $Bin , $Strength , 1)
    Return $CryptKey
EndFunc

;Func _Rev($Key , $Strength)
;;;
;;;;
;EndFunc
In case you decide to make it so you need a code to access your programs.
This is for AUTOIT only.
__________________

Neutral Evil

  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 07:30 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.09251308 seconds (100.00% PHP - 0% MySQL) with 19 queries