CYB3RMX / Qu1cksc0pe

All-in-One malware analysis tool.
GNU General Public License v3.0
1.27k stars 180 forks source link

Code deduplication #57

Closed luis261 closed 5 months ago

luis261 commented 5 months ago

as originally layed out here, I am starting my way towards more integral contributions to this project by taking care of some simple code deduplication.

By simply identifying repeated snippets of code and providing the needed functionality in simple util functions instead, I managed to reduce the size of the main module by roughly 10% (LOC). The utility functions just sit in the main module itself for the time being. This is all I could do for now. There is still lots more to be done though, among other things the module will benefit from more comprehensive changes I'll hopefully get to introduce on my refactoring branch starting end of next week.

I hope you're ok with my changes so far, as well as me continuing to focus on code quality in the short term. I really think it'll pay off, as we'll end up with a codebase more conducive for further changes. (also has the nice sideeffect of preparing me for ultimately working on the analyzers by making me more familiar with the modules in general)

I am trying to aim for a sensible balance between quality/best practices and just being pragmatic/not overcomplicating things. I hope you'll bear with me and won't get put off since all changes in the near term are mainly about trying to improve existing code before expanding/improving features.

I'll definitely make the effort to closely coordinate the coming changes for the refactoring with you come next week, to avoid going off into a direction you don't support.

CYB3RMX commented 5 months ago

Hey @luis261 !

Thank you for your work. Sorry for the late answer, by the way. I've been busy this week. I'll review your changes A.S.A.P

luis261 commented 5 months ago

Hey @CYB3RMX (:

Don't worry, I'm very glad to see this merged, thank you! Yeah, I thought that you might be busy with other stuff, no problem since the changes weren't urgent.

I'll probably send my next PR next weekend