NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
51.01k stars 5.81k forks source link

Readable CFStrings in decompile view #592

Open dukebarman opened 5 years ago

dukebarman commented 5 years ago

Is your feature request related to a problem? Please describe.

Now, CFStrings in macho binaries isn't comfortable for reading in decompile code:

...,"setHTTPMethod:",&cf_POST);
...,"setValue:forHTTPHeaderField:",&cf_text/xml,&cf_Content-Type);
...,"setValue:forHTTPHeaderField:",&cf_no-cache,&cf_Cache-Control);

Describe the solution you'd like

Want to more readable CFStrings in decompile view for macho binaries. For example, like in IDA:

..., "setHTTPMethod:", CFSTR("POST"));
..., "setValue:forHTTPHeaderField:", CFSTR("text/xml"), CFSTR("Content-Type"));
..., "setValue:forHTTPHeaderField:", CFSTR("no-cache"), CFSTR("Cache-Control"));

Demo strings from default macos Calculator.app

hexploitable commented 4 years ago

This would be a great enhancement. Especially from an API perspective, getting the constant and not the label would be ideal.

hexploitable commented 4 years ago

Nudge.