mirror of
https://github.com/codingo/Interlace.git
synced 2026-01-24 17:34:46 +01:00
[BREAK] Checkin
This commit is contained in:
@@ -6,24 +6,24 @@ from lib.core.threader import Pool
|
||||
|
||||
|
||||
def build_queue(arguments, output):
|
||||
queue = ""
|
||||
queue = list()
|
||||
for target in InputHelper.process_targets(arguments):
|
||||
for command in InputHelper.process_commands(arguments):
|
||||
output.terminal(Level.VERBOSE, target, command, "Added to Queue")
|
||||
queue += command
|
||||
queue.append(command)
|
||||
return queue
|
||||
|
||||
|
||||
def main():
|
||||
parser = InputParser()
|
||||
arguments = parser.parse(sys.argv[1:])
|
||||
|
||||
output = OutputHelper(arguments)
|
||||
|
||||
output.print_banner()
|
||||
|
||||
#pool = Pool(arguments.threads, )
|
||||
pool = build_queue(arguments, output)
|
||||
print(pool)
|
||||
pool = Pool(arguments.threads, build_queue(arguments, output), arguments.timeout, output)
|
||||
pool.run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -23,12 +23,13 @@ class Worker(object):
|
||||
|
||||
|
||||
class Pool(object):
|
||||
def __init__(self, max_workers, queue, timeout):
|
||||
def __init__(self, max_workers, queue, timeout, output):
|
||||
self.queue = queue
|
||||
self.workers = [Worker(self) for w in range(max_workers)]
|
||||
self.timeout = timeout
|
||||
self.output = output
|
||||
|
||||
def run(self, command):
|
||||
def run(self):
|
||||
while True:
|
||||
|
||||
# make sure resources are available
|
||||
|
||||
Reference in New Issue
Block a user