A Calculator plugin for Ghidra that adds a GUI calculator and right-click options for adding addresses, memory, and constant values to the calculator, as well as options for calculating distance between addresses.
Supports Ghidra 11.3 and later
- Multi-base Display: Simultaneous hex, decimal, binary, and octal display
- Clickable Binary Display: Click on individual bits to flip from 0 to 1 and vice versa
- Input Mode Switching: Switch between hex/dec/bin/oct input modes
- Standard Operations: Addition, subtraction, multiplication, division, modulo, flip sign, 2's complement conversion, endian swapping
- Bitwise Operations: AND, OR, XOR, NOT, NOR, Rotate, Shift
- Collapsable Extras Panel: Collapsable extras panel with quick operations and hash calculations
- Quick Increment/Decrement: ±1, ±2, ±4, ±8, ±32, ±0x10, ±0x100, ±0x1000 buttons
- Hash Calculations: Calculate 28 different hash types for a range of memory
- Value Marking: Mark and recall values
- History Window: See previous calculations
- Double-click to jump to resulting address if it's a valid address
- Load result into calculator
- Context Menu Integration:
- Right-click in disassembler to:
- Add addresses to calculator
- Add memory values to calculator
- Add scalar operands to calculator
- Mark addresses for distance calculation
- Mark values for comparison operations
- Perform addition, subtraction, and xor'ing of marked values
- Calculate hashes for a selection of memory
- Right click in decompiler to:
- Add constants to calculator
- Mark constants
- Right-click in disassembler to:
Submit new feature ideas as a Github issue and I will implement them!
- Open Ghidra
- Go to File → Install Extensions...
- Click the "+" button (Add Extension)
- Select the release zip file
- Click OK to install
- Restart Ghidra when prompted
- After Ghidra restarts, go to File → Configure → Plugins
- Search for "Calculator"
- Check the box next to "CalculatorPlugin"
- Click OK
- The Calculator and history windows should appear, but if not, follow step 3
- Go to Window → Calculator and click on Calculator
- Go to Window → Calculator and click on Calculator History
- The calculator and history windows will appear and can be docked anywhere