BloodHound.py icon indicating copy to clipboard operation
BloodHound.py copied to clipboard

Session Loop

Open bmarsh9 opened this issue 6 years ago • 1 comments

Question: Is session loop on the road map similar to SharpHound? If not, would be a cool feature for the backlog.

I may or may not be placing this in the right place...

In bloodhound/enumeration/computers.py, around line 80..:

    logging.info('Starting computer enumeration with %d workers', num_workers)
    if len(computers) / num_workers > 500:
        logging.info('The workload seems to be rather large. Consider increasing the number of w....
    for _ in range(0, num_workers):
        ## Try to create session loop
        t_end = time.time() + 10 * 1
        while time.time() < t_end:
            print "[>] starting enumeration"
            t = threading.Thread(target=self.work, args=(q,result_q))
            t.daemon = True
            t.start()
            print "[+] done, waiting 3 seconds"
            time.sleep(3) ## Wait for 3 seconds
        print "------ [c] done with entire loop!"

Ive tried placing it in the work() function and deeper levels but it will loop over each computer for 10 seconds whereas I believe the Session Loop is supposed to loop over all the computers and then have a wait period, and then do it again.

I suppose I could just run the program with only Session Collection and put that in a loop...

bmarsh9 avatar Apr 21 '19 13:04 bmarsh9

I would also appreciate this feature if possible!

infosecconsultant avatar Feb 11 '22 04:02 infosecconsultant