timgabets / electron-atm

A simple free open-source NDC ATM emulator, written on JavaScript, jQuery and Electron framework.
GNU Lesser General Public License v2.1
95 stars 58 forks source link

May i know how to reset the setup? #8

Closed roimekoi closed 6 years ago

roimekoi commented 6 years ago

May i know how to reset the setup? when i setup the atm host setting, i key in the wrong terminal pin key and terminal master key length, when i try to restart the electron-atm simulator i will hit the javascript error I try to delete the application folder, try to search through regedit and clear browser cache(cookie/ cache) etc but still hit with the same problem.

Thanks in advance

buffer.js:768 Uncaught TypeError: Invalid hex string at Buffer.write (buffer.js:768:21) at fromString (buffer.js:212:18) at Function.Buffer.from (buffer.js:104:12) at new Buffer (buffer.js:85:17) at Object.toBuffer (C:\project\ndcsimulator\electron-atm\node_modules\node-cardcrypto\lib\util.js:46:16) at Object.des_ecb_encrypt [as ecb_encrypt] (C:\project\ndcsimulator\electron-atm\node_modules\node-cardcrypto\lib\des.js:27:14) at CryptoService.getKeyCheckValue (C:/project/ndcsimulator/electron-atm/src/services/crypto.js:47:20) at CryptoService.getTerminalKey (C:/project/ndcsimulator/electron-atm/src/services/crypto.js:59:41) at CryptoService.getKey (C:/project/ndcsimulator/electron-atm/src/services/crypto.js:78:19) at file:///C:/project/ndcsimulator/electron-atm/src/listeners/window.js:196:17

timgabets commented 6 years ago

The electron-settings node module is used to store the app configuration. According to this FAQ, the config is stored somewhere in %APPDATA%/electron-atm. Please, check master_key and pin_key entries in settings file there.

Also, may I ask you to let me know what where the key values, so I could fix the bug? Many thanks.

roimekoi commented 6 years ago

Hi, Sorry i am not able to retrieve the data anymore, I think when i try to clear the setup, i executed this function settings.deleteAll() in the console which cause the settings file to have empty {} . I remember i key in something like this 1234 123421341234123412341234123 an empty space that does not print the keycheck value but i still manage to press continue button,

timgabets commented 6 years ago

Fixed in 6afb8ca236089380889b4817c32fd835a158d98a - the key input fields are now checked to be [^a-fA-F0-9].

Please update the app to v1.4.2

timgabets commented 6 years ago

https://github.com/timgabets/electron-atm/releases