{"id":21820513,"url":"https://github.com/smx-smx/ghidrascriptproject","last_synced_at":"2026-05-05T14:03:59.504Z","repository":{"id":73708644,"uuid":"458880190","full_name":"smx-smx/GhidraScriptProject","owner":"smx-smx","description":"Example skeleton to create self contained Ghidra Scripts ","archived":false,"fork":false,"pushed_at":"2024-01-11T22:45:15.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T07:24:51.523Z","etag":null,"topics":["ghidra","java","kotlin","maven","osgi","script"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smx-smx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-13T17:26:45.000Z","updated_at":"2024-03-31T15:36:54.000Z","dependencies_parsed_at":"2024-01-12T02:18:42.023Z","dependency_job_id":null,"html_url":"https://github.com/smx-smx/GhidraScriptProject","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smx-smx%2FGhidraScriptProject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smx-smx%2FGhidraScriptProject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smx-smx%2FGhidraScriptProject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smx-smx%2FGhidraScriptProject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smx-smx","download_url":"https://codeload.github.com/smx-smx/GhidraScriptProject/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244783158,"owners_count":20509900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ghidra","java","kotlin","maven","osgi","script"],"created_at":"2024-11-27T16:34:54.958Z","updated_at":"2025-10-26T14:35:44.073Z","avatar_url":"https://github.com/smx-smx.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## GhidraScriptProject\nThis project illustrates how to (ab)use Ghidra to run precompiled scripts from external .jar files.\n\n### Features\nThis project enables you to write Ghidra Scripts using your favourite IDE, using any additional library from maven and/or\nany maven build plugin.\n\nThis in turn makes it possible to use Kotlin, Scala, or any other JVM language.\n\n\n### Usage\n\n#### 1. Install the archetype after cloning this repository\n```console\nmvn install\n```\n\n#### 2. Generate a new project\nRun the following command, replacing the variables with your desired values\n\n**IMPORTANT**: Set ${ghidra_path} to your Ghidra installation directory\n```console\nmvn archetype:generate \\\n\t-DarchetypeGroupId=com.smx \\\n\t-DarchetypeArtifactId=ghidra-script \\\n\t-DarchetypeVersion=1.0-SNAPSHOT \\\n\t-DinteractiveMode=false \\\n\t-DoutputDirectory=${project_output_directory} \\\n\t-DgroupId=\"${project_group_id}\" \\\n\t-DartifactId=\"${project_artifact_id}\" \\\n\t-Dversion=\"${project_version}\" \\\n\t-DghidraPath=\"${ghidra_path}\"\n```\n\n#### 3. Build the generated project\n```console\ncd \"${project_output_directory}/${project_artifact_id}\"\nmvn package\n```\n\n#### 4. Load the generated Jar in Ghidra.\n![img01](https://github.com/smx-smx/GhidraScriptProject/assets/1978844/83034e51-828e-44e4-a37b-d21fa9330f33)\n\nIt should appear highlighted in green in the Scripts Manager, indicating it was loaded successfully\n\n![img02](https://github.com/smx-smx/GhidraScriptProject/assets/1978844/20e8fbd2-9713-4062-93d1-1ec8d7ad0343)\n\n\nIf it fails loading, make sure any Maven Dependency is either embedded in the produced JAR (done by default in the generated project with `maven-shade-plugin`) or provided as an OSGI bundle \n\n#### 5. Install the \"launcher\" Ghidra script (only for the first time)\nCopy `./src/main/java/InvokeBundleScript.java` to your Ghidra scripts directory, e.g. `$HOME/ghidra_scripts`\n\n#### 6. Run the launcher script\nRun `InvokeBundleScript` from the Scripts Manager, and choose the script class from the loaded bundle\n\n![img03](https://github.com/smx-smx/GhidraScriptProject/assets/1978844/9211fdea-18fa-409a-9304-4e215c6bc598)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmx-smx%2Fghidrascriptproject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmx-smx%2Fghidrascriptproject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmx-smx%2Fghidrascriptproject/lists"}