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

Running hashcat with a long commandline messes up the text layout at the prompt #15297

Closed
oldshensheep opened this issue May 5, 2023 · 5 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@oldshensheep
Copy link

oldshensheep commented May 5, 2023

Windows Terminal version

1.17.1023

Windows build number

10.0.22624.0

Other Software

No response

Steps to reproduce

  1. download hashcat
  2. run this in pwsh: .\hashcat.exe -O -a 3 -m 17210 --increment '$pkzip2$1*1*2*0*c1*114*d9f6f87e*0*28*8*c1*d9f6*840b*74af528f6fe4a979a02f4e51129c298ecf6834e8abdae83ee2beb3a75888c9c987e1e820ec82a246d8061195f2472133f17f3f7f79b37b63ee44f84dea76f6313bbd411d397a3def8927c1ae9b76f9525130a09cc7225616207e042a2cc8752067d147071d7c0d612b0d7a840efd71ecb9ace08ed6cee446163ceb0cbe3f45c295db568a47f32235f1b8fffbb2f7ca4decc69b186a8c654b20de6dfa0fbc0ba4ceb17019f1144846c85195787aa3159697cd4814391fd0db08d10337a77836cc69*$/pkzip2$'
  3. Ctrl+C
  4. up/down arrows will leave corrupted text
video.mp4

Expected Behavior

Text should not mess up.

I use vscode to open terminal, and it has no such problem.

Actual Behavior

Text fly to somewhere……
See the video above.

@oldshensheep oldshensheep added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 5, 2023
@o-sdn-o

This comment was marked as resolved.

@lhecker
Copy link
Member

lhecker commented May 5, 2023

I was able to reproduce the issue. I've updated your description with a way I found to consistently reproduce the issue.

@zadjii-msft zadjii-msft changed the title The text layout is messed up Running hashcat with a long commandline messes up the text layout at the prompt May 5, 2023
@j4james
Copy link
Collaborator

j4james commented May 5, 2023

I think this is probably just a variation of #5094.

It looks like hashcat attempts to setup the window size on startup. See the call to setup_console, which calls SetConsoleWindowSize, which ultimately calls SetConsoleScreenBufferSize. Since conhost doesn't forward those buffer size changes to conpty, the two sides will likely end up out of sync, so it's inevitable the layout will break.

@PankajBhojwani
Copy link
Contributor

Thank you for filing this! Thank you @j4james, yes this is a duplicate of #5094, please follow that thread for updates on this issue.

/dup #5094

@microsoft-github-policy-service
Copy link
Contributor

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service microsoft-github-policy-service bot added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

5 participants