Performing analysis on imported or existing binaries
As mentioned in the previous section, analysis is performed by default when creating a project. On the other hand, you can also run pre-/post-scripts (these kinds of scripts will be discussed later in this section) and/or analyze a given project using the following parameter:
-process [<project_file>]
As an example, you can perform an analysis of the hello_world.exe
file located in MyFirstProject
:
C:\ghidra_9.1.2\support> analyzeHeadless.bat C:\Users\virusito\projects MyFirstProject -process hello_world.exe
Of course, you can also use wildcards and/or the -recursive
flag when executing this command:
C:\ghidra_9.1.2\support> analyzeHeadless.bat C:\Users\virusito\projects MyFirstProject -process '*.exe'
Note
When importing files, make sure that the specified project is not already open in the Ghidra GUI.
Also take into account that when importing in bulk, files starting with .
are ignored...