hexreplace

command module
v0.0.0-...-3725e54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

hexreplace is a tool to patch binary file with hex string. Usage: hexreplace <file path> <frida new name> Example: hexreplace /Users/xxx/Desktop/frida-ios-dump/FridaGadget.dylib frida Author: suifei@gmail.com Github: https://github.com/suifei/fridare/tree/master/hexreplace Version: 2.2

changelog: - 2.2:

  • Added support for ELF and PE file formats
  • Added functions for describing architectures: describeMachOArch, describeELFArch, describePEArch
  • Modified buildReplacements function to support different executable formats
  • Unified file detection and opening logic into detectAndOpenFile function
  • Refactored handleSignleArchitecture and handleMultipleArchitectures functions to handle different file formats

- 2.1:

  • Refactored the Replacements structure to support multiple sections:
  • Added a new 'SectionName' field to the Replacements struct
  • Changed 'Replacements' to contain an 'Items' slice of Replacement structs
  • Modified the buildReplacements function to return a slice of Replacements, allowing for multiple section definitions
  • Updated handleSignleArchitecture and patchArchitecture functions to process multiple sections:
  • Now iterates through all defined sections in the Replacements slice
  • Applies replacements to each specified section individually
  • Adjusted the replaceInSection function to accept a slice of Replacement structs
  • Improved error handling and logging:
  • Added more detailed error messages for each section processing step
  • Included section names in log messages for better traceability
  • Enhanced code flexibility and extensibility:
  • Made it easier to add new sections for replacement in the future
  • Improved code organization by grouping replacement rules by section

- 2.0: support multiple architectures, add more ARM and ARM64 subtypes, add more replacements, macho.File.Section() returns a pointer to macho.Section, add more error handling - 1.0: initial version

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL