blacklanternsecurity / bbot

A recursive internet scanner for hackers.
https://www.blacklanternsecurity.com/bbot/
GNU General Public License v3.0
4.02k stars 370 forks source link

Don't Increment Scope Distance for Hostless Events #1451

Open TheTechromancer opened 3 weeks ago

TheTechromancer commented 3 weeks ago

Events without hosts associated with them, such as FILESYSTEM, should probably not have their scope distance incremented.

domwhewell-sage commented 3 weeks ago

Just looking into this, seems like I can add a if to the BaseEvent class that can satisfy this requirement

if self.host:
    if self._scope_distance_increment_same_host or not hosts_are_same:
        new_scope_distance += 1
self.scope_distance = new_scope_distance

Not sure if its as simple as this or if theres more areas that I'm overlooking

TheTechromancer commented 3 weeks ago

Looks good.

The majority of the work will be in fixing the tests and making sure everything works as intended.

TheTechromancer commented 1 week ago

Hey @domwhewell-sage, are you working on this one? If not, I can take it.

domwhewell-sage commented 1 week ago

Hey, I started with the if statement but the tests were returning some strange results (i.e. distance-0 for events that shouldn't be)

So it might make more sense to cast your expert eye over it @TheTechromancer

TheTechromancer commented 1 week ago

Roger I'll take a look