alexandreborges / malwoverview

Malwoverview is a first response tool used for threat hunting and offers intel information from Virus Total, Hybrid Analysis, URLHaus, Polyswarm, Malshare, Alien Vault, Malpedia, Malware Bazaar, ThreatFox, Triage, InQuest and it is able to scan Android devices against VT.
https://github.com/alexandreborges/malwoverview
GNU General Public License v3.0
2.85k stars 439 forks source link

Codebase cleanup: duplicates and indentation #5

Closed unfo closed 4 years ago

unfo commented 4 years ago

Rationale: Having a clean codebase will help others understand the code better and be able to contribute. It also eases debugging and prevents errors due to having duplicated blocks of code.

This PR consists of two types of changes:

  1. Deduplicating copypasted code to prevent code rot and having to change multiple pieces of code just because of formatting
  2. Fixed indentation to be consistently spaces instead of a few cases of tabs

If you accept this PR, I am willing to give more thoughtful effort to more complicated parts of the codebase.

Also please let me know if you would be interested in help with migrating this codebase to python3 as py2 support will end in approx 2 months.

Footnote: I understand the project is good enough right now as it does the job and these are non-functional changes.

alexandreborges commented 4 years ago

Dear Unfo,

Good afternoon. How are you?

I'm aware of these mentioned points. Indeed, there're many duplicated code and few indentation problems, which don't cause serious problems, but aren't good.

This code was initially developed on a weekend (taking coffee) and because my international and constant speaking in conferences I haven't had enough time to work on it.

About Python 2's ending of support, I am not concerned because the code will continue working, but certainly I'll be porting this code base to Python 3 in November or December.

This time, I will not accept you PR because I'll fix the code. Soon I have a better code (I'm going to do it soon), so we'll have better conditions to work together.

Please, feel free to send me a message (alexandreborges@blackstormsecurity.com) whenever you want to.

Thank you for your message and have an amazing day.

Alexandre Borges.