themax90 Posted August 24, 2006 Share Posted August 24, 2006 (edited) This is a public release of AutoIt-ITS v0.9.2's Database Editor. Now you can save important information in a way that cannot be accessed by the public. This would be perfect for Passwords, Secure Information, TCP Servers(Will be featured in AutoIt-ITS v0.9.2), and general protected storage.ScreenShot located here:http://img136.imageshack.us/img136/9003/dbeditwp6.pngORhttp://www.autoit-its.com/autoit-its/forum...wtopic.php?t=69The actual Database Editor w/ GUI:Supports a command line load as -load "FullPath" PasswordThe Command line load has protection against bad load strings, but make sure it follows this example:-load "C:\Sample.dbf" SampleWarning: This version is edited for content from the official release for AutoIt-ITS. Security points have been taken out.If you don't want the GUI, here is an include, with examples:Example - Include - Sample Database File - Usually the Database Editor will read the files as .dbf, so if you use the Sample Database File in the Graphic Editor it will tell you it is an illegal database file. Rename the extension to .dbf and you will be fine.To remove this feature, remove lines 247 - 249.Read.au3 Example#Include "Database.au3" $Database = "Sample.dbf" $Pass = "SamplePass" $aDatabase = DatabaseLoad($Database, $Pass) _ArrayAdd($aDatabase, "NewVariable = NewValue") _ArrayDisplay($aDatabase, $Database)Database.au3 IncludeCODE#Include-once#Include <Array.au3>#Include <File.au3>#Include <String.au3>Func DatabaseLoad($DatabaseFile, $Password) Dim $Array[1] Select Case Not $Password = _Encrypt(FileReadLine($DatabaseFile, 1), $Password, 2, 0) MsgBox(16, "Error", "Invalid database password.") Return -1 Case Else SplashTextOn("Loading...", "Loading your database...", 200, 30) $Lines = _FileCountLines($DatabaseFile) $Track = 1 For $Track = 1 To $Lines Step 1 Select Case $Track = 1 $Array[0] = "%password% = " & $Password Case Else $BuffLine = FileReadLine($DatabaseFile, $Track) $StringLength = StringLen($BuffLine) $EType = StringRight(StringLeft($BuffLine, 2), 1) $String = StringRight($BuffLine, ($StringLength - 3)) $String = _Encrypt($String, $Password, $EType, 0) _ArrayAdd($Array, $String) EndSelect Next Return $Array EndSelectEndFuncFunc DatabaseSave($DatabaseFile, $Password, $Array) SplashTextOn("Saving...", "Saving your database..", 200, 30) Local $Random = Random(0, 2, 1) Local $Track = 0 FileDelete($DatabaseFile) For $Track = 0 To (UBound($SpoolN) - 1) Step 1 Select Case $Track = 0 FileWriteLine($DatabaseFile, _Encrypt($Password, $Password)) Case $Array[$Track] <> "" FileWriteLine($DatabaseFile, "[" & $Random & "]" & _Encrypt($Array[$Track], $Password, $Random)) EndSelect Next SplashOff() Return 1EndFuncFunc _Encrypt($String, $Password, $Type = 2, $EncryptType = 1) Select Case $Type = 0 Return _StringEncrypt($EncryptType, $String, $Password) Case $Type = 1 If $EncryptType = 0 Then Return _HexToString (_StringEncrypt($EncryptType, $String, $Password)) Return _StringEncrypt($EncryptType, _StringToHex ($String), $Password) Case $Type = 2 If $EncryptType = 0 Then Return _Chr2Str(_HexToString (_StringEncrypt($EncryptType, $String, $Password))) Return _StringEncrypt($EncryptType, _StringToHex (_Str2Chr($String)), $Password) EndSelectEndFunc ;==>_EncryptFunc _Str2Chr(Const $String) Local $Array = StringSplit($String, "") Local $BuffStr = "" Local $Str = "" Local $Track = 1 For $Track = 1 To $Array[0] Step 1 $BuffStr = Asc($Array[$Track]) $Str = $Str & StringLen($BuffStr) & $BuffStr Next Return $StrEndFunc ;==>_Str2ChrFunc _Chr2Str(Const $String) Local $Start = 1 Local $Str = "" Local $StrLenGo While $Start <= StringLen($String) $StrLenGo = StringRight(StringLeft($String, $Start), 1) $Str = $Str & Chr(StringRight(StringLeft($String, $Start + $StrLenGo), $StrLenGo)) $Start = $Start + StringRight(StringLeft($String, $Start), 1) + 1 WEnd Return $StrEndFunc ;==>_Chr2StrSample.dbf Database FileSorry please download it, apparently IPB won't allow me to display brackets inside a code field.I hope you all like,AutoIt SmithEdit 1: This is similar to my Administrative Database located here:http://www.autoitscript.com/forum/index.ph...c=22371&hl=AdminDB is a hosted database system over a TCP Server and is rather outdated according to the new ITS Methods. Never the less a good thing for remote database hosting. The new v0.9.2 ITS Server will include this updated feature in a option with remote hosting. Edited August 24, 2006 by AutoIt Smith Link to comment Share on other sites More sharing options...
themax90 Posted August 24, 2006 Author Share Posted August 24, 2006 83 Views, 24 downloads, and no posts. Bump? Link to comment Share on other sites More sharing options...
layer Posted August 24, 2006 Share Posted August 24, 2006 hmm, i just saw it, and it looks very nice i'm going to have to try it out nice work FootbaG Link to comment Share on other sites More sharing options...
jvanegmond Posted November 27, 2006 Share Posted November 27, 2006 (edited) When I think about you, AutoItSmith, I immediately think about all the TCP scripts that you've made. Are you going to upgrade these databases, to some sort of SQL? Edited November 27, 2006 by Manadar github.com/jvanegmond 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