byt3bl33d3r/SILENTTRINITY

If running more than one module at the same time, output gets mixed up

Open

#93 opened on Sep 10, 2019

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Boo (427 forks)github user discovery
bugenhancementhelp wanted

Repository metrics

Stars
 (2,340 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Sessions run modules/tasks asynchronously, the way this is currently implemented (threads) has the unfortunate consequence of mixing up module's output if more than one is running at the same time because we're just hooking STDout using Console.SetOutput(). (https://github.com/byt3bl33d3r/SILENTTRINITY/blob/master/core/teamserver/data/stage.boo#L359-L379)

We really have only two options (unless i'm missing something obvious) to fix this:

  1. We run each module in it's own separate process instead of a thread (which would allow us to keep using the print statement for a modules output but would complicate the code considerably )
  2. Pass a new StringBuilder() object to each module and append the output to it (this would allow us to keep using threads but we won't be able to use the print statement anymore to handle output which is really pretty)

Contributor guide