File: windows.go

package info (click to toggle)
ffuf 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 744 kB
  • sloc: makefile: 4
file content (21 lines) | stat: -rw-r--r-- 303 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// +build windows

package interactive

import (
	"os"
	"syscall"
)

func termHandle() (*os.File, error) {
	var tty *os.File
	_, err := syscall.Open("CONIN$", syscall.O_RDWR, 0)
	if err != nil {
		return tty, err
	}
	tty, err = os.Open("CONIN$")
	if err != nil {
		return tty, err
	}
	return tty, nil
}