What is the best way to debug and save output?

Sbenny.com is trusted by 1,313,040 happy users since 2014.
Register

johnny9475

Lurker Lv0️⃣
Member for 8 years
I am using dnSpy to look into random unity game application, after pressing specific button whilst in the app, it sends request to the server. You can capture most of it by connecting your android device to HTTP app on your PC. Some requests are formatted in a way to resemble packets, hence you cannot really see in plain text what the JSON request is. I can access encode packet function and decode packet function using dNspy, however not sure what would be the best approach to replicate the steps so I came up with a series of steps.

My objectives:
1. Before the value is being encoded and send via packet, output it somewhere on your android device. I was thinking about saving it to a log file (if anyone has any tutorial on how to do it, please post below), or if there is a better and easier step, let me know too!
2. I will eventually have to send this request with the value that packet had encoded, step no.1 gives me at least an idea of what needs to be encoded.

This is example request body (packet type)
e=tKIxNAZ8IZKRQORqx7yH8M1XFQ7LI2Kd9G19OMI75raGhDnvYOKut6cpvn%2bEvNwk6a7s8SV0%2bSJs1ljEYRptwnake1H07aDURinmJj4tJnxtMj%2fxGrm1p1vMNzNWENLOotz1f0pHz1dqV4v67FL3YZwP1hQYXUD4piV36z96yaJYlWGOPi4Gmq5ahAvkpepNR3jzXbcNaHFr5jrhj%2bUnBeXHRiKFfgqwaPn3IozxqwplZRw2J7Xa1QAswX1JAW7COH1gprXx1EUHompOliEAinxsxYkhbEkuM1fInzwW9mn1ZF6FjI3AqymQpyJm5kYYVDMt9VeGtpo0GkJPMcUw3wdbloJpKfRlF7WVXdTNO4pfGrDM8kXAPUx6PJKY7zTmLRwMBSYWfg26PFh7PY4aL9%2bqEl%2fvWa%2bFe5SZHX%2bOKZ%2beX%2fKH54GTPq3MLpGuq5uRuuZpRefhvTFuZsluaWwm6sMHyZTxUz6IJwn7XkOMR7abguBuBFXeKkWC30ow6yzvKnV8tuwmKXORT%2bql7YIR72MKcdsxX3hrY56h6vcAEl6qGuAekl8noXZkVFF8mIH%2f9kpjr54Aonhzr0LhiBybatkbRoIXaEYE0DfYyTbyFU1LPAI9KIwHirx5XtHhig1V
 
Top