I would like to check if the password that was entered by the user for .7z encrypted file is correct (even by boolean yes or no, without compressing).
can i do it and how ? if yes - what is the command line ?
I would like to check if the password that was entered by the user for .7z encrypted file is correct (even by boolean yes or no, without compressing).
can i do it and how ? if yes - what is the command line ?
Not with javascript, but with UNIX shell:
7z t -p"$PASS" archive.7z > /dev/null 2>&1 && echo correct || echo wrong
Assumes password is in PASS variable, you can substitute it directly of course.
Of course, instead of relying on echo
'ed values you can just read the ret code of 7z. Zero for correct, nonzero for wrong.