Skip to content

Commit

Permalink
fix(CornerShot): Improved shot generation at scale
Browse files Browse the repository at this point in the history
  • Loading branch information
sagiesec committed Feb 4, 2021
1 parent c206a62 commit 0b6993d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cornershot/cornershot.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def _shots_manager(self):
self.total_shots = 0

def open_fire(self,blocking=True):
self.lock_and_load()
num_threads = min(self.total_shots,self.workers)

if self.total_shots > 0:
Expand All @@ -153,10 +154,10 @@ def read_results(self):
return self.results

def lock_and_load(self):
self.total_shots = self.remaining_shots()
self.total_shots = len(self.shot_list)

def remaining_shots(self):
return len(self.shot_list)
return self.total_shots

def _get_suitable_shots(self, target_port, destination_port):
class_list = []
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
setup(
name='cornershot',
python_requires='>=3',
version='0.2.1',
version='0.2.2',
description='Library to test network connectivity',
long_description_content_type='text/markdown',
long_description=long_description,
Expand Down

0 comments on commit 0b6993d

Please sign in to comment.