-
Notifications
You must be signed in to change notification settings - Fork 1
/
magicNumbers.go
47 lines (44 loc) · 898 Bytes
/
magicNumbers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package hideFile
type magicNumber struct {
Name string
Extension string
Description string
Number []byte
Offset offset
}
type offset struct {
Count int64
Value []byte
}
var magicNumberList = []magicNumber{
{
Name: "JPEG",
Extension: "jpg",
Description: "JPEG raw",
Number: []byte{0xFF, 0xD8, 0xFF, 0xDB},
},
{
Name: "7ZIP",
Extension: "7z",
Description: "7-Zip File Format",
Number: []byte{0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C},
},
{
Name: "GZIP",
Extension: "gz",
Description: "GZIP",
Number: []byte{0x1F, 0x8B},
},
{
Name: "DMG",
Extension: "dmg",
Description: "Apple Disk Image",
Number: []byte{0x78, 0x01, 0x73, 0x0D, 0x62, 0x62, 0x60},
},
{
Name: "PDF",
Extension: "pdf",
Description: "PDF document",
Number: []byte{0x25, 0x50, 0x44, 0x46},
},
}