@@ -10,7 +10,8 @@ public static class FileExtensionValidator
1010 {
1111 //https://en.wikipedia.org/wiki/List_of_file_signatures
1212 //https://www.filesignatures.net/index.php
13- //https://www.garykessler.net/library/file_sigs.html
13+ //https://www.garykessler.net/library/file_sigs.html (作者已退休,於 2025 轉交 SEARCH 團隊維護 https://filesig.search.org/)
14+ //https://www.garykessler.net/library/file_sigs_GCK_latest.html
1415 //https://asecuritysite.com/forensics/magic
1516 private static Dictionary < string , List < ( byte [ ] Signature , int Offset , int Skip , byte [ ] SecondSignature ) > > fileSignature
1617 = new Dictionary < string , List < ( byte [ ] Signature , int Offset , int Skip , byte [ ] SecondSignature ) > > ( ) {
@@ -30,11 +31,7 @@ public static class FileExtensionValidator
3031 ( new byte [ ] { 0x57 , 0x69 , 0x6E , 0x5A , 0x69 , 0x70 } , 0 , 0 , new byte [ ] { } )
3132 }
3233 } ,
33- { ".PNG" , new List < ( byte [ ] , int , int , byte [ ] ) > { ( new byte [ ] { 0x89 , 0x50 , 0x4E , 0x47 } , 0 , 0 , new byte [ ] { } ) ,
34- ( new byte [ ] { 0xFF , 0xD8 , 0xFF , 0xE0 } , 0 , 0 , new byte [ ] { } ) ,
35- ( new byte [ ] { 0xFF , 0xD8 , 0xFF , 0xE1 } , 0 , 0 , new byte [ ] { } ) ,
36- ( new byte [ ] { 0xFF , 0xD8 , 0xFF , 0xE8 } , 0 , 0 , new byte [ ] { } )
37- } } ,
34+ { ".PNG" , new List < ( byte [ ] , int , int , byte [ ] ) > { ( new byte [ ] { 0x89 , 0x50 , 0x4E , 0x47 } , 0 , 0 , new byte [ ] { } ) } } ,
3835 { ".JPG" , new List < ( byte [ ] , int , int , byte [ ] ) >
3936 {
4037 ( new byte [ ] { 0xFF , 0xD8 , 0xFF , 0xE0 } , 0 , 0 , new byte [ ] { } ) ,
0 commit comments