-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
hello!, i've experienced some issues while trying to read the $FILE_NAME attribute, it just doesn't send me any character and remains with 0 data in the whole $MFT
C:\Users\Lucas\Documents\Golang\mfttest>main.exe C:\Users\Lucas\Downloads\MFTECmd\xd.jaja
0
0
0
0
0
0
0
0
0
0
0
0
0
0
package main
import (
"errors"
"fmt"
"io"
"log"
"os"
"github.com/t9t/gomft/mft"
)
func main() {
f, err := os.Open(os.Args[1])
if err != nil {
log.Fatalln("Unable to open file", err)
}
defer f.Close()
recordSize := 1024
for {
buf := make([]byte, recordSize)
_, err := io.ReadFull(f, buf)
if err != nil {
if errors.Is(err, io.EOF) {
break
}
log.Fatalln("Unable to read record data", err)
}
jaja, err := mft.ParseFileName(buf)
if err != nil {
continue
}
fmt.Println(jaja.Name, len(jaja.Name))
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels