Jump to content

Configuration file's


 Share

Recommended Posts

heya,

How does one make a configuration file?

What parameter's must it include?

How do u make u program search for those paramenter's?

cheers C.W

C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Link to comment
Share on other sites

I usually use an INI file for the task. You can name the INI anything you like if you want to make it a bit harder to have someone read it. Just remember any INI can be read in notepad. Take a look at the following commands for guidance:

IniRead

IniWrite

IniReadSection

IniWriteSection

Link to comment
Share on other sites

thnx so in my code i would jsut use a converter to change the password to a md5 hash or something ?

C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Link to comment
Share on other sites

You could use _StringEncrypt. Also you could choose to store this data in the registry so you always know where it is, even when the user moves the application.

Something like this:

#include<String.au3>
$Password = "p@ssw0rd"
$PrivatePass = "mykey123"

RegWrite("HKLM\SOFTWARE\MyApp")
RegWrite("HKLM\SOFTWARE\MyApp\Data")
RegWrite( "HKLM\SOFTWARE\MyApp\Data", "Password", "REG_SZ", _StringEncrypt( 1, $Password, $PrivatePass ) )

$getpass = RegRead( "HKLM\SOFTWARE\MyApp\Data", "Password" )
MsgBox(0, "TEST READ PASS", _StringEncrypt( 0, $getpass, $PrivatePass ))

Keep in mind that having a private key in your autoit script like this is not secure, but I do not believe that it is possible to fully secure an au3 script in any manner, you can just make it more difficult.

Edited by danwilli
Link to comment
Share on other sites

how do i use your code?

C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...