1
0
mirror of synced 2024-11-15 03:27:40 +01:00
Commit Graph

397 Commits

Author SHA1 Message Date
WerWolv
15e38e1012 ux: Added save pattern option to File menu 2021-12-12 00:52:54 +01:00
WerWolv
8a36897fd9 provider: Added raw disk provider 2021-12-12 00:42:12 +01:00
WerWolv
3e736b36b6 api: Refactored providers to allow for loading interfaces and config views 2021-12-12 00:41:44 +01:00
WerWolv
2e90abd2c5 patterns: Fix indexing of static arrays 2021-12-10 18:53:19 +01:00
WerWolv
fb99674217 lang: Added missing localization, changed pattern editor lang keys 2021-12-10 18:00:43 +01:00
WerWolv
e3106eaa2a ux: Use native APIs to open websites to prevent terminal from appearing 2021-12-10 16:10:34 +01:00
WerWolv
8f2e382c8a patterns: Added std::env and ability to pass parameters to patterns from the UI 2021-12-10 11:55:27 +01:00
WerWolv
6a0ad22774 fix: Inconsistent provider address reading 2021-12-09 21:10:24 +01:00
WerWolv
2ac6348fbf ui: Welcome screen, GDB Provider and memory editor ui fixes 2021-12-08 22:18:59 +01:00
WerWolv
ea4f4c45cb sys: std::jthread -> std::thread to support libc++ 2021-12-07 23:36:28 +01:00
WerWolv
808b051a3e sys: Fixed sockets compiling on MacOS 2021-12-07 23:21:07 +01:00
WerWolv
c55146a78c sys: Fix sockets compiling on Unix 2021-12-07 23:09:30 +01:00
WerWolv
cc5a437573 provider: Added basic GDB Server provider 2021-12-07 22:47:57 +01:00
WerWolv
4a53717676 sys: Moved all views to builtin plugin 2021-12-07 22:47:41 +01:00
WerWolv
c2d1589e74 patterns: Fixed variable access inside pointer pattern yielding invalid results 2021-12-05 21:54:09 +01:00
WerWolv
e720b61df6 patterns: Fix casts unexpectedly increasing cursor position 2021-12-03 16:06:40 +01:00
WerWolv
19b80a1c2d
build: Who is that? 2021-12-03 09:24:41 +01:00
WerWolv
a000b1a2fe common: Added missing include 2021-12-03 00:00:25 +01:00
qdlmcfresh
0da31b6bbb
ui: Add result count to string view (#353)
* Add result count to string view

* Localization

* formating and logic fix
2021-11-30 21:02:37 +01:00
WerWolv
9340c8aae3 patterns: Fixed placed signed integers not being sign extended correctly 2021-11-27 14:34:59 +01:00
WerWolv
9158d79126 patterns: Don't display strings with zero length. Fixes crash 2021-11-27 14:02:14 +01:00
WerWolv
ded452fdfc patterns: Allow functions to be called inside structs 2021-11-27 12:57:59 +01:00
RADICS Áron
467e9d1463
Tests for the CRC and hash algorithms (#335)
* Update TEST_ASSERT to do nothing if condition is true

The TEST_ASSERT should not return if the condition is true, because:
- it prevents the usage of multiple TEST_ASSERT in a single test case,
- that behavior differs from how the assert in the standard library
works, and thus may give unexpected results.

Make the TEST_ASSERT to print an error message (with an formatted
optional user part) when it fails to make debugging easier.

* Fix some bugs in TestProvider, add unit tests

Use pointer-to-vector in TestProvider so writes can be tested, too.

* Add test EncodeDecode16, fix some encode16 bugs

The function mbedtls_mpi_write_string needs a bit longer buffer than the
resulting string actually will be.

Known bug: mbedtls_mpi_read_binary ingores initial null bytes

* Add test EncodeDecode64, fix some bugs

The functions mbedtls_base64_encode and mbedtls_base64_decode needs a
bit longer buffer than the resulting string actually will be.

* Remove check for empty data from TestProvider

It can be valid to get the hash of empty string.

* Add tests for CRC calculation

Two type of thests:
- compare the result of the CRC calculation to a known to be good
results,
- generate random data as message, calculate of it's CRC and append that
to the message, the CRC of this new data should be 0.

* Add test for hash algorithms

* Add includes in tests

* Remove the use of C++20 ranges

It seems that Apple Clang does not support range-based constrained
algorithms at this time.

* Replace encode16 implementation

To encode the zero bytes at the begining of the input vector, too.
2021-11-26 22:14:44 +01:00
qdlmcfresh
372908ba9d
add regex filter in string view (#345)
* Filter by regex in string view

* Dont recompile the regex for every string, display error message

* localization

* Use data->Buf for pattern creation / searching
The filter string seems to get updated after the callback finished.
Therefore the search string was always 1 character behind the actual
string in the textfield when calling find() / creating the regex.
2021-11-25 08:46:42 +01:00
WerWolv
aa527ba29b patterns: Fixed double free crash 2021-11-21 00:48:07 +01:00
xtex
9e808f3ecd
Update zh_CN.cpp (#343) 2021-11-12 13:10:48 +01:00
qdlmcfresh
2e3c43ad9e
Fix buffer sizes of PatternDataString16 (#339) 2021-11-11 13:24:01 +01:00
WerWolv
594a6c1c0f patterns: Remove null bytes before displaying/printing string patterns 2021-11-10 14:45:26 +01:00
WerWolv
434de44ef5 yara: Added support for displaying variable names 2021-11-04 20:41:56 +01:00
WerWolv
1c1396bf4b patterns: Added ability to format patterns as strings.
This adds support for printing char16 strings
2021-11-04 20:41:56 +01:00
WerWolv
673d43b526 sys: Fixed copy-paste error 2021-10-31 16:36:45 +01:00
WerWolv
c88053a575 windows: Added context menu entry option
Closes #333
2021-10-31 16:28:10 +01:00
WerWolv
1f250e87a3 patterns: Added support for changing pointer endian 2021-10-31 15:20:19 +01:00
WerWolv
cd89b55f5b patterns: ASTNode and LogConsole cleanup 2021-10-31 15:06:48 +01:00
RADICS Áron
a6b8597f5a
Fix CRC and hash calculations (#321)
* Fix CRC calculation, add more CRC parameters

Use the Boost CRC module to calculate the CRC values.
Add options for final xor value, reflectIn and reflectOut.
Fixes #320

* Cleanup Hash view combo box, add CRC8

* Use offset/size consistently

* Cleanup: unify processing data by chunks

* Change CRC algorithm back, drop boost dependency

This is mostly the original algorithm, with a few fixes and small
additions (support for reflect In / Out, final XOR value).

* Use size_t for file read size consistently
2021-10-26 17:21:48 +02:00
WerWolv
c95e12c136 ui: Increased maximum FPS limit to 200FPS, added unlocked FPS setting
Closes #329
2021-10-23 12:59:13 +02:00
WerWolv
d6f9ec3f8f tests: Improved pattern unit tests 2021-10-20 11:06:24 +02:00
WerWolv
9ccfadfb54 sys: Fixed uninitialized variable 2021-10-20 10:35:26 +02:00
WerWolv
8b6de30e92 ui: Fixed invalid call to ImGui::EndChild causing crashes sometimes 2021-10-20 10:05:20 +02:00
WerWolv
6408741733 sys: Fixed changeEndianess function being completely broken for non-integers 2021-10-20 10:04:52 +02:00
WerWolv
7562e8b172 patterns: Fixed #include not properly searching all include folders 2021-10-19 21:42:04 +02:00
WerWolv
929437c159 patterns: Added global variables 2021-10-19 18:33:59 +02:00
WerWolv
1b66c84303 patterns: Fixed [[name]] attribute setting variable name instead of display name 2021-10-18 09:57:26 +02:00
WerWolv
9b1c09818c patterns: Fixed accessing global scope items through the parent keyword 2021-10-17 21:49:33 +02:00
WerWolv
46ba46ce9d
build/plugins: Added initial support for Rust plugins (#327)
* build: Added initial support for Rust plugins

* github: Install correct rust version

* github: Fixed rustup command

* github: Fix swapped win/linux commands

* github: Install linux rust toolchain on Linux

* github: Add rustup parameters to correct command

* build: libimhex-rust -> hex

* rust-plugins: Disable optimization to export functions correctly

* build: Use cdylib instead of dylib

* build: Fixed rust building and artifact copying

* build: Fixed installing plugins

* build: Fix copying and installing on Windows

* github: Added windows debugging

* github: Use curl instead of wget

* github: Added debug on failure

* github: Update path variable with rust toolchain path

* build/github: Set rust location so cmake can find it

* build: Remove leftovers

* api: Added rust wrappers for the ImHexAPI

* rust: Fixed compile flags with older gcc/clang

* build: Enable concepts for cxx.rs

* build: Explicitly set compiler for cxx.rs

* rust: Added imgui-rs to libimhex-rust

* rust: Export functions with double underscore prefix on mac

* rust: Export functions adjusted for ABI

* Add Rust target folder to gitignore

* Add vendored imgui-rs copy

* Add Context::current() to vendored imgui-rs

* Fix libimhex not exporting cimgui symbols

* Simplify plugin export mangling

* build: Fixed cimgui linking

* build: Only specify --export-all-symbols on Windows

* Add context setting to Rust plugins

* rust: Cleanup

* deps: Update curl

Co-authored-by: jam1garner <8260240+jam1garner@users.noreply.github.com>
2021-10-16 11:37:29 +02:00
WerWolv
3e5d6cf88c patterns: Added padding expressions in bitfields.
Closes #326
2021-10-14 20:28:21 +02:00
WerWolv
b12cd66679 patterns: Make global scope available for use in custom types 2021-10-11 22:01:15 +02:00
WerWolv
aac1a37a3f patterns: Limit number of characters displayed in a string pattern 2021-10-11 20:59:14 +02:00
WerWolv
140234aef3 patterns: Fixed using declaration parsing 2021-10-10 15:38:58 +02:00
WerWolv
ec9715f326 patterns: Added for loops 2021-10-10 13:47:48 +02:00