package main
import (
"fmt"
"time"
evtx "github.com/0xrawsec/golang-evtx/evtx"
)
func main() {
fd, err := evtx.Open("D:\\ForwardedEvents\\Logs\\ForwardedEvents.evtx")
if err != nil {
fmt.Println(err)
}
stopchan := make(chan bool)
mychan := fd.MonitorEvents(stopchan, time.Duration(100))
x := <- mychan
fmt.Println(x)
}
The code I wrote; Windows Event Viewer Dan gets logs and outputs it, but when I run the code it says "File is flagged as a dirty." I am getting the error. How can I fix it?