Exploit databaseDownload repository ZIP
GH-ffa7fba5e0d6e59f631c1e7fdc60055d
k7pro/cve-2021-25646-exp
Sources for CVE-2021-25646
17 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files8
k7pro/cve-2021-25646-expRevision 41e68c3af7e9
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
color/color_windows.go
Go · 504 bytespackage color
import (
"os"
"golang.org/x/sys/windows"
)
func init() {
// Opt-in for ansi color support for current process.
// https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#output-sequences
var outMode uint32
out := windows.Handle(os.Stdout.Fd())
if err := windows.GetConsoleMode(out, &outMode); err != nil {
return
}
outMode |= windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING
_ = windows.SetConsoleMode(out, outMode)
}