# Headless Analyzer

The Headless Analyzer is a command-line-based (non-GUI) version of Ghidra that allows users to:

> - Create and populate projects
> - Perform analysis on imported or existing binaries
> - Run non-GUI scripts in a project (scripts may be program-dependent or program-independent)

The Headless Analyzer can be useful when performing repetitive tasks on a project (i.e., importing and analyzing a directory of files or running a script over all binaries).

## Headless Analyzer Options

> The following options are available for the Headless Analyzer:

> > analyzeHeadless [<project_location> <project_name>[/<folder_path>]] |
> > [ghidra://<server>[:<port>]/<repository_name>[/<folder_path>]]
> > [[-import [<directory>|<file>]+] | [-process [<project_file>]]]
> > [-preScript <ScriptName> [<arg>]*]
> > [-postScript <ScriptName> [<arg>]*]
> > [-scriptPath "<path1>[;<path2>...]"]
> > [-propertiesPath "<path1>[;<path2>...]"]
> > [-scriptlog <path to script log file>]
> > [-log <path to log file>]
> > [-overwrite]
> > [-recursive [<depth>]]
> > [-readOnly]
> > [-deleteProject]
> > [-noanalysis]
> > [-processor <languageID>]
> > [-cspec <compilerSpecID>]
> > [-analysisTimeoutPerFile <timeout in seconds>]
> > [-keystore <KeystorePath>]
> > [-connect [<userID>]]
> > [-p]
> > [-commit ["<comment>"]]
> > [-max-cpu <max cpu cores to use>]
> > [-librarySearchPaths <path1>[;<path2>...]]
> > [-loader <desired loader name>]

## Accessing the Headless Analyzer

- The shell script that launches the Headless Analyzer can be found in your Ghidra installation's support folder.

> > ghidra_x.x/support/analyzeHeadless[.bat]

- Execute the analyzeHeadless shell script from the command line with the desired options.

## Headless Analyzer Documentation

- The analyzeHeadlessREADME.html file contains details on Headless Analyzer usage and options. It is located in your Ghidra installation's support folder.

> > ghidra_x.x/support/analyzeHeadlessREADME.html