michelin / ChopChop

ChopChop is a CLI to help developers scanning endpoints and identifying exposition of sensitive services/files/folders.
Other
673 stars 78 forks source link

Let's improve everything: less spaghetti code, scan algorithm and CI improvement, lighter binary #55

Open pandatix opened 3 years ago

pandatix commented 3 years ago

Hi, St*** told me about this repo. I saw Go. I was not able not to contribute. :smile: So here is my PR (he challenged me to do it the 6th of april sooooo). I let you check what is new (pretty much everything) in the code, but here is a summary:

It also decreases the binary sizes with an average of -14,59%, according to the following.

Build Old size New size Change
darwin/386 11596316 / /
darwin/amd64 12963520 11244800 -15,28%
freebsd/386 11494919 9958457 -15,42%
freebsd/amd64 12959576 11398268 -13,70%
freebsd/arm 11464927 9954328 -15,18%
linux/386 11564173 10005288 -15,58%
linux/amd64 13023214 11423764 -14,00%
linux/arm 11525679 9900195 -16,42%
linux/mips 12573111 10889275 -15,46%
linux/mips64 13346334 11622775 -14,83%
linux/mips64le 13280928 11513243 -15,35%
linux/mipsle 12507649 10831225 -15,48%
linux/s390x 13162878 11341843 -16,06%
netbsd/386 11451592 9922778 -15,41%
netbsd/amd64 12911314 11351339 -13,74%
netbsd/arm 11463006 9875376 -16,08%
openbsd/386 11459942 9919602 -15,53%
openbsd/amd64 12919687 11407653 -13,25%
windows/386 11484160 10405888 -10,36%
windows/amd64 12846080 11665920 -10,12%

THE CLI IS NOT BACKWARD COMPATIBLE.