Running BSim Search and retrieving the results headlessly. #6299
-
BSim command line docs only shows how to create a database and sigs and committing the sigs but I can't seem to find a way to run the BSim search itself. So I was wondering if anyone knows a way to do it. I want to automate the search process and exporting the results. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
There's a BSim tutorial you might want to check out, as well as a BSim entry in the Ghidra help. The BSim tutorial briefly mentions scripting BSim and shows where to find example scripts. |
Beta Was this translation helpful? Give feedback.
-
The URL for the h2 database must begin with "file:/". Perhaps you are just entering the path and that "c" is from "C:"? |
Beta Was this translation helpful? Give feedback.
Yes, that script can run with an H2 BSim database. Assuming you want to run it over a non-shared Ghidra project that already has analyzed files in it, the command would be:
Your understanding of an overview query is correct. If you want to do a regular query you'll have to modify the script accordingly. One change is that you'll have to specify which functions you want to query (that step isn't needed for an overview query since it always queries all functions in a program).