Skip to content

Commit 48aacba

Browse files
committed
refactor: Change get_task_list to yield tasks instead of returning a list
1 parent e3c2625 commit 48aacba

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • bugscanx/modules/scanners_pro/scanners

bugscanx/modules/scanners_pro/scanners/direct.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,8 @@ def get_task_list(self):
6969
methods = self.filter_list(self.method_list)
7070
hosts = self.filter_list(self.host_list)
7171
ports = self.filter_list(self.port_list)
72-
return (
73-
{'method': m.upper(), 'host': h, 'port': p}
74-
for m, h, p in product(methods, hosts, ports)
75-
)
72+
for m, h, p in product(methods, hosts, ports):
73+
yield {'method': m.upper(), 'host': h, 'port': p}
7674

7775
def init(self):
7876
super().init()

0 commit comments

Comments
 (0)