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

Enable color output on recent Windows 10 #8209

Open
mchubby opened this issue Feb 6, 2021 · 2 comments
Open

Enable color output on recent Windows 10 #8209

mchubby opened this issue Feb 6, 2021 · 2 comments
Milestone

Comments

@mchubby
Copy link

mchubby commented Feb 6, 2021

Referencing #4414 and #5344

Recent builds of Windows 10 have Ansi color sequences enabled by default.

Can you change the IsTerminal runtime check in common/terminal/colors.go to allow colors when Windows 10 >= 1909?
You could use something like https://github.com/microsoft/hcsshim/blob/master/osversion/osversion_windows.go#L35
and 1909 is 10.0 build 18363 (from [1])

[1] https://docs.microsoft.com/en-us/windows/release-information/

@bep bep added Enhancement and removed Proposal labels Feb 6, 2021
@bep bep added this to the v0.81 milestone Feb 6, 2021
@bep
Copy link
Member

bep commented Feb 6, 2021

We should try to fix this, but I'm not keen on adding that entire windows package, so we should try to figure this out without.

@mchubby
Copy link
Author

mchubby commented Feb 7, 2021

Well in fact the syscall.GetVersion() may not be the way to go (deprecated), see BishopFox/sliver#108 (comment)

It takes a combination of syscall (call to "RtlGetVersion") and unsafe access to retrieve the build value apparently.

@bep bep modified the milestones: v0.81, v0.82 Feb 19, 2021
@bep bep modified the milestones: v0.82, v0.83 Mar 21, 2021
@bep bep modified the milestones: v0.83, v0.84 May 1, 2021
@bep bep modified the milestones: v0.84, v0.85 Jun 18, 2021
@bep bep modified the milestones: v0.85, v0.86 Jul 5, 2021
@bep bep modified the milestones: v0.86, v0.87, v0.88 Jul 26, 2021
@bep bep modified the milestones: v0.88, v0.89 Sep 2, 2021
@bep bep modified the milestones: v0.89, v0.90 Nov 2, 2021
@bep bep modified the milestones: v0.90, v0.91.0 Dec 13, 2021
@bep bep modified the milestones: v0.91.0, v0.92.0 Dec 22, 2021
@bep bep modified the milestones: v0.92.0, v0.93.0 Jan 12, 2022
@bep bep modified the milestones: v0.113.0, v0.115.0 Jun 13, 2023
@bep bep modified the milestones: v0.115.0, v0.116.0 Jun 30, 2023
@bep bep modified the milestones: v0.116.0, v0.117.0 Aug 1, 2023
@bep bep modified the milestones: v0.117.0, v0.118.0 Aug 30, 2023
@bep bep modified the milestones: v0.118.0, v0.119.0 Sep 15, 2023
@bep bep modified the milestones: v0.119.0, v0.120.0 Oct 4, 2023
@bep bep modified the milestones: v0.120.0, v0.121.0 Oct 31, 2023
@bep bep modified the milestones: v0.121.0, v0.122.0 Dec 6, 2023
@bep bep modified the milestones: v0.122.0, v0.123.0, v0.124.0 Jan 27, 2024
@bep bep modified the milestones: v0.124.0, v0.125.0 Mar 4, 2024
@bep bep modified the milestones: v0.125.0, v0.126.0 Apr 23, 2024
@bep bep modified the milestones: v0.126.0, v0.127.0 May 15, 2024
@bep bep modified the milestones: v0.127.0, v0.128.0 Jun 8, 2024
@bep bep modified the milestones: v0.128.0, v0.129.0 Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants