-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Obfuscate the PGN #559
Comments
Do you have an example for that? PGN is a text format (by definition), obfuscation here would change the meaning. You could encrypt it (to hide the text from the normal user), and decrypt it on the fly, but I have no idea how that could help, and how it could be done. Chessable has a business, and they have to protect their intellectual property. Using Chessable means, you have to use their UI. Do you have examples (from Chessable)? When I look at their UI, I see (in the UI) the PGN, which I can copy then, but in the source code in the browser, the PGN is hidden. |
I am looking at writing a chess site for viewing commented games, and I wanted to make it difficult for users to copy the games. After some investigation, I see that chessable have getGame endpoint, which delivers back a load of JSON, including a JSON object per move. This is difficult enough for any reasonable person to convert to PGN, that in my opinion, it is obfuscated. Does your PGN viewer create such a tree of variations and moves from a PGN? If I could generate that JSON structure on the server, and provide it to your viewer, that would be perfect.
There's lots more data provided, but this is just the first 2 moves. The move JSON supports comments before and after, as well as drawing of arrows. The full JSON provides all info about the page including comments from users and links to other courses. That's something I wouldn't need. |
Well, strange, because the reader is working from plain PGN (that is a feature, not a bug). It would be of course possible to change it in a way, that it allows different formats. I have used in the past ROT13 for such a thing (not real encoding, but not easy to translate directly without knowing how it works.
Take that to the tool https://cryptii.com/pipes/rot13-decoder, paste it into the left box, and you should see the real PGN then. I will do some search if there is something a little bit more complicated. Summary: Allow encoding of PGN (additional flag needed), decode on the fly, and use the resulting PGN then. |
I know that the pgn viewer takes a PGN string and parses it. But for people who want to harvest the data, that is too easy. I think for a first attempt, I will encode the pgn string using Base 64, and then decode on the fly. I'm not a javascripty person, so that's why I was looking for the internal object structure. Thanks for your time, and thank you for your viewer. |
I notice that chessable seems to obfuscate their HTML and javascript to make it very difficult or impossible to extract the PGN. I would like to do something similar to protect the intellectual property of the creator of the PGN.
I'm happy to let people copy and paste the moves and commentary, so long as they can't easily recreate the variation tree.
The text was updated successfully, but these errors were encountered: