Commit Graph

189 Commits

Author SHA1 Message Date
Nik
110b498d7b includes/type: Added magic number assertion type 2022-11-29 14:43:27 +01:00
gmestanley
9887da7af5 patterns/ne: Adding pattern file for NE executables (#58)
* Update pe.hexpat

Implementing a number of things and fixing others

* Update pe.hexpat

Adding the readonlyData pattern

* Update pe.hexpat

Testing putting the number of tabs on Github to 4 instead of 8 (so that comments on the code for the Sections don't break)

* Update pe.hexpat

Reverting change that turned out to be needless

* Update pe.hexpat

Actually sending the `products[while($ != richHeaderEndPosition)]` to `products[while($ < richHeaderEndPosition)]` change

* Add files via upload

Adding NE test file

* Add files via upload

Adding NE pattern file

* Update ne.hexpat

Fixing the error with the entry table assignment

* Update README.md

Added the NE pattern file to the list of patterns
2022-11-19 19:25:02 +01:00
Nicolás Alvarez
01a1bd0d9f patterns/zip: Change how the end of central directory record is found (#60)
Previously, the zip pattern was searching for the end-of-central-directory
header signature (50 4B 05 06) by searching the entire file for it. This is
*very* slow for large files, and risks false positives since those bytes
could randomly appear in compressed data. I had this happen on the first
large (>2GB) zip file I tried.

I'm now checking for the EOCD signature at exactly 22 bytes from the end of
the file (in the common case there is no zip comment), and if that fails
I search for it in the last 64KB of the file (in case there *is* a comment
at the end of the EOCD, which can't be larger than 64KB). This is much
faster, and fixes loading my zip file where it was spuriously finding the
signature in the wrong place.

This still has a low risk of false positives (what if the comment has the
50 4B 05 06 bytes? what if there is a short comment but the signature
appears in the last 64KB of compressed data?), but I don't know what's the
"right" way to find the EOCD, or how proper zip-reading tools handle the
ambiguity...
2022-11-19 18:05:26 +01:00
finict
fbb6a84323 patterns: Fixed PNG pattern #61 (#62)
Closes #61
2022-11-19 18:04:51 +01:00
Nik
4cdf3c11cf includes/std: Fixed copy_section_to_section copy-paste error 2022-11-19 18:02:04 +01:00
Nicolás Alvarez
a9ada89bd0 patterns: Minor cleanup to zip pattern (#59)
* Use spaces instead of tabs in zip.hexpat

* patterns: minor cleanup to ZIP pattern

- Remove empty and unused CentralDirectoryEntry struct.
- Shorten the comment of CentralDirectoryFileHeader.fileOffset. It was so
  long that the tooltip overflowed my screen, and didn't really add much
  information.
- Small whitespace changes.
2022-11-14 22:46:28 +01:00
Merlyn Morgan-Graham
de0e089165 includes/std+type: Add DOS datetime types (#57)
Add type::dosdate16_t and type::dostime16_t in pattern library
ImHex-v1.25.0
2022-11-14 10:08:00 +01:00
Fredrick Brennan
e7ea6fd77f patterns: Added APNG support to PNG pattern (#53) 2022-11-10 10:36:46 +01:00
Fredrick Brennan
ff3c796de8 patterns: Added sRGB, zTXt, tEXt support to PNG pattern (#55)
* patterns: png.hexpat: APNG support

* patterns: png.hexpat: +sRGB, zTXt, tEXt
2022-11-10 10:23:42 +01:00
lieyanqzu
0c83764f24 patterns: Fix java class pattern and update to javase17 format (#56)
fix java class pattern and update to javase17 format
2022-11-10 10:23:06 +01:00
Fredrick Brennan
d87f95dbfa includes/type: Add RGB8 to color.pat (#54) 2022-11-10 10:22:17 +01:00
Nik
51dad63779 includes/std: Removed invalid returns 2022-11-09 21:56:06 +01:00
Nik
764b86acc9 includes/std: Added section functions 2022-11-09 21:53:31 +01:00
Nik
10fdf94899 includes/std: Fixed syntax error 2022-11-09 21:25:01 +01:00
Nik
9ba998e618 includes/std: Added new functions 2022-11-09 21:21:59 +01:00
WerWolv
aceeb2b7b3 git: Don't build plcli tool in tests 2022-11-06 18:40:39 +01:00
fr0ntlin3
3b1b7cc379 patterns: Fixed ELF pattern for 32-bit files (#51)
Co-authored-by: z <z>
2022-11-06 18:36:37 +01:00
gmestanley
49be43e0e1 patterns: Making pe.hexpat even better (#52)
* Update pe.hexpat

Implementing a number of things and fixing others

* Update pe.hexpat

Adding the readonlyData pattern

* Update pe.hexpat

Testing putting the number of tabs on Github to 4 instead of 8 (so that comments on the code for the Sections don't break)

* Update pe.hexpat

Reverting change that turned out to be needless

* Update pe.hexpat

Actually sending the `products[while($ != richHeaderEndPosition)]` to `products[while($ < richHeaderEndPosition)]` change
2022-10-30 12:07:54 +01:00
Nik
8e70a5524d includes/type: Added templates for number types with specific base ImHex-v1.24.3 2022-10-10 22:36:46 +02:00
Nik
9c0bf1433c includes/std: Added new Array and SizedString type 2022-10-10 22:36:09 +02:00
Nik
43afbfa120 includes/type: Made size and float16 types more generic ImHex-v1.24.2 2022-10-09 17:38:05 +02:00
Nik
f75703fd2b includes/std: Added MagicSearch and Reinterpreter helper type 2022-10-09 17:37:37 +02:00
Nik
16eebea2fb patterns: Added USB Descriptor pattern ImHex-v1.24.1 2022-10-09 12:46:29 +02:00
Florian Limberger
6cb208d975 patterns: Added pattern for ID3 tags (#48)
* Add naive first implementation of ID3 patterns

* Refine string handling a bit

* Optimize structs using the static keyword

* Add MIME type pragma and update README
2022-10-09 12:26:34 +02:00
Nik
665c50b914 patterns: Fixed minidump pattern formatting 2022-10-08 11:20:46 +02:00
Nik
04ef9d6085 includes/type: Fixed copy-paste error in float16 type ImHex-v1.24.0 2022-10-03 14:14:35 +02:00
Nik
dc5b219d24 includes/type: Fixed duplicate type definition in 010 types library 2022-10-03 10:51:43 +02:00
Nik
e6c800b71c includes/type: Fixed missing preprocessor instructions in size type library 2022-10-03 08:37:05 +02:00
Nik
5c9a7b1ac0 includes/type: Display space optimized version of IPv6 addresses 2022-10-02 23:25:10 +02:00
Nik
22390d0adf includes/type: Fixed broken float16 type 2022-10-02 22:57:46 +02:00
Nik
dfc9b17067 includes/type: Fixed missing include in color include 2022-10-02 21:55:48 +02:00
Nik
d33fdfafb8 git: Added links to all the files mentioned in the readme 2022-10-02 18:36:46 +02:00
Nik
58d63d1d4a includes/hex: Fixed mangled name format function 2022-10-01 21:53:41 +02:00
Nik
86f38ca545 includes/type: Added new color types 2022-09-30 14:52:30 +02:00
Nik
27d98d4552 includes/hex: Added support for new demangle function 2022-09-30 14:52:21 +02:00
Nik
dba93afe06 patterns: Fixed duplicate variable names 2022-09-21 16:34:23 +02:00
Nik
5481c2ff6a includes/std: Made relevant std::core functions take patterns as reference ImHex-v1.23.2 ImHex-v1.23.1 ImHex-v1.23.0 2022-09-15 14:30:01 +02:00
Nik
efa9957935 git: Disable ci sanitizers again for now 2022-09-15 14:29:37 +02:00
Nik
073768fec3 includes/std: Fix passing std::file::Mode enum to builtin function 2022-09-15 11:39:17 +02:00
WerWolv
ceb322019c git: Fix CI command line 2022-09-14 15:12:59 +02:00
WerWolv
befd05f8dd tests: Enable sanitizers on unit tests 2022-09-14 15:11:17 +02:00
Nik
6a1abd8fec git: Look for coverage information in correct folder 2022-09-14 15:01:44 +02:00
Nik
b2ebbc6d66 git: Added coverage checking to tests 2022-09-14 14:56:52 +02:00
Nik
24c003b333 tests: Disable imhex checks in unit tests 2022-09-14 14:29:12 +02:00
Nik
caea4544ef includes/hex: Added library files 2022-09-14 14:01:54 +02:00
Nik
36b107f0ca includes/hex: Added imhex support library 2022-09-14 14:01:28 +02:00
Nik
6367f434ab includes: Removed old types library files 2022-09-14 14:01:15 +02:00
Nik
2cfd3c43a7 patterns: Added x-dosexec MIME type to PE pattern 2022-09-13 15:57:34 +02:00
Nik
4bda291de1 patterns: Added minidump pattern 2022-09-13 13:26:50 +02:00
Nik
ce542887c4 includes/type: Added aliases for builtin types 2022-09-11 21:53:18 +02:00