Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to wait a long time to get the session #24

Closed
WAY29 opened this issue May 10, 2021 · 5 comments
Closed

Need to wait a long time to get the session #24

WAY29 opened this issue May 10, 2021 · 5 comments

Comments

@WAY29
Copy link

WAY29 commented May 10, 2021

When I use Grish, I found that I need to wait a long time to get the session, I just read your source code and still don't know why, here is debug print, it seems that each time I need to wait 7 seconds and then run command whoami, and both sides is linux (centos / wsl subsystem ubuntu)

image

@WAY29
Copy link
Author

WAY29 commented May 10, 2021

When I use Grish, I found that I need to wait a long time to get the session, I just read your source code and still don't know why, here is debug print, it seems that each time I need to wait 7 seconds and then run command whoami, and both sides is linux (centos / wsl subsystem ubuntu)

image

It seems that seesion available at once in the demo picture of Readme, which makes me very puzzled.

@nodauf
Copy link
Owner

nodauf commented May 11, 2021

Hi,
The waiting time should be around 3 seconds, 2 seconds after the connection to wait for the session to be stable and 1 second after the command whoami.
These sleep timers are mostly for windows clients.
What OS is the machine where you execute your reverse shell ?

@WAY29
Copy link
Author

WAY29 commented May 11, 2021

Hi,
The waiting time should be around 3 seconds, 2 seconds after the connection to wait for the session to be stable and 1 second after the command whoami.
These sleep timers are mostly for windows clients.
What OS is the machine where you execute your reverse shell ?

both sides is linux (centos / wsl subsystem ubuntu)

@nodauf
Copy link
Owner

nodauf commented May 11, 2021

There are 5 more seconds of waiting used to clear the buffer and be sure to catch the output of the executed command and not a previous output. This is also mainly for windows clients.
I will reduce the default time and create an option to adjust it on the run

@nodauf
Copy link
Owner

nodauf commented May 11, 2021

I add the option timeBuffer, you can reduce to wait time to get the session by 5 seconds (with timeBuffer at 0).
Tell me if that's solve your issue.

@WAY29 WAY29 closed this as completed May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants