I am trying to create html form where a user (user is a red teamer, basically hacker) inputs a string which he got after solving some sort of challenge, and we have to validate that the string he got is correct or not.
The major problem i'm facing is that the string to which we have validate is "securepass", but any how it is getting revealed in the source code or in any file. I tried it saving in file "pass.txt" and then fetching it through javascript, but again the name of the file is getting revealed in the source code and user (hacker) can simply put the name of the file in the url and can access the file.
I also tried it doing through nodejs but again the problem is same, if i use some kind of authorization token then the user can simply see that in request and use that token to request for the file.
I am trying to do it without using any database, and if cannot be done without database effectively, then please suggest me some good database and free database to store a single string of nearly 6-7 letters.