I don't understand the question. :)
https://docs.microsoft.com/en-us/pow...w=powershell-7
Also, it's just what I'm familiar with. And it has pretty good support for XML, so parsing XDFs was easy.
I don't understand the question. :)
https://docs.microsoft.com/en-us/pow...w=powershell-7
Also, it's just what I'm familiar with. And it has pretty good support for XML, so parsing XDFs was easy.
I did not realize it was ported to Linux. Never used it on anything but Windows.
Also as a note, I'm jlvaldez over on pcmhacking, didn't keep my names the same. I'd change them to be consistent if it were possible lol.
Anyway, I started writing a new script for Ghidra to import the .csv files that it exports symbols in. No idea why it cannot import its own exports out of the box... Anyway, it's not complete, not close to complete, but I got to call it a night and figured it'll get someone going.
The path to install it is <Ghidra_root>/Features/Python/ghidra_scripts/
Then go to Window -> Script Manager, select "ImportSymbolsCSV.py" and run it, select a .csv file (I zipped an example .csv file that has 2 symbols for some P59 OS I have). It successfully adds the symbols and changes the data type. This may be something I should get up on some GitHub repository..
Here's the API I was referring to. Apparently the python interpreter implements jython as well so the APIs are visible to python. Kinda cool.
From some comments I found on GitHub, FlatProgramAPI and GhidraScript are the two classes that get imported automatically. Seems to be an early python implementation too. Python 2.7ish? 3+ syntax is not working for it.
https://ghidra.re/ghidra_docs/api/gh...rogramAPI.html
Last edited by jonofmac; 01-13-2020 at 08:58 AM.
This script will produce a CSV file with all of the names and addresses from an XDF.
This script, with this PidList.txt file, will generate labels for the functions that get the values of all of the pids. I've also included output for the '2156 bin file that I have, however I'm not sure I used the right number of parameters when I ran the script.
I ran it like this:
.\Generate-PidLabels.ps1 -Path .\12212156.bin -TableAddress 1F64 -ParameterCount 308 > pidlabels.csv
Bookmarks