edoardottt / scilla

Information Gathering tool - DNS / Subdomains / Ports / Directories enumeration
https://edoardoottavianelli.it
GNU General Public License v3.0
915 stars 113 forks source link

Create an appropriate data structure for subs and dirs result #30

Closed edoardottt closed 3 years ago

edoardottt commented 3 years ago

Whenever scilla produces new results (dirs or subs) and it wants to print them, it looks into all the array of Assets to search if the Printed value is set to false. So, to speed up the performance we can do two things: Create a new data structure with two fields:

type Result struct {
assets    []Asset,
?
}

The second field can be a boolean, and this means that it can be changed to true (or false, it depends) when you have to print somethings, or a couple of integers telling us the printed values and the total value. In this second case we don't need the Printed item in Asset....

Another thing we can do to speed up performance is to print the results in reverse order, starting from the last found and going up to the first, when we encounter a Printed == true, it means we don't have more values to print.

edoardottt commented 3 years ago
  1. Tried to speed up performance with the Result struct (due to modified field) but it doesn't seem there is a good advantage in doing this.

  2. It's impossible to loops reverse through the results since it's a hashmap ( :1st_place_medal: )