tps-parse icon indicating copy to clipboard operation
tps-parse copied to clipboard

Password not valid or other error

Open vinnygambiny opened this issue 1 year ago • 6 comments

Hi, I have the encrypted error. I have set the password, but not sure that is the good password. Not all file are encrypted.

java -jar tps-to-csv.jar -s ./240529data -t ./240529data_csv -e -password "_&$#"

Encrypted file, using set password.
Exception in thread "main" nl.cad.tpsparse.tps.NotATopSpeedFileException: File doesn't start with 0x00000000 - its not a TopSpeed file or it may be 'encrypted'.
	at nl.cad.tpsparse.tps.TpsHeader.<init>(TpsHeader.java:50)
	at nl.cad.tpsparse.tps.TpsFile.getHeader(TpsFile.java:191)
	at nl.cad.tpsparse.tps.TpsFile.<init>(TpsFile.java:155)
	at nl.cad.tpsparse.tps.TpsFile.<init>(TpsFile.java:116)
	at nl.cad.tpsparse.Main.openFile(Main.java:298)
	at nl.cad.tpsparse.Main.parseFile(Main.java:166)
	at nl.cad.tpsparse.Main.main(Main.java:132)

vinnygambiny avatar Jun 11 '24 20:06 vinnygambiny

I can confirm, it's the good password. I have try with -password "_&$#" and -password _\&$# and it's don't work. I can't change the password... They have a way to use this password ?

vinnygambiny avatar Jun 12 '24 01:06 vinnygambiny

For a TPS file to be valid in this software the first 4 bytes need to be zero (it is the absolute position in the file; the start, so 0). If the value is different, it can mean the following:

  • the file is encrypted, you provided no password
  • the file is encrypted, you provided a password, but it didn't decrypt the start to 0s, so the password is incorrect.
  • the file is not a TPS file.

Some suggestions:

  • How do you know the password is correct?
  • It looks like you're converting a folder; did you try the files one by one?

ctrl-alt-dev avatar Jun 12 '24 05:06 ctrl-alt-dev

Yes I have run on folder, then on one file. The password work for the software that use the DB.

vinnygambiny avatar Jun 12 '24 15:06 vinnygambiny

Sometimes the password of the software is not the same as that for the DB unfortunately.

ctrl-alt-dev avatar Jun 13 '24 06:06 ctrl-alt-dev

cfg.tps.zip Here an exemple of a file I can't convert, if you can help me is appreciate.

vinnygambiny avatar Jun 19 '24 01:06 vinnygambiny

I ran some checks on the file. Normally block #15 of the key is recoverable, but for your file it isn't. I don't think it is encrypted using the tps encryption algorithm but something else.

Later versions of the clarion tps driver support enhanced encryption - my guess is this is used.
If that is the case your best bet is to contact the developer of your software for support.

ctrl-alt-dev avatar Jun 19 '24 06:06 ctrl-alt-dev