feasel

Issue with Binario solver

Apr 1st, 2022 (edited)
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.89 KB | None | 0 0
  1. 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.
  2. 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:
  3. `There was a problem submitting your score. Please write a feedback if you feel this is a system bug. Error 128`
  4. 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.
  5. Thank you for the help.
  6.  
  7.  
  8. The code is written in Python3.8 using the `requests` module.
  9.  
  10. First I send a GET request to
  11. https://www.puzzle-binairo.com/?size=0
  12.  
  13. Then I parse the response and find the value of `task` to obtain the string that represents the puzzle's starting state.
  14. I also parse the value of `param` to obtain the 256-character string that will be used in future requests.
  15.  
  16. Then I solve the puzzle and format the answer as a 36-character string of 0's and 1's
  17.  
  18. Then to solve the puzzle I send a POST request to
  19. https://www.puzzle-binairo.com/?size=0
  20. 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').
  21. 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.
  22.  
  23. Here is the code for submitting the answer:
  24. data = {
  25. 'jstimer': '0',
  26. 'jsPersonalTimer': '',
  27. 'jstimerPersonal': '0',
  28. 'stopClock': '0',
  29. 'fromSolved': '0',
  30. 'robot': '1',
  31. 'zoomslider': '1',
  32. 'jstimerShow': '00:00',
  33. 'jstimerShowPersonal': '00:00',
  34. 'b': '1',
  35. 'size': '0',
  36. 'param': 'NUFbbXJ2ZH43QTtza3dycTEzZThBIWI+YEVBYShbO1s2SUs+fSF2JmA7N08oVUomQHlDK1FJXndfeUl+YU1mTF5TYTdhUl8gX2I4dmA3fGozS3RJVywyTn5PbkwjcUx7NW90NlUpVTYkRGVraCVxaSkwdix9NGNJc1I3OEVve153OWJrUDYjYT1LRkpSNikjK1ppXW5sbkFhJD4/PCV6dURefjhRaU9IID9OWzpiQytBcTh4c042bEltfCRUQWd8',
  37. 'w': '6',
  38. 'h': '6',
  39. 'ansH': '101100011001010110101001100110010011',
  40. 'ready': 'Done',
  41. }
  42. r = requests.post('https://www.puzzle-binairo.com/?size=0', data=data)
  43.  
  44. The response I get looks good. It says I have correctly solved the puzzle and I should submit it to the leaderboard.
  45.  
  46. Then to submit my score I send a POST request to
  47. https://www.puzzle-binairo.com/hallsubmit.php
  48. 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.
  49.  
  50. Here is the code for submitting the score to the hall of fame:
  51. data = {
  52. 'robot': '1',
  53. 'solparams': 'NUFbbXJ2ZH43QTtza3dycTEzZThBIWI+YEVBYShbO1s2SUs+fSF2JmA7N08oVUomQHlDK1FJXndfeUl+YU1mTF5TYTdhUl8gX2I4dmA3fGozS3RJVywyTn5PbkwjcUx7NW90NlUpVTYkRGVraCVxaSkwdix9NGNJc1I3OEVve153OWJrUDYjYT1LRkpSNikjK1ppXW5sbkFhJD4/PCV6dURefjhRaU9IID9OWzpiQytBcTh4c042bEltfCRUQWd8',
  54. 'submitscore': '1',
  55. 'email': 'my_registered_email@something.com',
  56. }
  57. r = requests.post('https://www.puzzle-binairo.com/hallsubmit.php', data=data)
  58.  
  59. Note that I'm sending my actual email address (not the placeholder value shown above), and that email has been verified/activated already.
  60.  
  61. The server responds to the POST with a page that contains this error message in orange:
  62. "There was a problem submitting your score. Please write a feedback if you feel this is a system bug. Error 128"
  63.  
  64. Any help is appreciated.
  65.  
Add Comment
Please, Sign In to add comment