frida / frida-website

Frida's website
MIT License
83 stars 191 forks source link

Improve the frida-trace docs and cover -P, -S, and -O #194

Closed mosherubin closed 3 years ago

mosherubin commented 3 years ago

SUBMIT DOCUMENTATION FOR FRIDA-TRACE OPTIONS -P, -S, -O

In January 2020 I submitted a pull request to add new functionality (-P, -S, -O) to frida-trace. I finally got around to composing documentation for these features. The following changes were made to the frida-website repository:

mosherubin commented 3 years ago

Oleavr,

You should know that I carried the weight of providing documentation for features I helped implement for many months. I recently decided that it was downright unfair to provide a tantalizing feature such as "--init-session"/"-S" without explaining how to use it. I believe I will begin sleeping better at night now that it's done.

I modified the documentation's embedded JavaScript code as per your comments. The only change I was unable to make was removing the "function" keyword from the core.js and ms-windows.js shared code libraries. When I removed the keyword, I received the following error:

@>frida-trace -p 6980 --decorate -i "gdi32full.dll!ExtTextOutW" -S ms-windows.js -S core.js
Failed to start tracing: Error: Unable to load ms-windows.js: SyntaxError: Illegal return statement
    at eval (<anonymous>)
    at Agent.init (agent.ts:22:26)
    at frida/runtime/message-dispatcher.js:13:1
    at c (frida/runtime/message-dispatcher.js:23:1)
    at Agent.init (agent.ts:24:23)
    at frida/runtime/message-dispatcher.js:13:1
    at c (frida/runtime/message-dispatcher.js:23:1)

Other than that, I hope it meets your editorial standards!

mosherubin commented 3 years ago

Hi oleavr,

I see the pull requested has not been merged. Is there still something I need to do?

Happy New Year,

Moshe

oleavr commented 3 years ago

@mosherubin So sorry for taking so long to pick this back up, I got sick and accumulated a lot of backlog that I'm still working my way through.

This is really amazing work! 😍 Given that it's taken me so long to get back to this, I took the liberty of applying the second round of review feedback myself. I didn't get a chance to test the final version on Windows, but I did test the ms-windows.js bits one by one. Appreciate it if you could open a PR in case you see something off – or something you'd prefer done differently. The main changes I've done are:

Happy New Year! 🎉

mosherubin commented 3 years ago

Hello Ole,

I know you and the Frida project well enough to know that, if I didn't hear from you about the PR, you were busy up to your neck in backlogs! My sincerest thanks for accepting my submission, and an especially grateful thumbs-up for the substantial cleanup. Your doing it saved many back-and-forths. I am absolutely convinced it is now a pearl!

As I wrote when I submitted it, I had a great feeling of having let the project down by not submitting documentation - in effect, the feature was cryptic and not usable by others. I can rest now knowing I have done my contributory duty.

Thank you for the privilege of contributing to Frida I don't think you've heard the last from me (and that's a threat 😉)!

Best regards, and stay well,

Moshe

On Thu, Jan 21, 2021, 01:06 Ole André Vadla Ravnås notifications@github.com wrote:

@mosherubin https://github.com/mosherubin So sorry it took me ages to pick this back up, I got sick and accumulated a lot of backlog that I'm still working my way through.

This is really amazing work! 😍 Given that it's taken me so long to get back to this, I took the liberty of applying the second round of review feedback myself. I didn't get a chance to test the final version on Windows, but I did test the ms-windows.js bits one by one. Appreciate it if you could open a PR in case you see something off – or something you'd prefer done differently. The main changes I've done are:

  • Using Markdown syntax as much as possible, avoiding HTML where possible.
  • Breaking lines at 80 cols.
  • Using JSDoc syntax for documenting functions.
  • Name the functions so they can be called directly, without assigning them to state.
  • Modernize the JavaScript further (template literals, for of, destructuring syntax, Map data structure, , etc.).

Happy New Year! 🎉

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/frida/frida-website/pull/194#issuecomment-764011902, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDWIUFXAO3AL4BUKYANXVTS25OWJANCNFSM4VFTLK4Q .

oleavr commented 3 years ago

@mosherubin Awesome! Glad to hear that, looking forward to it! 😊

Take care and stay safe, Ole André