1
0
mirror of synced 2024-12-04 20:17:57 +01:00
ImHex/plugins/builtin/include/content
Truman Kilen 5c84ef5f72
feat: Added Linux support to the Process Memory Provider (#1331)
<!--
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
<!-- Describe the bug that you fixed/feature request that you
implemented, or link to an existing issue describing it -->
Implement a Linux backend for the ProcessMemoryProvider plugin.

### Implementation description
<!-- Explain what you did to correct the problem -->
Most of the provider code is the same between Windows and Linux. The
primary differences are:
- enumerate PIDs in `/proc/` to get the process list
- use `/proc/<PID>/cmdline` as the process name
- parse `/proc/<PID>/maps` to get the module list
- reading/writing from memory is done using
`process_vm_readv`/`process_vm_writev`

NOTE: `sudo setcap CAP_SYS_PTRACE=+eip build/imhex` must be run to give
the binary permission to read another process' memory. Running as root
user should also work but I would not recommend it.

### Additional things
The existing translations keys no longer match since I moved the plugin
from `windows` to `builtin`.

I'm not well versed in C++ so I attempted to keep my changes rather
simple. Feedback is very welcome.

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2023-12-07 23:33:15 +01:00
..
helpers build: Updated libwolv 2023-12-01 14:07:10 +01:00
pl_visualizers impr: Vastly improved 3D Visualizer (#1456) 2023-12-05 10:49:51 +01:00
popups impr: Make long running tasks not freeze ImHex, fix saving non-continuous providers 2023-12-05 14:32:43 +01:00
providers feat: Added Linux support to the Process Memory Provider (#1331) 2023-12-07 23:33:15 +01:00
views impr: Fix input field selection in command palette 2023-12-06 16:20:06 +01:00
command_line_interface.hpp feat: Added --hexdump subcommand 2023-12-05 16:45:35 +01:00
data_processor_nodes.hpp refactor: Split data processor nodes in several files (#1419) 2023-11-13 23:36:39 +01:00
global_actions.hpp impr: General code cleanup 2023-11-10 20:47:08 +01:00
recent.hpp feat: Draw info banner on welcome screen if one exists 2023-11-17 15:54:38 +01:00
tools_entries.hpp refactor: Move tools to correct namespace, move data processor nodes 2023-12-01 13:53:51 +01:00