Commit Graph

22 Commits

Author SHA1 Message Date
WerWolv fbde2942de build: Refactor ContentRegistry into multiple separate files 2025-08-14 21:22:03 +02:00
WerWolv 9cff9043ee impr: Remove hex::format, improve format and logging type safety 2025-08-06 20:02:23 +02:00
Stephen Hewitt f729d36214
fix: Crash when sorting for value fields in pattern data view, fix HTML export encoding (#2242)
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->

### Problem description
This is a fix for the ImHex bug "ImHex crashes when analysing any PE
file #2221"

### Implementation description
This is a fix for the ImHex bug "ImHex crashes when analysing any PE
file #2221". The fix requires changes to the Pattern Language and the
ImHex UI. Revision would be wise. We want to avoid collateral damage.
It's a big code base and I'm new to it and the compilers/build-systems
used. And the bug is complex and low-level. I suspect this will fix
other random crashes. The problem is caused by two issues:
- The std::sort algorithm conjuring up garbage due to the sorting
criteria not being a strict weak ordering. See
[this](https://github.com/Voultapher/sort-research-rs/blob/main/writeup/sort_safety/text.md)
link.
- We sort shared_ptr&lt;ptrn::Pattern&gt; by pointer value, and the
object is a clone. In essence we're changing the values as we're
sorting.
 
Fixes #2221

### IMPORTANT
I'm not sure how "plugins/builtin/source/content/data_formatters.cpp"
got into the PR. Been trying for an hour to rectify. I'm not a Git
expert (the last time I used source control seriously SourceSafe was a
thing) please ignore that file. It's a fix for another PR I submitted. I
suspect I stuffed up the branching and merging.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2025-05-17 20:50:21 +00:00
WerWolv 0ae823716a feat: Added a preview to the Edit -> Copy as options
Closes #2026
2024-12-30 23:16:11 +01:00
WerWolv 0be539b8a5 feat: Added option to copy data as escaped string
#2026
2024-12-25 16:45:34 +01:00
SparkyTD 9b594d81bd
feat: Added CSV, TSV and JSON as export options for Find results (#1673)
### Problem description
The default result export functionality of the Find tool is limited to
only exporting data in a nonstandard text format. This PR adds support
for exporting the results in CSV, TSV or JSON format. The PR also
removes the old format.

### Implementation description
I added the classes `ExportFormatter`, `ExportFormatterCsv`,
`ExportFormatterTsv` and `ExportFormatterJson`, with similar
implementations to the pattern data exporters.

~~I also moved the `ViewFind::Occurrence` class into
`hex/helpers/types.hh`, so the exporters can access it.~~

### Screenshots

![image](https://github.com/WerWolv/ImHex/assets/45818400/c7a1016b-6494-416d-a963-86484952837c)

### Additional things
Another small change I made is moving the "{} entries found" line on the
same line as the Search and Reset buttons. I think it looks cleaner this
way, but if anyone disagrees, I can revert it.

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2024-06-18 20:57:55 +00:00
Nik 095da62250
feat: Add Markdown Report export option (#1441) 2023-11-22 07:26:31 +00:00
WerWolv 0f5d659ce2 impr: Fade out zero bytes in HTML formatted data 2023-11-09 14:42:29 +01:00
WerWolv f94c23d64d fix: Copy As -> Go Array producing syntactically invalid code
Fixes #1391
2023-10-26 17:13:59 +02:00
Nik e77f138514
feat: Added Achievements (#1230)
This PR adds Achievements to ImHex that serve as both a guide and a fun
way to learn more about ImHex and reverse engineering
2023-08-06 21:33:15 +02:00
WerWolv 0dafb3d230 sys: Replaced many helper functions with libwolv 2023-03-12 18:27:33 +01:00
WerWolv c861bf9a5e fix: Copying strings and bad names 2023-01-28 21:12:08 +01:00
WerWolv 59a04e6dbf fix: Copy-As python array having a semicolon at the end 2022-09-18 15:05:56 +02:00
WerWolv bf00503d1f fix: BufferedReader messing up the second to last byte 2022-09-16 08:30:28 +02:00
WerWolv 75047e26e2 feat: Added various new Copy as... options 2022-09-13 23:48:47 +02:00
WerWolv d1468984e7 fix: Copy as... -> ASCII Art inserting too much whitespace 2022-09-13 22:02:57 +02:00
WerWolv 91160b4311 fix: Copy as... function sometimes producing invalid results
Fixes #738
2022-09-09 20:13:49 +02:00
WerWolv 0462cc3d0c
sys: Enable -Wall, -Wextra, -Werror and fix all warnings on all Platforms (#483)
* sys: Make ImHex compile with -Wall -Wextra -Werror

* sys: Fixed various build errors on Linux

* sys: Explicitly ignore return value of `system` function

* sys: More fixes for the warnings GitHub Actions enables somehow

* sys: More fixes

* sys: Remove -Werror again to see all GitHub Actions warnings

* sys: Hopefully fixed all remaining warnings

* sys: Added back -Werror

* git: Change windows icon in GitHub Actions
2022-03-27 00:01:28 +01:00
WerWolv b3728ae658 ui/ux: hexeditor -> hex_editor, Improved performance and flickering when highlighting bytes 2022-02-06 21:02:31 +01:00
WerWolv ce59226909 sys: Reformat all 2022-02-01 22:09:44 +01:00
WerWolv 0e08b0226b sys: Added clang-format file, formatted entire project 2022-01-24 20:53:17 +01:00
WerWolv 1f8c9b9f71 api: Move copy-as data formatting code to builtin-plugin, add api for it 2022-01-13 00:27:31 +01:00