Skip to content

A Ghidra script to improve decompiled code readability by re-writing it (Using DeepSeek) in a better way, Along with renaming/assigning variables based on their usage.

License

Notifications You must be signed in to change notification settings

Zeyad-Azima/GhidraDeepSeekDecomprove

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

GhidraDeepSeekDecomprove

The GhidraDeepSeekDecomprove.py is a Ghidra script designed to enhance the readability of decompiled code by leveraging the DeepSeek Chat API. It intelligently renames variables based on their usage and optionally adds explanatory comments to the code. Integrated seamlessly into Ghidra, the script allows users to select specific functions, improve their decompiled output, and either save the results to a file or display them in a popup window with options to copy the code. It handles errors gracefully, such as failed decompilation or API issues, and provides feedback through Ghidra's logging system. The script is customizable, supporting different DeepSeek models and output configurations, making it a valuable tool for reverse engineers and security researchers aiming to streamline their workflow and improve code understanding.

Comparing

image

Usage

  • Add your DeekSeek API key deepSeekApiKey = "your_deepseek_api"
  • Go to Window > Script Manager
  • Choose Create New Script

Screenshot 2025-01-26 at 4 22 39 AM

  • Then Jython, Enter the script name and finally, Paste and save the code.
  • Mark the In Tool check box. So, You can have quick access to it through the tools bar.

Screenshot 2025-01-26 at 4 26 34 AM

Screenshot 2025-01-26 at 4 28 29 AM

Video

enhance the readability of decompiled code

About

A Ghidra script to improve decompiled code readability by re-writing it (Using DeepSeek) in a better way, Along with renaming/assigning variables based on their usage.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages