Sign in to follow this  
Followers 0

Database Editor

4 posts in this topic

#1 ·  Posted (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:


The actual Database Editor w/ GUI:

Supports a command line load as -load "FullPath" Password

The Command line load has protection against bad load strings, but make sure it follows this example:

-load "C:\Sample.dbf" Sample

Warning: 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 Include


#Include <Array.au3>

#Include <File.au3>

#Include <String.au3>

Func DatabaseLoad($DatabaseFile, $Password)

Dim $Array[1]


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


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)



Return $Array



Func DatabaseSave($DatabaseFile, $Password, $Array)

SplashTextOn("Saving...", "Saving your database..", 200, 30)

Local $Random = Random(0, 2, 1)

Local $Track = 0


For $Track = 0 To (UBound($SpoolN) - 1) Step 1


Case $Track = 0

FileWriteLine($DatabaseFile, _Encrypt($Password, $Password))

Case $Array[$Track] <> ""

FileWriteLine($DatabaseFile, "[" & $Random & "]" & _Encrypt($Array[$Track], $Password, $Random))




Return 1


Func _Encrypt($String, $Password, $Type = 2, $EncryptType = 1)


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)


EndFunc ;==>_Encrypt

Func _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


Return $Str

EndFunc ;==>_Str2Chr

Func _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


Return $Str

EndFunc ;==>_Chr2Str

Sample.dbf Database File

Sorry please download it, apparently IPB won't allow me to display brackets inside a code field.

I hope you all like,

AutoIt Smith

Edit 1:

This is similar to my Administrative Database located here:

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 by AutoIt Smith

Share this post

Link to post
Share on other sites

83 Views, 24 downloads, and no posts.


Share this post

Link to post
Share on other sites

hmm, i just saw it, and it looks very nice :P i'm going to have to try it out

nice work


Share this post

Link to post
Share on other sites

#4 ·  Posted (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 by Manadar

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0