Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I'm writing a solver for Binario. I can successfully submit my solution (with `robot`:`1`) and the server responds to the POST saying that I got the correct answer and that I should submit it to the leaderboard.
- However when I then try to POST to `hallsubmit.php`, (sending form data: `robot`:`1`, `solparams`:`<The 'param' value that came with the puzzle>`, `submitscore`:`1`, `email`:`<my email address>`) I get the following error:
- `There was a problem submitting your score. Please write a feedback if you feel this is a system bug. Error 128`
- Any idea what I'm doing wrong? I'm not logged in, but my email address is registered with the site and I am able to solve puzzles and submit scores like a normal person when using a browser. It's only when I try to submit scores programatically through python that I'm getting this error.
- Thank you for the help.
- The code is written in Python3.8 using the `requests` module.
- First I send a GET request to
- https://www.puzzle-binairo.com/?size=0
- Then I parse the response and find the value of `task` to obtain the string that represents the puzzle's starting state.
- I also parse the value of `param` to obtain the 256-character string that will be used in future requests.
- Then I solve the puzzle and format the answer as a 36-character string of 0's and 1's
- Then to solve the puzzle I send a POST request to
- https://www.puzzle-binairo.com/?size=0
- I send some key/value pairs in the payload. I modeled this after the payload I observe when interacting with the site via a normal web browser (except the robot parameter is changed to '1').
- I am not setting any header values (beyond what the `requests` module sends by default, if anything). I am not explicity escaping or encoding any of the values in the form data that I'm sending (beyond what the `requests` module does by default, if anything). I'm just sending a dict of string->string.
- Here is the code for submitting the answer:
- data = {
- 'jstimer': '0',
- 'jsPersonalTimer': '',
- 'jstimerPersonal': '0',
- 'stopClock': '0',
- 'fromSolved': '0',
- 'robot': '1',
- 'zoomslider': '1',
- 'jstimerShow': '00:00',
- 'jstimerShowPersonal': '00:00',
- 'b': '1',
- 'size': '0',
- 'param': 'NUFbbXJ2ZH43QTtza3dycTEzZThBIWI+YEVBYShbO1s2SUs+fSF2JmA7N08oVUomQHlDK1FJXndfeUl+YU1mTF5TYTdhUl8gX2I4dmA3fGozS3RJVywyTn5PbkwjcUx7NW90NlUpVTYkRGVraCVxaSkwdix9NGNJc1I3OEVve153OWJrUDYjYT1LRkpSNikjK1ppXW5sbkFhJD4/PCV6dURefjhRaU9IID9OWzpiQytBcTh4c042bEltfCRUQWd8',
- 'w': '6',
- 'h': '6',
- 'ansH': '101100011001010110101001100110010011',
- 'ready': 'Done',
- }
- r = requests.post('https://www.puzzle-binairo.com/?size=0', data=data)
- The response I get looks good. It says I have correctly solved the puzzle and I should submit it to the leaderboard.
- Then to submit my score I send a POST request to
- https://www.puzzle-binairo.com/hallsubmit.php
- Once again I am not setting any header values, and I am not explicity escaping or encoding any of the values in the form data that I'm sending. I'm just sending a dict of string->string.
- Here is the code for submitting the score to the hall of fame:
- data = {
- 'robot': '1',
- 'solparams': 'NUFbbXJ2ZH43QTtza3dycTEzZThBIWI+YEVBYShbO1s2SUs+fSF2JmA7N08oVUomQHlDK1FJXndfeUl+YU1mTF5TYTdhUl8gX2I4dmA3fGozS3RJVywyTn5PbkwjcUx7NW90NlUpVTYkRGVraCVxaSkwdix9NGNJc1I3OEVve153OWJrUDYjYT1LRkpSNikjK1ppXW5sbkFhJD4/PCV6dURefjhRaU9IID9OWzpiQytBcTh4c042bEltfCRUQWd8',
- 'submitscore': '1',
- 'email': 'my_registered_email@something.com',
- }
- r = requests.post('https://www.puzzle-binairo.com/hallsubmit.php', data=data)
- Note that I'm sending my actual email address (not the placeholder value shown above), and that email has been verified/activated already.
- The server responds to the POST with a page that contains this error message in orange:
- "There was a problem submitting your score. Please write a feedback if you feel this is a system bug. Error 128"
- Any help is appreciated.
Add Comment
Please, Sign In to add comment