FX-BT-Scripts icon indicating copy to clipboard operation
FX-BT-Scripts copied to clipboard

Script to read accounts.ini binary data.

Open kenorb opened this issue 9 years ago • 2 comments

  1. Install MT4.
  2. Run and open folder from menu File -> Open Data Folder.
  3. Go to config/ folder, you should have accounts.ini file created.

It changes on configuration changes related to accounts (e.g. File -> Login to Trade Account) or when you create a demo account (File -> Open an Account). It remembers the account number and it's used to set the account leverage.

Could be similar encryption as used for DAT files, see: convert_dat.py.

xor each byte of data with that of key, cycling over key as needed

Examples: accounts-files.zip.

The file should be in plain text format.

Related: #62 Est. 8-16h


Details

  • Account Database

    The database of accounts (/Config/accounts.ini) of the terminal is bound to the user account in the operating system and to the computer hardware. If you try to authorize in the terminal under another account in the operating system or try to move the terminal data to another PC, whole base of accounts will be deleted as soon as the terminal is launched. In this connection, you must keep the accounts details (login and password) in a separate safe place.

  • Databases Security

    All databases of the terminal are encrypted and protected from using in other terminals. When transferring the terminal from one PC to another, there is no possibility of using the information accumulated in it (accounts, mailing, trade history). After the authorization with an account, the trade, mail and news databases are recovered, but account details can only be restored by appealing to the broker.

kenorb avatar May 11 '16 01:05 kenorb

Hi i try your script on your sample files that you have put

Examples: accounts-files.zip.

I have get this error:

$ ./convert_dat.py -i accounts1.ini -o out
Traceback (most recent call last):
  File "/mnt/My/Temp/00/accounts-files/./convert_dat.py", line 125, in <module>
    matches = re.search(r"([a-z0-9]+)\.dat", args.input_file).groups()
AttributeError: 'NoneType' object has no attribute 'groups'

So i changed the line 125 to .ini: matches = re.search(r"([a-z0-9]+)\.ini", args.input_file).groups()

But i still get error:

$ ./convert_dat.py -i accounts1.ini -o out
Traceback (most recent call last):
  File "/mnt/My/Temp/00/accounts-files/./convert_dat.py", line 127, in <module>
    raise Exception("Error with md5 from filename")
Exception: Error with md5 from filename

I there any way to extract accounts.ini from mt4?

rikhtehgaran avatar Jul 10 '23 09:07 rikhtehgaran

The thing is, I don't know the exact format of accounts.ini, could be similar or not, so changing few lines won't help much.

kenorb avatar Jul 10 '23 10:07 kenorb