|
Answer» Is ther any way 2 find a file's SIZE and Its OFFSET in Archive Through command line or Is there any softwareIf you mean a standard zip archive, you can use unzip with the -Zv switch
for example, here archive is test2.zip, files in it are zipinfo.txt and ziplimit.txt
Code: [Select]S:\Test\GZip\unzip\dl>unzip -Zv test2.zip Archive: test2.zip 37809 bytes 2 files
End-of-central-directory record: -------------------------------
Actual offset of end-of-central-dir record: 37787 (0000939Bh) Expected offset of end-of-central-dir record: 37787 (0000939Bh) (based on the length of the central directory and its expected offset)
This zipfile constitutes the sole disk of a single-part archive; its central directory CONTAINS 2 entries. The central directory is 115 (00000073h) bytes long, and its (expected) offset in bytes from the beginning of the zipfile is 37672 (00009328h).
There is no zipfile comment.
Central directory entry #1: ---------------------------
zipinfo.txt
offset of local header from start of archive: 0 (00000000h) bytes file system or OPERATING system of origin: MS-DOS, OS/2 or NT FAT version of encoding software: 2.0 minimum file system compatibility required: MS-DOS, OS/2 or NT FAT minimum software version required to extract: 1.0 compression method: none (stored) file security status: not encrypted extended local header: no file last modified on (DOS date/time): 2010 Jan 7 16:45:06 32-bit CRC value (hex): e94b62b5 compressed size: 25829 bytes uncompressed size: 25829 bytes length of filename: 11 characters length of extra field: 0 bytes length of file comment: 0 characters disk number on which file begins: disk 1 apparent file type: binary non-MSDOS external file attributes: 000000 hex MS-DOS file attributes (20 hex): arc
There is no file comment.
Central directory entry #2: ---------------------------
ziplimit.txt
offset of local header from start of archive: 25870 (0000650Eh) bytes file system or operating system of origin: MS-DOS, OS/2 or NT FAT version of encoding software: 2.0 minimum file system compatibility required: MS-DOS, OS/2 or NT FAT minimum software version required to extract: 1.0 compression method: none (stored) file security status: not encrypted extended local header: no file last modified on (DOS date/time): 2010 Jan 7 16:45:06 32-bit CRC value (hex): 9cb65fcc compressed size: 11760 bytes uncompressed size: 11760 bytes length of filename: 12 characters length of extra field: 0 bytes length of file comment: 0 characters disk number on which file begins: disk 1 apparent file type: binary non-MSDOS external file attributes: 000000 hex MS-DOS file attributes (20 hex): arc
There is no file comment.
Get unzip from
ftp://ftp.info-zip.org/pub/infozip/win32/unz552xn.exe
self extracting archive.D ans Worked Salmon but do u hav a software or is ther any way 2 find size of file in hex
FOR ex if there is a file of 1 MB den how to find size of file in hex Does that mean you don't want to know any more? info-zip.bat
Code: [Select]@echo off setlocal enabledelayedexpansion set archname=%1 Echo Archive: %archname% for /f "skip=1 tokens=1-8* delims= " %%A in ('unzip -Z "%archname%" ^| find /v "uncompressed"' ) do ( set filename=%%I set filesize=%%D for /f "delims==" %%L in ( 'unzip -Zv "%archname%" "%%I"') do ( for /f "tokens=1-11 delims=() " %%M in ('echo %%L ^| find "offset of local header"') do ( set hexoffset=%%V set hexoffset=!hexoffset:h=! set /a decoffset=0x!hexoffset! echo File !filename! size !filesize! offset !hexoffset! hex !decoffset! dec ) ) )
Code: [Select]S:\Test\GZip\unzip\dl>info-zip.bat test2.zip Archive: test2.zip File zipinfo.txt size 25829 offset 00000000 hex 0 dec File ziplimit.txt size 11760 offset 0000650E hex 25870 dec File Copy of unzipsfx.txt size 15578 offset 00009328 hex 37672 dec No its not working
i m tryin 2 inject files in 1 data file [Remember ma Topic on INJECT.exe]
I ve got the right command line with right example
go through this example
its command line options are
inject.exe filewhichuwantinject.ext [COMMAND LINE]
filewhichuwantinject.ext_offsetinhex_si zeinhex.ext[files shld b named as follows ]
the file in attachmnts "SchemaMetafile_DVD1.csc" is just renamed RAR file Use the example and find out this softwares power
IT REQUIRES PERFECT SIZE IN HEX HENCE I need A software 2 show Filesize and offset in hex
[Saving space, attachment deleted by admin]Code I posted only works with zip archives. Not rar.
You'd better find a cdda injecting forum somewhere.
|