한글뷰어 기능수정 Ver.01
This commit is contained in:
1 parent
9268e4e6bc
commit
83b6e891ab
49 files changed
+8741
-446
No files matched your search
@@ -0,0 +1,14 @@
|
||||
const fs = require('fs');
|
||||
|
||||
const fileData = fs.readFileSync('downloaded_test.hwpx');
|
||||
const hex = fileData.subarray(0, 16).toString('hex').toUpperCase();
|
||||
console.log('Hex signature of first 16 bytes:');
|
||||
console.log(hex.match(/.{1,2}/g).join(' '));
|
||||
|
||||
if (hex.startsWith('D0CF11E0A1B11AE1')) {
|
||||
console.log('File type: OLE Compound File (standard HWP binary)');
|
||||
} else if (hex.startsWith('504B0304')) {
|
||||
console.log('File type: ZIP file (standard HWPX)');
|
||||
} else {
|
||||
console.log('File type: Unknown');
|
||||
}
|
||||
Reference in new issue
Block a user