|
如何修改映像文件,把文件夹容量改为超大容量????
[这个贴子最后由cdrom在 2002/12/18 03:25pm 编辑]
光碟上的目录记录区
Table 1. Directory Record BP Field Name Content
1 Length of directory Record (LEN_DR) Bytes
2 Extended Attribute Record Length Bytes - this field refers to the Extended Attribute Record, which provides additional information about a file to systems that know how to use it. Since few systems use it, we will not discuss it here. Refer to ISO 9660:1988 for more information.
3 to 10 Location of Extent This is the Logical Block Number of the first Logical Block allocated to the file.
11 to 18 Data Length Length of the file section in bytes
19 to 25 Recording Date and Time This is recorded in the same format as the Volume Creation Date and Time
26 File Flags One Byte, each bit of which is a Flag:
Bit
0 File is Hidden if this bit is 1
1 Entry is a Directory if this bit is 1
2 Entry is an Associated file is this bit is 1
3 Information is structured according to the extended attribute
record if this bit is 1
4 Owner, group and permissions are specified in the extended
attribute record if this bit is 1
5 Reserved (0)
6 Reserved (0)
7 File has more than one directory record if this bit is 1
27 File Unit Size This field is only valid if the file is recorded in interleave mode. Otherwise this field is (00)
28 Interleave Gap Size This field is only valid if the file is recorded in interleave mode. Otherwise this field is (00)
29 to 32 Volume Sequence Number The ordinal number of the volume in the Volume Set on which the file described by the directory record is recorded.
33 Length of File Identifier (LEN_FI) Byte
假设有一个 ISO 档,里面有一个目录,叫 "TEST". 这里需要 Norton Utility (8.0 版以前) 的 Diskedit.exe , 或是 UltraEdit 也可以, 来找 ASCII 字串: "TEST",首先会找到两个像这样的地方: (但这不是我们要的位置)
再往下找就会再看到一个像这样的地方:
就是这里!我们来看看从 "TEST" 开始,回头算起的 33 个 bytes。
(就目录而言其它 ISO 档应该也是差不多要找叁次才是要改的位置,不过读完本篇後您就会判断那个位置才对了。而档案的话仅找一次就可以到达我们要改的地方。)
其中最後的 54 45 53 54 就是目录名 "TEST",倒数第一个 byte 是 04,就是第 33 个 byte "Length of File Identifier",在这里 "TEST" 一共占了四个Bytes,所以是 04。
再看看倒数第 15 到 21 个 bytes,也就是表一中第 19 到 25 个 bytes 的位置,这里是记录该目录建立的日期和时间。其中 62 08 0E 换算成十进位就是 98 08 14 也就是日期是 1998 年 8 月 14 日。
再看看第 11 到第 18 个 bytes ,"Data Length" ,如果是个 档案 的话,这就是该档案的大小 (File size)。如果是个 目录 的话,则一律是 00 08 00 00 00 00 08 00 ,即 2048 bytes,也就是一个目录名就要占了一个 sector。
再看看开头第 3 到第 10 个 bytes 的位置: 1A 00 00 00 00 00 00 1A ,其实就是: 1A 00 00 00。也就是此目录在 ISO 档中所占的位置的第一个 sector 的 Logical Block Address。
超大档案
我们在制造超大档案时就是改 "Data Length" 这个位置(把活动的游标放在档名的第一个字母上,向左按 23 次 ),把它改成我们要的数字,例如 2 giga bytes,那麽在 dir 那片光碟时就会出现一个 2 giga 的档案。
十进位跟十六进位数字要互相转换时, 您需要一个 Shareware: NUMCONV.EXE ,或者用 Win95 / 98 本身的小算盘 (改成工程型) 也可以 : 如下图:
举例来说,要把档案大小改成 20,000,000 bytes,先转换成 16 进位,得到 : 1312D00 也就是 01 31 2D 00,那麽第 11 到第 18 个 bytes就要改成 :
00 2D 31 01 01 31 2D 00
或者只改第 11 到第 14 个 bytes 也可以。如下:
00 2D 31 01
如果该档案是个执行档,或许还可以执行。也可以 copy 到硬碟,因为 20,000,000也不算太大。这就是一个可以用的超大档案,可以用来伪装,以及某种程度的保护。如果把它改成 2,000,000,000 会怎样呢?换算结果是 77359400 ,那麽就改为:
00 94 35 77 77 35 94 00
或:
00 94 35 77
这次不能执行也无法 copy 了。这就成了一个没有用的超大档案 (或垃圾档)。
|
|