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

Why ppt matcher return false for a ppt file #118

Open
guojin-bupt opened this issue Sep 14, 2022 · 0 comments
Open

Why ppt matcher return false for a ppt file #118

guojin-bupt opened this issue Sep 14, 2022 · 0 comments

Comments

@guojin-bupt
Copy link

guojin-bupt commented Sep 14, 2022

func Ppt(buf []byte) bool {
if len(buf) > 513 {
return buf[0] == 0xD0 && buf[1] == 0xCF &&
buf[2] == 0x11 && buf[3] == 0xE0 &&
buf[512] == 0xA0 && buf[513] == 0x46
} else {
return len(buf) > 3 &&
buf[0] == 0xD0 && buf[1] == 0xCF &&
buf[2] == 0x11 && buf[3] == 0xE0
}
}

location filetype/matchers/document
the ppt file's buf 512 and 513 is not equal 0xA0 and 0x46.
the value is 0xFD and 0xFF, file is in MAC OS and i create just now like this

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant