ADD week 4
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								03-Average1/A1-vscode/.gradle/8.5/checksums/checksums.lock
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								03-Average1/A1-vscode/.gradle/8.5/checksums/checksums.lock
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								03-Average1/A1-vscode/.gradle/8.5/fileHashes/fileHashes.lock
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								03-Average1/A1-vscode/.gradle/8.5/fileHashes/fileHashes.lock
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -0,0 +1,2 @@ | ||||
| #Sun Mar 16 11:54:07 CET 2025 | ||||
| gradle.version=8.5 | ||||
							
								
								
									
										56
									
								
								03-Average1/A1-vscode/.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								03-Average1/A1-vscode/.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,56 @@ | ||||
| { | ||||
|   "version": "0.2.0", | ||||
|   "configurations": [ | ||||
|     { | ||||
|       "type": "java", | ||||
|       "name": "Ghidra", | ||||
|       "request": "launch", | ||||
|       "mainClass": "ghidra.Ghidra", | ||||
|       "args": "ghidra.GhidraRun", | ||||
|       "classPaths": [ | ||||
|         "/opt/ghidra/Ghidra/Framework/Utility/lib/Utility.jar" | ||||
|       ], | ||||
|       "vmArgs": [ | ||||
|         "-Dghidra.external.modules=${workspaceFolder}", | ||||
|         "-Djava.system.class.loader=ghidra.GhidraClassLoader", | ||||
|         "-Dfile.encoding=UTF8", | ||||
|         "-Duser.country=US", | ||||
|         "-Duser.language=en", | ||||
|         "-Duser.variant=", | ||||
|         "-Dsun.java2d.opengl=false", | ||||
|         "-Djdk.tls.client.protocols=TLSv1.2,TLSv1.3", | ||||
|         "-Dcpu.core.limit=", | ||||
|         "-Dcpu.core.override=", | ||||
|         "-Dfont.size.override=", | ||||
|         "-Dpython.console.encoding=UTF-8", | ||||
|         "-Xshare:off", | ||||
|         "-Dsun.java2d.pmoffscreen=false", | ||||
|         "-Dsun.java2d.xrender=true", | ||||
|         "-Dsun.java2d.uiScale=1", | ||||
|         "-Dawt.useSystemAAFontSettings=on" | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "type": "debugpy", | ||||
|       "name": "PyGhidra", | ||||
|       "request": "launch", | ||||
|       "module": "pyghidra.ghidra_launch", | ||||
|       "args": [ | ||||
|         "--install-dir", | ||||
|         "/opt/ghidra", | ||||
|         "-g", | ||||
|         "ghidra.GhidraRun" | ||||
|       ], | ||||
|       "env": { | ||||
|         "PYGHIDRA_DEBUG": "1" | ||||
|       } | ||||
|     }, | ||||
|     { | ||||
|       "type": "java", | ||||
|       "name": "Ghidra Attach", | ||||
|       "request": "attach", | ||||
|       "hostName": "localhost", | ||||
|       "port": 18001 | ||||
|     } | ||||
|   ] | ||||
| } | ||||
							
								
								
									
										241
									
								
								03-Average1/A1-vscode/.vscode/settings.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										241
									
								
								03-Average1/A1-vscode/.vscode/settings.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,241 @@ | ||||
| { | ||||
|   "java.import.maven.enabled": false, | ||||
|   "java.import.gradle.enabled": false, | ||||
|   "java.import.gradle.wrapper.enabled": false, | ||||
|   "java.import.gradle.version": "8.5", | ||||
|   "java.format.settings.url": "/opt/ghidra/support/eclipse/GhidraEclipseFormatter.xml", | ||||
|   "java.project.sourcePaths": [ | ||||
|     "src/main/java", | ||||
|     "ghidra_scripts" | ||||
|   ], | ||||
|   "java.project.outputPath": "bin/main", | ||||
|   "java.project.referencedLibraries": { | ||||
|     "include": [ | ||||
|       "/opt/ghidra/Ghidra/Framework/Utility/lib/Utility.jar", | ||||
|       "/opt/ghidra/Ghidra/patch", | ||||
|       "/opt/ghidra/Ghidra/Framework/DB/lib/DB.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Docking/lib/Docking.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Emulation/lib/Emulation.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Emulation/lib/asm-9.7.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Emulation/lib/asm-analysis-9.7.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Emulation/lib/asm-commons-9.7.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Emulation/lib/asm-tree-9.7.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Emulation/lib/asm-util-9.7.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/FileSystem/lib/FileSystem.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/Generic.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/bcpkix-jdk15on-1.69.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/bcprov-jdk15on-1.69.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/bcutil-jdk15on-1.69.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/commons-collections4-4.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/commons-compress-1.21.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/commons-io-2.11.0.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/commons-lang3-3.12.0.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/commons-text-1.10.0.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/failureaccess-1.0.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/gson-2.9.0.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/guava-32.1.3-jre.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/jdom-legacy-1.1.3.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/log4j-api-2.17.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/log4j-core-2.17.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Graph/lib/Graph.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Graph/lib/jgrapht-core-1.5.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Graph/lib/jgrapht-io-1.5.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Graph/lib/jung-algorithms-2.1.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Graph/lib/jung-api-2.1.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Graph/lib/jung-graph-impl-2.1.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Graph/lib/jung-visualization-2.1.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Gui/lib/Gui.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Gui/lib/flatlaf-3.5.4.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Help/lib/Help.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Help/lib/javahelp-2.0.05.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Help/lib/timingframework-1.0.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Project/lib/Project.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Project/lib/xz-1.9.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Pty/lib/Pty.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Pty/lib/jna-5.14.0.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/Pty/lib/jna-platform-5.14.0.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/SoftwareModeling/lib/SoftwareModeling.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/SoftwareModeling/lib/antlr-runtime-3.5.2.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/SoftwareModeling/lib/isorelax-20050913.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/SoftwareModeling/lib/msv-20050913.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/SoftwareModeling/lib/relaxngDatatype-20050913.jar", | ||||
|       "/opt/ghidra/Ghidra/Framework/SoftwareModeling/lib/xsdlib-20050913.jar", | ||||
|       "/opt/ghidra/Ghidra/Configurations/Public_Release/lib/Public_Release.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/BSim/lib/BSim.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/BSim/lib/commons-dbcp2-2.9.0.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/BSim/lib/commons-logging-1.2.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/BSim/lib/commons-pool2-2.11.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/BSim/lib/h2-2.2.220.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/BSim/lib/postgresql-42.7.3.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/BSimFeatureVisualizer/lib/BSimFeatureVisualizer.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Base/lib/Base.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Base/lib/biz.aQute.bnd.util-7.0.0.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Base/lib/biz.aQute.bndlib-7.0.0.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Base/lib/org.apache.felix.framework-7.0.5.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Base/lib/org.osgi.util.promise-1.3.0.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Base/lib/phidias-0.3.7.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Base/lib/slf4j-api-1.7.25.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Base/lib/slf4j-nop-1.7.25.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/BytePatterns/lib/BytePatterns.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/ByteViewer/lib/ByteViewer.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/CodeCompare/lib/CodeCompare.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/DebugUtils/lib/DebugUtils.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Decompiler/lib/Decompiler.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/DecompilerDependent/lib/DecompilerDependent.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FileFormats/lib/AXMLPrinter2.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FileFormats/lib/FileFormats.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FileFormats/lib/baksmali-2.5.2.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FileFormats/lib/dex-ir-2.4.24.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FileFormats/lib/dex-reader-2.4.24.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FileFormats/lib/dex-reader-api-2.4.24.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FileFormats/lib/dex-translator-2.4.24.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FileFormats/lib/dexlib2-2.5.2.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FileFormats/lib/sevenzipjbinding-16.02-2.01.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FileFormats/lib/sevenzipjbinding-all-platforms-16.02-2.01.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FileFormats/lib/util-2.5.2.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FunctionGraph/lib/FunctionGraph.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FunctionGraphDecompilerExtension/lib/FunctionGraphDecompilerExtension.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/FunctionID/lib/FunctionID.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/GhidraGo/lib/GhidraGo.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/GhidraServer/lib/GhidraServer.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/GnuDemangler/lib/GnuDemangler.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/GraphFunctionCalls/lib/GraphFunctionCalls.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/GraphServices/lib/GraphServices.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/GraphServices/lib/jgrapht-core-1.5.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/GraphServices/lib/jgrapht-io-1.5.1.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/GraphServices/lib/jheaps-0.13.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/GraphServices/lib/jungrapht-layout-1.4.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/GraphServices/lib/jungrapht-visualization-1.4.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Jython/lib/Jython.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Jython/lib/jython-standalone-2.7.4.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/MicrosoftCodeAnalyzer/lib/MicrosoftCodeAnalyzer.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/MicrosoftDemangler/lib/MicrosoftDemangler.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/MicrosoftDmang/lib/MicrosoftDmang.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/PDB/lib/PDB.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/ProgramDiff/lib/ProgramDiff.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/ProgramGraph/lib/ProgramGraph.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/PyGhidra/lib/PyGhidra.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Recognizers/lib/Recognizers.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Sarif/lib/Sarif.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/Sarif/lib/java-sarif-2.1-modified.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/SourceCodeLookup/lib/SourceCodeLookup.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/SwiftDemangler/lib/SwiftDemangler.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/SystemEmulation/lib/SystemEmulation.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/VersionTracking/lib/VersionTracking.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/VersionTrackingBSim/lib/VersionTrackingBSim.jar", | ||||
|       "/opt/ghidra/Ghidra/Features/WildcardAssembler/lib/WildcardAssembler.jar", | ||||
|       "/opt/ghidra/Ghidra/Debug/AnnotationValidator/lib/AnnotationValidator.jar", | ||||
|       "/opt/ghidra/Ghidra/Debug/Debugger/lib/Debugger.jar", | ||||
|       "/opt/ghidra/Ghidra/Debug/Debugger-api/lib/Debugger-api.jar", | ||||
|       "/opt/ghidra/Ghidra/Debug/Debugger-isf/lib/Debugger-isf.jar", | ||||
|       "/opt/ghidra/Ghidra/Debug/Debugger-jpda/lib/Debugger-jpda.jar", | ||||
|       "/opt/ghidra/Ghidra/Debug/Debugger-rmi-trace/lib/Debugger-rmi-trace.jar", | ||||
|       "/opt/ghidra/Ghidra/Debug/Framework-AsyncComm/lib/Framework-AsyncComm.jar", | ||||
|       "/opt/ghidra/Ghidra/Debug/Framework-AsyncComm/lib/protobuf-java-3.21.8.jar", | ||||
|       "/opt/ghidra/Ghidra/Debug/Framework-TraceModeling/lib/Framework-TraceModeling.jar", | ||||
|       "/opt/ghidra/Ghidra/Debug/ProposedUtils/lib/ProposedUtils.jar", | ||||
|       "/opt/ghidra/Ghidra/Debug/TaintAnalysis/lib/TaintAnalysis.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/68000/lib/68000.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/8051/lib/8051.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/AARCH64/lib/AARCH64.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/ARM/lib/ARM.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/Atmel/lib/Atmel.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/DATA/lib/DATA.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/Dalvik/lib/Dalvik.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/HCS12/lib/HCS12.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/JVM/lib/JVM.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/Loongarch/lib/Loongarch.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/MIPS/lib/MIPS.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/PIC/lib/PIC.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/PowerPC/lib/PowerPC.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/RISCV/lib/RISCV.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/Sparc/lib/Sparc.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/SuperH4/lib/SuperH4.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/TI_MSP430/lib/TI_MSP430.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/V850/lib/V850.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/Xtensa/lib/Xtensa.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/eBPF/lib/eBPF.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/tricore/lib/tricore.jar", | ||||
|       "/opt/ghidra/Ghidra/Processors/x86/lib/x86.jar" | ||||
|     ], | ||||
|     "sources": { | ||||
|       "/opt/ghidra/Ghidra/Framework/Utility/lib/Utility.jar": "/opt/ghidra/Ghidra/Framework/Utility/lib/Utility-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Framework/DB/lib/DB.jar": "/opt/ghidra/Ghidra/Framework/DB/lib/DB-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Framework/Docking/lib/Docking.jar": "/opt/ghidra/Ghidra/Framework/Docking/lib/Docking-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Framework/Emulation/lib/Emulation.jar": "/opt/ghidra/Ghidra/Framework/Emulation/lib/Emulation-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Framework/FileSystem/lib/FileSystem.jar": "/opt/ghidra/Ghidra/Framework/FileSystem/lib/FileSystem-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Framework/Generic/lib/Generic.jar": "/opt/ghidra/Ghidra/Framework/Generic/lib/Generic-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Framework/Graph/lib/Graph.jar": "/opt/ghidra/Ghidra/Framework/Graph/lib/Graph-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Framework/Gui/lib/Gui.jar": "/opt/ghidra/Ghidra/Framework/Gui/lib/Gui-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Framework/Help/lib/Help.jar": "/opt/ghidra/Ghidra/Framework/Help/lib/Help-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Framework/Project/lib/Project.jar": "/opt/ghidra/Ghidra/Framework/Project/lib/Project-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Framework/Pty/lib/Pty.jar": "/opt/ghidra/Ghidra/Framework/Pty/lib/Pty-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Framework/SoftwareModeling/lib/SoftwareModeling.jar": "/opt/ghidra/Ghidra/Framework/SoftwareModeling/lib/SoftwareModeling-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/BSim/lib/BSim.jar": "/opt/ghidra/Ghidra/Features/BSim/lib/BSim-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/BSimFeatureVisualizer/lib/BSimFeatureVisualizer.jar": "/opt/ghidra/Ghidra/Features/BSimFeatureVisualizer/lib/BSimFeatureVisualizer-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/Base/lib/Base.jar": "/opt/ghidra/Ghidra/Features/Base/lib/Base-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/BytePatterns/lib/BytePatterns.jar": "/opt/ghidra/Ghidra/Features/BytePatterns/lib/BytePatterns-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/ByteViewer/lib/ByteViewer.jar": "/opt/ghidra/Ghidra/Features/ByteViewer/lib/ByteViewer-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/CodeCompare/lib/CodeCompare.jar": "/opt/ghidra/Ghidra/Features/CodeCompare/lib/CodeCompare-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/DebugUtils/lib/DebugUtils.jar": "/opt/ghidra/Ghidra/Features/DebugUtils/lib/DebugUtils-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/Decompiler/lib/Decompiler.jar": "/opt/ghidra/Ghidra/Features/Decompiler/lib/Decompiler-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/DecompilerDependent/lib/DecompilerDependent.jar": "/opt/ghidra/Ghidra/Features/DecompilerDependent/lib/DecompilerDependent-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/FileFormats/lib/FileFormats.jar": "/opt/ghidra/Ghidra/Features/FileFormats/lib/FileFormats-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/FunctionGraph/lib/FunctionGraph.jar": "/opt/ghidra/Ghidra/Features/FunctionGraph/lib/FunctionGraph-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/FunctionGraphDecompilerExtension/lib/FunctionGraphDecompilerExtension.jar": "/opt/ghidra/Ghidra/Features/FunctionGraphDecompilerExtension/lib/FunctionGraphDecompilerExtension-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/FunctionID/lib/FunctionID.jar": "/opt/ghidra/Ghidra/Features/FunctionID/lib/FunctionID-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/GhidraGo/lib/GhidraGo.jar": "/opt/ghidra/Ghidra/Features/GhidraGo/lib/GhidraGo-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/GhidraServer/lib/GhidraServer.jar": "/opt/ghidra/Ghidra/Features/GhidraServer/lib/GhidraServer-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/GnuDemangler/lib/GnuDemangler.jar": "/opt/ghidra/Ghidra/Features/GnuDemangler/lib/GnuDemangler-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/GraphFunctionCalls/lib/GraphFunctionCalls.jar": "/opt/ghidra/Ghidra/Features/GraphFunctionCalls/lib/GraphFunctionCalls-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/GraphServices/lib/GraphServices.jar": "/opt/ghidra/Ghidra/Features/GraphServices/lib/GraphServices-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/Jython/lib/Jython.jar": "/opt/ghidra/Ghidra/Features/Jython/lib/Jython-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/MicrosoftCodeAnalyzer/lib/MicrosoftCodeAnalyzer.jar": "/opt/ghidra/Ghidra/Features/MicrosoftCodeAnalyzer/lib/MicrosoftCodeAnalyzer-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/MicrosoftDemangler/lib/MicrosoftDemangler.jar": "/opt/ghidra/Ghidra/Features/MicrosoftDemangler/lib/MicrosoftDemangler-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/MicrosoftDmang/lib/MicrosoftDmang.jar": "/opt/ghidra/Ghidra/Features/MicrosoftDmang/lib/MicrosoftDmang-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/PDB/lib/PDB.jar": "/opt/ghidra/Ghidra/Features/PDB/lib/PDB-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/ProgramDiff/lib/ProgramDiff.jar": "/opt/ghidra/Ghidra/Features/ProgramDiff/lib/ProgramDiff-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/ProgramGraph/lib/ProgramGraph.jar": "/opt/ghidra/Ghidra/Features/ProgramGraph/lib/ProgramGraph-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/PyGhidra/lib/PyGhidra.jar": "/opt/ghidra/Ghidra/Features/PyGhidra/lib/PyGhidra-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/Recognizers/lib/Recognizers.jar": "/opt/ghidra/Ghidra/Features/Recognizers/lib/Recognizers-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/Sarif/lib/Sarif.jar": "/opt/ghidra/Ghidra/Features/Sarif/lib/Sarif-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/SourceCodeLookup/lib/SourceCodeLookup.jar": "/opt/ghidra/Ghidra/Features/SourceCodeLookup/lib/SourceCodeLookup-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/SwiftDemangler/lib/SwiftDemangler.jar": "/opt/ghidra/Ghidra/Features/SwiftDemangler/lib/SwiftDemangler-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/SystemEmulation/lib/SystemEmulation.jar": "/opt/ghidra/Ghidra/Features/SystemEmulation/lib/SystemEmulation-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/VersionTracking/lib/VersionTracking.jar": "/opt/ghidra/Ghidra/Features/VersionTracking/lib/VersionTracking-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/VersionTrackingBSim/lib/VersionTrackingBSim.jar": "/opt/ghidra/Ghidra/Features/VersionTrackingBSim/lib/VersionTrackingBSim-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Features/WildcardAssembler/lib/WildcardAssembler.jar": "/opt/ghidra/Ghidra/Features/WildcardAssembler/lib/WildcardAssembler-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Debug/AnnotationValidator/lib/AnnotationValidator.jar": "/opt/ghidra/Ghidra/Debug/AnnotationValidator/lib/AnnotationValidator-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Debug/Debugger/lib/Debugger.jar": "/opt/ghidra/Ghidra/Debug/Debugger/lib/Debugger-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Debug/Debugger-api/lib/Debugger-api.jar": "/opt/ghidra/Ghidra/Debug/Debugger-api/lib/Debugger-api-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Debug/Debugger-isf/lib/Debugger-isf.jar": "/opt/ghidra/Ghidra/Debug/Debugger-isf/lib/Debugger-isf-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Debug/Debugger-jpda/lib/Debugger-jpda.jar": "/opt/ghidra/Ghidra/Debug/Debugger-jpda/lib/Debugger-jpda-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Debug/Debugger-rmi-trace/lib/Debugger-rmi-trace.jar": "/opt/ghidra/Ghidra/Debug/Debugger-rmi-trace/lib/Debugger-rmi-trace-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Debug/Framework-AsyncComm/lib/Framework-AsyncComm.jar": "/opt/ghidra/Ghidra/Debug/Framework-AsyncComm/lib/Framework-AsyncComm-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Debug/Framework-TraceModeling/lib/Framework-TraceModeling.jar": "/opt/ghidra/Ghidra/Debug/Framework-TraceModeling/lib/Framework-TraceModeling-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Debug/ProposedUtils/lib/ProposedUtils.jar": "/opt/ghidra/Ghidra/Debug/ProposedUtils/lib/ProposedUtils-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Debug/TaintAnalysis/lib/TaintAnalysis.jar": "/opt/ghidra/Ghidra/Debug/TaintAnalysis/lib/TaintAnalysis-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/68000/lib/68000.jar": "/opt/ghidra/Ghidra/Processors/68000/lib/68000-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/AARCH64/lib/AARCH64.jar": "/opt/ghidra/Ghidra/Processors/AARCH64/lib/AARCH64-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/ARM/lib/ARM.jar": "/opt/ghidra/Ghidra/Processors/ARM/lib/ARM-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/Atmel/lib/Atmel.jar": "/opt/ghidra/Ghidra/Processors/Atmel/lib/Atmel-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/DATA/lib/DATA.jar": "/opt/ghidra/Ghidra/Processors/DATA/lib/DATA-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/Dalvik/lib/Dalvik.jar": "/opt/ghidra/Ghidra/Processors/Dalvik/lib/Dalvik-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/HCS12/lib/HCS12.jar": "/opt/ghidra/Ghidra/Processors/HCS12/lib/HCS12-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/JVM/lib/JVM.jar": "/opt/ghidra/Ghidra/Processors/JVM/lib/JVM-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/Loongarch/lib/Loongarch.jar": "/opt/ghidra/Ghidra/Processors/Loongarch/lib/Loongarch-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/MIPS/lib/MIPS.jar": "/opt/ghidra/Ghidra/Processors/MIPS/lib/MIPS-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/PIC/lib/PIC.jar": "/opt/ghidra/Ghidra/Processors/PIC/lib/PIC-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/PowerPC/lib/PowerPC.jar": "/opt/ghidra/Ghidra/Processors/PowerPC/lib/PowerPC-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/RISCV/lib/RISCV.jar": "/opt/ghidra/Ghidra/Processors/RISCV/lib/RISCV-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/Sparc/lib/Sparc.jar": "/opt/ghidra/Ghidra/Processors/Sparc/lib/Sparc-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/SuperH4/lib/SuperH4.jar": "/opt/ghidra/Ghidra/Processors/SuperH4/lib/SuperH4-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/TI_MSP430/lib/TI_MSP430.jar": "/opt/ghidra/Ghidra/Processors/TI_MSP430/lib/TI_MSP430-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/Xtensa/lib/Xtensa.jar": "/opt/ghidra/Ghidra/Processors/Xtensa/lib/Xtensa-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/eBPF/lib/eBPF.jar": "/opt/ghidra/Ghidra/Processors/eBPF/lib/eBPF-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/tricore/lib/tricore.jar": "/opt/ghidra/Ghidra/Processors/tricore/lib/tricore-src.zip", | ||||
|       "/opt/ghidra/Ghidra/Processors/x86/lib/x86.jar": "/opt/ghidra/Ghidra/Processors/x86/lib/x86-src.zip" | ||||
|     } | ||||
|   }, | ||||
|   "python.analysis.stubPath": "/opt/ghidra/docs/ghidra_stubs/typestubs" | ||||
| } | ||||
							
								
								
									
										0
									
								
								03-Average1/A1-vscode/Module.manifest
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										0
									
								
								03-Average1/A1-vscode/Module.manifest
									
									
									
									
									
										Executable file
									
								
							
							
								
								
									
										1
									
								
								03-Average1/A1-vscode/README.md
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										1
									
								
								03-Average1/A1-vscode/README.md
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1 @@ | ||||
| # Skeleton | ||||
							
								
								
									
										66
									
								
								03-Average1/A1-vscode/build.gradle
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										66
									
								
								03-Average1/A1-vscode/build.gradle
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,66 @@ | ||||
| /* ### | ||||
|  * IP: GHIDRA | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *      http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| // Builds a Ghidra Extension for a given Ghidra installation. | ||||
| // | ||||
| // An absolute path to the Ghidra installation directory must be supplied either by setting the  | ||||
| // GHIDRA_INSTALL_DIR environment variable or Gradle project property: | ||||
| // | ||||
| //     > export GHIDRA_INSTALL_DIR=<Absolute path to Ghidra>  | ||||
| //     > gradle | ||||
| // | ||||
| //         or | ||||
| // | ||||
| //     > gradle -PGHIDRA_INSTALL_DIR=<Absolute path to Ghidra> | ||||
| // | ||||
| // Gradle should be invoked from the directory of the project to build.  Please see the | ||||
| // application.gradle.version property in <GHIDRA_INSTALL_DIR>/Ghidra/application.properties | ||||
| // for the correction version of Gradle to use for the Ghidra installation you specify. | ||||
|  | ||||
| //----------------------START "DO NOT MODIFY" SECTION------------------------------ | ||||
| def ghidraInstallDir | ||||
|  | ||||
| if (System.env.GHIDRA_INSTALL_DIR) { | ||||
| 	ghidraInstallDir = System.env.GHIDRA_INSTALL_DIR | ||||
| } | ||||
| else if (project.hasProperty("GHIDRA_INSTALL_DIR")) { | ||||
| 	ghidraInstallDir = project.getProperty("GHIDRA_INSTALL_DIR") | ||||
| } | ||||
| else { | ||||
| 	ghidraInstallDir = "/opt/ghidra" | ||||
| } | ||||
|  | ||||
| task distributeExtension { | ||||
| 	group "Ghidra" | ||||
|  | ||||
| 	apply from: new File(ghidraInstallDir).getCanonicalPath() + "/support/buildExtension.gradle" | ||||
| 	dependsOn ':buildExtension' | ||||
| } | ||||
| //----------------------END "DO NOT MODIFY" SECTION------------------------------- | ||||
|  | ||||
| repositories { | ||||
| 	// Declare dependency repositories here.  This is not needed if dependencies are manually  | ||||
| 	// dropped into the lib/ directory. | ||||
| 	// See https://docs.gradle.org/current/userguide/declaring_repositories.html for more info. | ||||
| 	// Ex: mavenCentral() | ||||
| } | ||||
|  | ||||
| dependencies { | ||||
| 	// Any external dependencies added here will automatically be copied to the lib/ directory when | ||||
| 	// this extension is built.	 | ||||
| } | ||||
|  | ||||
| // Exclude additional files from the built extension | ||||
| // Ex: buildExtension.exclude '.idea/**' | ||||
							
								
								
									
										15
									
								
								03-Average1/A1-vscode/data/README.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								03-Average1/A1-vscode/data/README.txt
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| The "data" directory is intended to hold data files that will be used by this module and will | ||||
| not end up in the .jar file, but will be present in the zip or tar file.  Typically, data | ||||
| files are placed here rather than in the resources directory if the user may need to edit them. | ||||
|  | ||||
| An optional data/languages directory can exist for the purpose of containing various Sleigh language | ||||
| specification files and importer opinion files.   | ||||
|  | ||||
| The data/buildLanguage.xml is used for building the contents of the data/languages directory. | ||||
|  | ||||
| The skel language definition has been commented-out within the skel.ldefs file so that the  | ||||
| skeleton language does not show-up within Ghidra. | ||||
|  | ||||
| See the Sleigh language documentation (docs/languages/index.html) for details Sleigh language  | ||||
| specification syntax. | ||||
|   | ||||
							
								
								
									
										50
									
								
								03-Average1/A1-vscode/data/buildLanguage.xml
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										50
									
								
								03-Average1/A1-vscode/data/buildLanguage.xml
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
|  | ||||
| <!-- | ||||
|   + Compile sleigh languages within this module. | ||||
|   + Sleigh compiler options are read from the sleighArgs.txt file. | ||||
|   + Eclipse: right-click on this file and choose menu item "Run As->Ant Build" | ||||
|   --> | ||||
|                                       | ||||
| <project name="privateBuildDeveloper" default="sleighCompile"> | ||||
| 	 | ||||
| 	<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/> | ||||
|  | ||||
| 	<!--Import optional ant properties.  GhidraDev Eclipse plugin produces this so this file can find the Ghidra installation--> | ||||
| 	<import file="../.antProperties.xml" optional="false" /> | ||||
| 	 | ||||
| 	<target name="sleighCompile"> | ||||
| 	     | ||||
| 		<!-- If language module is detached from installation, get Ghidra installation directory path from imported properties --> | ||||
| 		<property name="framework.path" value="${ghidra.install.dir}/Ghidra/Framework"/> | ||||
| 		 | ||||
| 		<path id="sleigh.class.path"> | ||||
| 			<fileset dir="${framework.path}/SoftwareModeling/lib"> | ||||
| 				<include name="*.jar"/> | ||||
| 			</fileset> | ||||
| 			<fileset dir="${framework.path}/Generic/lib"> | ||||
| 				<include name="*.jar"/> | ||||
| 			</fileset> | ||||
| 			<fileset dir="${framework.path}/Utility/lib"> | ||||
| 				<include name="*.jar"/> | ||||
| 			</fileset> | ||||
| 		</path> | ||||
| 		 | ||||
| 		<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/> | ||||
| 			 | ||||
| 		<fail unless="sleigh.compile.exists" /> | ||||
| 		 | ||||
| 		<java classname="${sleigh.compile.class}" | ||||
| 			classpathref="sleigh.class.path" | ||||
| 			fork="true" | ||||
| 			failonerror="true"> | ||||
| 			<jvmarg value="-Xmx2048M"/> | ||||
| 			<arg value="-i"/> | ||||
| 			<arg value="sleighArgs.txt"/> | ||||
| 			<arg value="-a"/> | ||||
| 			<arg value="./languages"/> | ||||
| 		</java> | ||||
| 		 | ||||
|  	</target> | ||||
|  | ||||
| </project> | ||||
							
								
								
									
										121
									
								
								03-Average1/A1-vscode/data/languages/skel.cspec
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										121
									
								
								03-Average1/A1-vscode/data/languages/skel.cspec
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,121 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
|  | ||||
| <!-- See Relax specification: Ghidra/Framework/SoftwareModeling/data/languages/compiler_spec.rxg --> | ||||
|  | ||||
| <compiler_spec> | ||||
|   <data_organization> | ||||
| 	<pointer_size value="2" /> | ||||
|   </data_organization> | ||||
|   <global> | ||||
|     <range space="ram"/> | ||||
|     <range space="io"/> | ||||
|   </global> | ||||
|   <stackpointer register="SP" space="ram"/> | ||||
|   <default_proto> | ||||
|     <prototype name="__asmA" extrapop="2" stackshift="2" strategy="register"> | ||||
|       <input> | ||||
|         <pentry minsize="1" maxsize="1"> | ||||
|           <register name="A"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="BC"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="HL"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="DE"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="IY"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="IX"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="500" align="2"> | ||||
|           <addr offset="2" space="stack"/> | ||||
|         </pentry> | ||||
|       </input> | ||||
|       <output> | ||||
|         <pentry minsize="1" maxsize="1"> | ||||
|           <register name="A"/> | ||||
|         </pentry> | ||||
|       </output> | ||||
|       <unaffected> | ||||
|         <register name="SP"/> | ||||
|         <register name="BC_"/> | ||||
|         <register name="HL_"/> | ||||
|         <register name="DE_"/> | ||||
|         <register name="AF_"/> | ||||
|         <register name="rBBR"/> | ||||
|       </unaffected> | ||||
|     </prototype> | ||||
|   </default_proto> | ||||
|   <prototype name="__asmAF" extrapop="2" stackshift="2" strategy="register"> | ||||
|       <input> | ||||
|         <pentry minsize="1" maxsize="1"> | ||||
|           <register name="A"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="BC"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="HL"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="DE"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="IY"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="IX"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="500" align="2"> | ||||
|           <addr offset="2" space="stack"/> | ||||
|         </pentry> | ||||
|       </input> | ||||
|       <output> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="AF"/> | ||||
|         </pentry> | ||||
|       </output> | ||||
|       <unaffected> | ||||
|         <register name="SP"/> | ||||
|         <register name="rBBR"/> | ||||
|         <register name="BC_"/> | ||||
|         <register name="HL_"/> | ||||
|         <register name="DE_"/> | ||||
|         <register name="AF_"/> | ||||
|       </unaffected> | ||||
|   </prototype> | ||||
|   <prototype name="__stdcall" extrapop="2" stackshift="2"> | ||||
|       <input> | ||||
|         <pentry minsize="1" maxsize="1"> | ||||
|           <register name="A"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="BC"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="2"> | ||||
|           <register name="HL"/> | ||||
|         </pentry> | ||||
|         <pentry minsize="1" maxsize="500" align="2"> | ||||
|           <addr offset="2" space="stack"/> | ||||
|         </pentry> | ||||
|       </input> | ||||
|       <output> | ||||
|         <pentry minsize="1" maxsize="1"> | ||||
|           <register name="AF"/> | ||||
|         </pentry> | ||||
|       </output> | ||||
|       <unaffected> | ||||
|         <register name="SP"/> | ||||
|         <register name="rBBR"/> | ||||
|         <register name="BC_"/> | ||||
|         <register name="HL_"/> | ||||
|         <register name="DE_"/> | ||||
|         <register name="AF_"/> | ||||
|       </unaffected> | ||||
|     </prototype> | ||||
| </compiler_spec> | ||||
							
								
								
									
										20
									
								
								03-Average1/A1-vscode/data/languages/skel.ldefs
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										20
									
								
								03-Average1/A1-vscode/data/languages/skel.ldefs
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
|  | ||||
| <!-- See Relax specification: Ghidra/Framework/SoftwareModeling/data/languages/language_definitions.rxg --> | ||||
|  | ||||
| <language_definitions> | ||||
| <!-- Uncomment the following to make the language available in Ghidra --> | ||||
| <!--  | ||||
|    <language processor="Skel" | ||||
|             endian="little" | ||||
|             size="16" | ||||
|             variant="default" | ||||
|             version="1.0" | ||||
|             slafile="skel.sla" | ||||
|             processorspec="skel.pspec" | ||||
|             id="skel:LE:16:default"> | ||||
|     <description>Skeleton Language Module</description> | ||||
|     <compiler name="default" spec="skel.cspec" id="default"/> | ||||
|   </language>  | ||||
| --> | ||||
| </language_definitions> | ||||
							
								
								
									
										12
									
								
								03-Average1/A1-vscode/data/languages/skel.opinion
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								03-Average1/A1-vscode/data/languages/skel.opinion
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| <opinions> | ||||
| <!-- Example of importer opinions - commented-out to prevent use by Ghidra --> | ||||
| <!-- The primary and secondary constraint values must be specifide as a decimal string --> | ||||
| <!-- | ||||
|     <constraint loader="Executable and Linking Format (ELF)" compilerSpecID="default"> | ||||
|     		<constraint primary="40"   secondary="123"  processor="Skel"  size="16" variant="default" /> | ||||
|     </constraint> | ||||
|     <constraint loader="MS Common Object File Format (COFF)" compilerSpecID="default"> | ||||
|         <constraint primary="61"                    processor="Skel"  size="16" variant="default" /> | ||||
|     </constraint> | ||||
| --> | ||||
| </opinions> | ||||
							
								
								
									
										23
									
								
								03-Average1/A1-vscode/data/languages/skel.pspec
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										23
									
								
								03-Average1/A1-vscode/data/languages/skel.pspec
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
|  | ||||
| <!-- See Relax specification: Ghidra/Framework/SoftwareModeling/data/languages/processor_spec.rxg --> | ||||
|  | ||||
| <processor_spec> | ||||
|   <programcounter register="PC"/> | ||||
|   <register_data> | ||||
|     <register name="AF_" group="Alt"/> | ||||
|     <register name="BC_" group="Alt"/> | ||||
|     <register name="DE_" group="Alt"/> | ||||
|     <register name="HL_" group="Alt"/> | ||||
|   </register_data> | ||||
|   <default_symbols> | ||||
|     <symbol name="RST0" address="ram:0000" entry="true"/> | ||||
|     <symbol name="RST1" address="ram:0008" entry="false"/> | ||||
|     <symbol name="RST2" address="ram:0010" entry="false"/> | ||||
|     <symbol name="RST3" address="ram:0018" entry="false"/> | ||||
|     <symbol name="RST4" address="ram:0020" entry="false"/> | ||||
|     <symbol name="RST5" address="ram:0028" entry="false"/> | ||||
|     <symbol name="RST6" address="ram:0030" entry="false"/> | ||||
|     <symbol name="RST7" address="ram:0038" entry="false"/> | ||||
|   </default_symbols> | ||||
| </processor_spec> | ||||
							
								
								
									
										220
									
								
								03-Average1/A1-vscode/data/languages/skel.sinc
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										220
									
								
								03-Average1/A1-vscode/data/languages/skel.sinc
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,220 @@ | ||||
| # sleigh include file for Skeleton language instructions | ||||
|  | ||||
| define token opbyte (8) | ||||
|    op0_8     = (0,7) | ||||
|    op6_2     = (6,7) | ||||
|     | ||||
|    dRegPair4_2    = (4,5) | ||||
|    pRegPair4_2    = (4,5) | ||||
|    sRegPair4_2    = (4,5) | ||||
|    qRegPair4_2    = (4,5) | ||||
|    qRegPair4_2a   = (4,5) | ||||
|    qRegPair4_2b   = (4,5) | ||||
|    rRegPair4_2    = (4,5) | ||||
|  | ||||
|    reg3_3 = (3,5) | ||||
|    bits3_3   = (3,5) | ||||
|     | ||||
|    bits0_4   = (0,3) | ||||
|     | ||||
|    reg0_3 = (0,2) | ||||
|    bits0_3   = (0,2) | ||||
| ; | ||||
|  | ||||
| define token data8 (8) | ||||
|    imm8		= (0,7) | ||||
|    sign8	= (7,7) | ||||
|    simm8	= (0,7) signed | ||||
| ; | ||||
|  | ||||
| define token data16 (16) | ||||
|    timm4        = (12,15) | ||||
|    imm16        = (0,15) | ||||
|    sign16		= (15,15) | ||||
|    simm16		= (0,15) signed | ||||
| ; | ||||
|  | ||||
| attach variables [ reg0_3 reg3_3 ] [ B C D E H L _ A ]; | ||||
|  | ||||
| attach variables [ sRegPair4_2 dRegPair4_2 ] [ BC DE HL SP ]; | ||||
|  | ||||
| attach variables [ qRegPair4_2 ] [ BC DE HL AF ]; | ||||
| attach variables [ qRegPair4_2a ] [ B D H A ]; | ||||
| attach variables [ qRegPair4_2b ] [ C E L F ]; | ||||
|  | ||||
| attach variables [ pRegPair4_2 ] [ BC DE IX SP ]; | ||||
| attach variables [ rRegPair4_2 ] [ BC DE IY SP ]; | ||||
|  | ||||
| ################################################################ | ||||
| # Macros | ||||
| ################################################################ | ||||
|  | ||||
| macro setResultFlags(result) { | ||||
| 	$(Z_flag) = (result == 0); | ||||
| 	$(S_flag) = (result s< 0); | ||||
| } | ||||
|  | ||||
| macro setAddCarryFlags(op1,op2) { | ||||
| 	$(C_flag) = (carry(op1,zext($(C_flag))) || carry(op2,op1 + zext($(C_flag)))); | ||||
| } | ||||
|  | ||||
| macro setAddFlags(op1,op2) { | ||||
| 	$(C_flag) = carry(op1,op2); | ||||
| } | ||||
|  | ||||
| macro setSubtractCarryFlags(op1,op2) { | ||||
| 	notC = ~$(C_flag); | ||||
| 	$(C_flag) = ((op1 < sext(notC)) || (op2 < (op1 - sext(notC)))); | ||||
| } | ||||
|  | ||||
| macro setSubtractFlags(op1,op2) { | ||||
| 	$(C_flag) = (op1 < op2); | ||||
| } | ||||
|  | ||||
| macro push16(val16) { | ||||
| 	SP = SP - 2; | ||||
| 	*:2 SP = val16;  | ||||
| } | ||||
|  | ||||
| macro pop16(ret16) { | ||||
| 	ret16 = *:2 SP; | ||||
| 	SP = SP + 2;  | ||||
| } | ||||
|  | ||||
| macro push8(val8) { | ||||
| 	SP = SP - 1; | ||||
| 	ptr:2 = SP; | ||||
| 	*:1 ptr = val8;  | ||||
| } | ||||
|  | ||||
| macro pop8(ret8) { | ||||
|     ptr:2 = SP; | ||||
| 	ret8 = *:1 ptr; | ||||
| 	SP = SP + 1;  | ||||
| } | ||||
|  | ||||
| ################################################################ | ||||
|  | ||||
| ixMem8: (IX+simm8)  is IX & simm8								{ ptr:2 = IX + simm8; export *:1 ptr; } | ||||
| ixMem8: (IX-val)    is IX & simm8 & sign8=1	[ val = -simm8; ]	{ ptr:2 = IX + simm8; export *:1 ptr; } | ||||
|  | ||||
| iyMem8: (IY+simm8)  is IY & simm8								{ ptr:2 = IY + simm8; export *:1 ptr; } | ||||
| iyMem8: (IY-val)    is IY & simm8 & sign8=1	[ val = -simm8; ]	{ ptr:2 = IY + simm8; export *:1 ptr; } | ||||
|  | ||||
| Addr16: imm16		is imm16									{ export *:1 imm16; } | ||||
|  | ||||
| Mem16: (imm16)		is imm16									{ export *:2 imm16; } | ||||
|  | ||||
| RelAddr8: loc		is simm8  [ loc = inst_next + simm8; ]		{ export *:1 loc; } | ||||
|  | ||||
| cc: "NZ"            is bits3_3=0x0                              { c:1 = ($(Z_flag) == 0); export c; } | ||||
| cc: "Z"             is bits3_3=0x1                              { c:1 = $(Z_flag); export c; } | ||||
| cc: "NC"            is bits3_3=0x2                              { c:1 = ($(C_flag) == 0); export c; } | ||||
| cc: "C"             is bits3_3=0x3                              { c:1 = $(C_flag); export c; } | ||||
| cc: "PO"            is bits3_3=0x4                              { c:1 = ($(PV_flag) == 0); export c; } | ||||
| cc: "PE"            is bits3_3=0x5                              { c:1 = $(PV_flag); export c; } | ||||
| cc: "P"             is bits3_3=0x6                              { c:1 = ($(S_flag) == 0); export c; } | ||||
| cc: "M"             is bits3_3=0x7                              { c:1 = $(S_flag); export c; } | ||||
|  | ||||
| cc2: "NZ"            is bits3_3=0x4                              { c:1 = ($(Z_flag) == 0); export c; } | ||||
| cc2: "Z"             is bits3_3=0x5                              { c:1 = $(Z_flag); export c; } | ||||
| cc2: "NC"            is bits3_3=0x6                              { c:1 = ($(C_flag) == 0); export c; } | ||||
| cc2: "C"             is bits3_3=0x7                              { c:1 = $(C_flag); export c; } | ||||
|  | ||||
| ################################################################ | ||||
|  | ||||
|  | ||||
| :LD IX,Mem16  is op0_8=0xdd & IX; op0_8=0x2a; Mem16 { | ||||
| 	IX = Mem16; | ||||
| } | ||||
|  | ||||
| :LD IY,Mem16  is op0_8=0xfd & IY; op0_8=0x2a; Mem16 { | ||||
| 	IY = Mem16; | ||||
| } | ||||
|  | ||||
| :LD Mem16,HL  is op0_8=0x22 & HL; Mem16 { | ||||
| 	Mem16 = HL; | ||||
| } | ||||
|  | ||||
| :LD Mem16,dRegPair4_2  is op0_8=0xed; op6_2=0x1 & dRegPair4_2 & bits0_4=0x3; Mem16 { | ||||
| 	Mem16 = dRegPair4_2; | ||||
| } | ||||
|  | ||||
| :LD Mem16,IX  is op0_8=0xdd & IX; op0_8=0x22; Mem16 { | ||||
| 	Mem16 = IX; | ||||
| } | ||||
|  | ||||
| :LD Mem16,IY  is op0_8=0xfd & IY; op0_8=0x22; Mem16 { | ||||
| 	Mem16 = IY; | ||||
| } | ||||
|  | ||||
| :NEG  is op0_8=0xed; op0_8=0x44 { | ||||
| 	$(PV_flag) = (A == 0x80); | ||||
| 	$(C_flag) = (A != 0); | ||||
| 	A = -A; | ||||
| 	setResultFlags(A); | ||||
| } | ||||
|  | ||||
| :SET bits3_3,ixMem8  is op0_8=0xdd; op0_8=0xcb; ixMem8; op6_2=0x3 & bits3_3 & bits0_3=0x6 { | ||||
| 	mask:1 = (1 << bits3_3); | ||||
| 	val:1 = ixMem8; | ||||
| 	ixMem8 = val | mask; | ||||
| } | ||||
|  | ||||
| :SET bits3_3,iyMem8  is op0_8=0xfd; op0_8=0xcb; iyMem8; op6_2=0x3 & bits3_3 & bits0_3=0x6 { | ||||
| 	mask:1 = (1 << bits3_3); | ||||
| 	val:1 = iyMem8; | ||||
| 	iyMem8 = val | mask; | ||||
| } | ||||
|  | ||||
| :JP Addr16  is op0_8=0xc3; Addr16 { | ||||
| 	goto Addr16;	 | ||||
| } | ||||
|  | ||||
| :JP cc,Addr16  is op6_2=0x3 & cc & bits0_3=0x2; Addr16 { | ||||
| 	if (!cc) goto Addr16; | ||||
| } | ||||
|  | ||||
| :JR RelAddr8  is op0_8=0x18; RelAddr8 { | ||||
| 	goto RelAddr8; | ||||
| } | ||||
|  | ||||
| :JR cc2,RelAddr8  is op6_2=0x0 & cc2 & bits0_3=0x0; RelAddr8 { | ||||
| 	if (cc2) goto RelAddr8; | ||||
| } | ||||
|  | ||||
| :JP (HL)  is op0_8=0xe9 & HL { | ||||
| 	goto [HL]; | ||||
| } | ||||
|  | ||||
| :JP (IX)  is op0_8=0xdd & IX; op0_8=0xe9 { | ||||
| 	goto [IX]; | ||||
| } | ||||
|  | ||||
| :JP (IY)  is op0_8=0xfd & IY; op0_8=0xe9 { | ||||
| 	goto [IY]; | ||||
| } | ||||
|  | ||||
| :CALL Addr16  is op0_8=0xcd; Addr16 { | ||||
|     push16(&:2 inst_next); | ||||
| 	call Addr16; | ||||
| } | ||||
|  | ||||
| :CALL cc,Addr16  is op6_2=0x3 & cc & bits0_3=0x4; Addr16 { | ||||
| 	if (!cc) goto inst_next; | ||||
|     push16(&:2 inst_next); | ||||
| 	call Addr16; | ||||
| } | ||||
|  | ||||
| :RET  is op0_8=0xc9 { | ||||
| 	pop16(PC); | ||||
| 	ptr:2 = zext(PC); | ||||
| 	return [ptr]; | ||||
| } | ||||
|  | ||||
| :RET cc  is op6_2=0x3 & cc & bits0_3=0x0 { | ||||
| 	if (!cc) goto inst_next; | ||||
| 	pop16(PC); | ||||
| 	ptr:2 = zext(PC); | ||||
| 	return [ptr]; | ||||
| }	 | ||||
							
								
								
									
										39
									
								
								03-Average1/A1-vscode/data/languages/skel.slaspec
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										39
									
								
								03-Average1/A1-vscode/data/languages/skel.slaspec
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,39 @@ | ||||
| # sleigh specification file for Skeleton Processor | ||||
| #   >> see docs/languages/sleigh.htm or sleigh.pdf for Sleigh syntax | ||||
| # Other language modules (see Ghidra/Processors) may provide better examples | ||||
| # when creating a new language module. | ||||
|  | ||||
| define endian=little; | ||||
| define alignment=1; | ||||
|  | ||||
| define space ram     type=ram_space      size=2  default; | ||||
|  | ||||
| define space io      type=ram_space      size=2; | ||||
| define space register type=register_space size=1; | ||||
|  | ||||
| define register offset=0x00 size=1 [ F A C B E D L H I R ]; | ||||
| define register offset=0x00 size=2 [ AF  BC  DE  HL ]; | ||||
| define register offset=0x20 size=1 [ A_ F_ B_ C_ D_ E_ H_ L_ ]; # Alternate registers | ||||
| define register offset=0x20 size=2 [ AF_   BC_   DE_   HL_ ]; # Alternate registers | ||||
|  | ||||
| define register offset=0x40 size=2 [ _  PC SP IX IY ]; | ||||
|  | ||||
| define register offset=0x50 size=1 [ rCBAR rCBR rBBR ]; | ||||
|  | ||||
| # Define context bits (if defined, size must be multiple of 4-bytes) | ||||
| define register offset=0xf0 size=4   contextreg; | ||||
|  | ||||
| define context contextreg | ||||
|   assume8bitIOSpace		= (0,0) | ||||
| ; | ||||
|  | ||||
| # Flag bits (?? manual is very confusing - could be typos!) | ||||
| @define C_flag "F[0,1]"		# C: Carry | ||||
| @define N_flag "F[1,1]"		# N: Add/Subtract | ||||
| @define PV_flag "F[2,1]"	# PV: Parity/Overflow | ||||
| @define H_flag "F[4,1]"		# H: Half Carry | ||||
| @define Z_flag "F[6,1]"		# Z: Zero | ||||
| @define S_flag "F[7,1]"		# S: Sign | ||||
|  | ||||
| # Include contents of skel.sinc file | ||||
| @include "skel.sinc" | ||||
							
								
								
									
										6
									
								
								03-Average1/A1-vscode/data/sleighArgs.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										6
									
								
								03-Average1/A1-vscode/data/sleighArgs.txt
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| # Add sleigh compiler options to this file (one per line) which will | ||||
| # be used when compiling each language within this module. | ||||
| # All options should start with a '-' character. | ||||
| # | ||||
| # IMPORTANT: The -a option should NOT be specified | ||||
| # | ||||
							
								
								
									
										5
									
								
								03-Average1/A1-vscode/extension.properties
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								03-Average1/A1-vscode/extension.properties
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| name=@extname@ | ||||
| description=The extension description can be customized by editing the extension.properties file. | ||||
| author= | ||||
| createdOn= | ||||
| version=@extversion@ | ||||
							
								
								
									
										1
									
								
								03-Average1/A1-vscode/ghidra_scripts/README.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										1
									
								
								03-Average1/A1-vscode/ghidra_scripts/README.txt
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1 @@ | ||||
| Java source directory to hold module-specific Ghidra scripts. | ||||
							
								
								
									
										11
									
								
								03-Average1/A1-vscode/ghidra_scripts/SampleScript.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								03-Average1/A1-vscode/ghidra_scripts/SampleScript.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| // Sample Java GhidraScript | ||||
| // @category Examples | ||||
| import ghidra.app.script.GhidraScript; | ||||
|  | ||||
| public class SampleScript extends GhidraScript { | ||||
|  | ||||
| 	@Override | ||||
| 	protected void run() throws Exception { | ||||
|     	println("Sample script!"); | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										8
									
								
								03-Average1/A1-vscode/ghidra_scripts/sample_script.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								03-Average1/A1-vscode/ghidra_scripts/sample_script.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| # Sample PyGhidra GhidraScript | ||||
| # @category Examples | ||||
| # @runtime PyGhidra | ||||
|  | ||||
| from java.util import LinkedList | ||||
| java_list = LinkedList([1,2,3]) | ||||
|  | ||||
| block = currentProgram.memory.getBlock('.text') | ||||
							
								
								
									
										3
									
								
								03-Average1/A1-vscode/lib/README.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								03-Average1/A1-vscode/lib/README.txt
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| The "lib" directory is intended to hold Jar files which this module is dependent upon.  Jar files  | ||||
| may be placed in this directory manually, or automatically by maven via the dependencies block | ||||
| of this module's build.gradle file. | ||||
							
								
								
									
										3
									
								
								03-Average1/A1-vscode/os/linux_x86_64/README.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								03-Average1/A1-vscode/os/linux_x86_64/README.txt
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| The "os/linux_x86_64" directory is intended to hold Linux native binaries | ||||
| which this module is dependent upon.   This directory may be eliminated for a specific  | ||||
| module if native binaries are not provided for the corresponding platform. | ||||
							
								
								
									
										3
									
								
								03-Average1/A1-vscode/os/mac_x86_64/README.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								03-Average1/A1-vscode/os/mac_x86_64/README.txt
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| The "os/mac_x86_64" directory is intended to hold macOS (OS X) native binaries | ||||
| which this module is dependent upon.   This directory may be eliminated for a specific  | ||||
| module if native binaries are not provided for the corresponding platform. | ||||
							
								
								
									
										3
									
								
								03-Average1/A1-vscode/os/win_x86_64/README.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								03-Average1/A1-vscode/os/win_x86_64/README.txt
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| The "os/win_x86_64" directory is intended to hold MS Windows native binaries (.exe) | ||||
| which this module is dependent upon.   This directory may be eliminated for a specific  | ||||
| module if native binaries are not provided for the corresponding platform. | ||||
							
								
								
									
										57
									
								
								03-Average1/A1-vscode/src/main/help/help/TOC_Source.xml
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										57
									
								
								03-Average1/A1-vscode/src/main/help/help/TOC_Source.xml
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,57 @@ | ||||
| <?xml version='1.0' encoding='ISO-8859-1' ?> | ||||
| <!--  | ||||
|  | ||||
| 	This is an XML file intended to be parsed by the Ghidra help system.  It is loosely based  | ||||
| 	upon the JavaHelp table of contents document format.  The Ghidra help system uses a  | ||||
| 	TOC_Source.xml file to allow a module with help to define how its contents appear in the  | ||||
| 	Ghidra help viewer's table of contents.  The main document (in the Base module)  | ||||
| 	defines a basic structure for the  | ||||
| 	Ghidra table of contents system.  Other TOC_Source.xml files may use this structure to insert | ||||
| 	their files directly into this structure (and optionally define a substructure). | ||||
| 	 | ||||
| 	 | ||||
| 	In this document, a tag can be either a <tocdef> or a <tocref>.  The former is a definition | ||||
| 	of an XML item that may have a link and may contain other <tocdef> and <tocref> children.   | ||||
| 	<tocdef> items may be referred to in other documents by using a <tocref> tag with the  | ||||
| 	appropriate id attribute value.  Using these two tags allows any module to define a place  | ||||
| 	in the table of contents system (<tocdef>), which also provides a place for  | ||||
| 	other TOC_Source.xml files to insert content (<tocref>).   | ||||
| 	 | ||||
| 	During the help build time, all TOC_Source.xml files will be parsed and	validated to ensure | ||||
| 	that all <tocref> tags point to valid <tocdef> tags.  From these files will be generated | ||||
| 	<module name>_TOC.xml files, which are table of contents files written in the format  | ||||
| 	desired by the JavaHelp system.   Additionally, the genated files will be merged together | ||||
| 	as they are loaded by the JavaHelp system.  In the end, when displaying help in the Ghidra | ||||
| 	help GUI, there will be on table of contents that has been created from the definitions in  | ||||
| 	all of the modules' TOC_Source.xml files. | ||||
|  | ||||
| 	 | ||||
| 	Tags and Attributes | ||||
| 	 | ||||
| 	<tocdef> | ||||
| 	-id          - the name of the definition (this must be unique across all TOC_Source.xml files)	 | ||||
| 	-text        - the display text of the node, as seen in the help GUI | ||||
| 	-target**    - the file to display when the node is clicked in the GUI | ||||
| 	-sortgroup   - this is a string that defines where a given node should appear under a given | ||||
| 	               parent.  The string values will be sorted by the JavaHelp system using | ||||
| 	               a javax.text.RulesBasedCollator.  If this attribute is not specified, then | ||||
| 	               the text of attribute will be used. | ||||
|  | ||||
| 	<tocref> | ||||
| 	-id			 - The id of the <tocdef> that this reference points to  | ||||
| 	 | ||||
| 	**The URL for the target is relative and should start with 'help/topics'.  This text is  | ||||
| 	used by the Ghidra help system to provide a universal starting point for all links so that | ||||
| 	they can be resolved at runtime, across modules. | ||||
| 	 | ||||
| 	 | ||||
| --> | ||||
|  | ||||
|  | ||||
| <tocroot> | ||||
| 	<!-- Uncomment and adjust fields to add help topic to help system's Table of Contents | ||||
| 	<tocref id="Ghidra Functionality"> | ||||
| 		<tocdef id="HelpAnchor" text="My Feature" target="help/topics/my_topic/help.html" /> | ||||
| 	</tocref> | ||||
| 	--> | ||||
| </tocroot> | ||||
							
								
								
									
										23
									
								
								03-Average1/A1-vscode/src/main/help/help/topics/skeleton/help.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										23
									
								
								03-Average1/A1-vscode/src/main/help/help/topics/skeleton/help.html
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||||
|  | ||||
| <HTML> | ||||
|   <HEAD> | ||||
|     <META name="generator" content= | ||||
|     "HTML Tidy for Java (vers. 2009-12-01), see jtidy.sourceforge.net"> | ||||
|     <META http-equiv="Content-Language" content="en-us"> | ||||
|     <META http-equiv="Content-Type" content="text/html; charset=windows-1252"> | ||||
|     <META name="GENERATOR" content="Microsoft FrontPage 4.0"> | ||||
|     <META name="ProgId" content="FrontPage.Editor.Document"> | ||||
|  | ||||
|     <TITLE>Skeleton Help File for a Module</TITLE> | ||||
|     <LINK rel="stylesheet" type="text/css" href="help/shared/DefaultStyle.css"> | ||||
|   </HEAD> | ||||
|  | ||||
|   <BODY> | ||||
|     <H1><a name="HelpAnchor"></a>Skeleton Help File for a Module</H1> | ||||
|  | ||||
|     <P>This is a simple skeleton help topic. For a better description of what should and should not | ||||
|     go in here, see the "sample" Ghidra extension in the Extensions/Ghidra directory, or see your  | ||||
|     favorite help topic. In general, language modules do not have their own help topics.</P> | ||||
|   </BODY> | ||||
| </HTML> | ||||
							
								
								
									
										74
									
								
								03-Average1/A1-vscode/src/main/java/a1-vscode/A1-vscodeAnalyzer.java
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										74
									
								
								03-Average1/A1-vscode/src/main/java/a1-vscode/A1-vscodeAnalyzer.java
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,74 @@ | ||||
| /* ### | ||||
|  * IP: GHIDRA | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *      http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| package a1-vscode; | ||||
|  | ||||
| import ghidra.app.services.AbstractAnalyzer; | ||||
| import ghidra.app.services.AnalyzerType; | ||||
| import ghidra.app.util.importer.MessageLog; | ||||
| import ghidra.framework.options.Options; | ||||
| import ghidra.program.model.address.AddressSetView; | ||||
| import ghidra.program.model.listing.Program; | ||||
| import ghidra.util.exception.CancelledException; | ||||
| import ghidra.util.task.TaskMonitor; | ||||
|  | ||||
| /** | ||||
|  * Provide class-level documentation that describes what this analyzer does. | ||||
|  */ | ||||
| public class A1-vscodeAnalyzer extends AbstractAnalyzer { | ||||
|  | ||||
| 	public A1-vscodeAnalyzer() { | ||||
|  | ||||
| 		// Name the analyzer and give it a description. | ||||
|  | ||||
| 		super("My Analyzer", "Analyzer description goes here", AnalyzerType.BYTE_ANALYZER); | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public boolean getDefaultEnablement(Program program) { | ||||
|  | ||||
| 		// Return true if analyzer should be enabled by default | ||||
|  | ||||
| 		return true; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public boolean canAnalyze(Program program) { | ||||
|  | ||||
| 		// Examine 'program' to determine of this analyzer should analyze it.  Return true | ||||
| 		// if it can. | ||||
|  | ||||
| 		return true; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public void registerOptions(Options options, Program program) { | ||||
|  | ||||
| 		// If this analyzer has custom options, register them here | ||||
|  | ||||
| 		options.registerOption("Option name goes here", false, null, | ||||
| 			"Option description goes here"); | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) | ||||
| 			throws CancelledException { | ||||
|  | ||||
| 		// Perform analysis when things get added to the 'program'.  Return true if the | ||||
| 		// analysis succeeded. | ||||
|  | ||||
| 		return false; | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										77
									
								
								03-Average1/A1-vscode/src/main/java/a1-vscode/A1-vscodeExporter.java
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										77
									
								
								03-Average1/A1-vscode/src/main/java/a1-vscode/A1-vscodeExporter.java
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,77 @@ | ||||
| /* ### | ||||
|  * IP: GHIDRA | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *      http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| package a1-vscode; | ||||
|  | ||||
| import java.io.File; | ||||
| import java.io.IOException; | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
|  | ||||
| import ghidra.app.util.*; | ||||
| import ghidra.app.util.exporter.Exporter; | ||||
| import ghidra.app.util.exporter.ExporterException; | ||||
| import ghidra.framework.model.DomainObject; | ||||
| import ghidra.program.model.address.AddressSetView; | ||||
| import ghidra.util.task.TaskMonitor; | ||||
|  | ||||
| /** | ||||
|  * Provide class-level documentation that describes what this exporter does. | ||||
|  */ | ||||
| public class A1-vscodeExporter extends Exporter { | ||||
|  | ||||
| 	/** | ||||
| 	 * Exporter constructor. | ||||
| 	 */ | ||||
| 	public A1-vscodeExporter() { | ||||
|  | ||||
| 		// Name the exporter and associate a file extension with it | ||||
|  | ||||
| 		super("My Exporter", "exp", null); | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public boolean supportsAddressRestrictedExport() { | ||||
|  | ||||
| 		// Return true if addrSet export parameter can be used to restrict export | ||||
|  | ||||
| 		return false; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public boolean export(File file, DomainObject domainObj, AddressSetView addrSet, | ||||
| 			TaskMonitor monitor) throws ExporterException, IOException { | ||||
|  | ||||
| 		// Perform the export, and return true if it succeeded | ||||
|  | ||||
| 		return false; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public List<Option> getOptions(DomainObjectService domainObjectService) { | ||||
| 		List<Option> list = new ArrayList<>(); | ||||
|  | ||||
| 		// If this exporter has custom options, add them to 'list' | ||||
| 		list.add(new Option("Option name goes here", "Default option value goes here")); | ||||
|  | ||||
| 		return list; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public void setOptions(List<Option> options) throws OptionException { | ||||
|  | ||||
| 		// If this exporter has custom options, assign their values to the exporter here | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										184
									
								
								03-Average1/A1-vscode/src/main/java/a1-vscode/A1-vscodeFileSystem.java
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										184
									
								
								03-Average1/A1-vscode/src/main/java/a1-vscode/A1-vscodeFileSystem.java
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,184 @@ | ||||
| /* ### | ||||
|  * IP: GHIDRA | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *      http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| package a1-vscode; | ||||
|  | ||||
| import java.io.IOException; | ||||
| import java.util.Comparator; | ||||
| import java.util.List; | ||||
|  | ||||
| import ghidra.app.util.bin.ByteProvider; | ||||
| import ghidra.app.util.bin.ByteProviderWrapper; | ||||
| import ghidra.formats.gfilesystem.*; | ||||
| import ghidra.formats.gfilesystem.annotations.FileSystemInfo; | ||||
| import ghidra.formats.gfilesystem.factory.GFileSystemFactoryByteProvider; | ||||
| import ghidra.formats.gfilesystem.factory.GFileSystemProbeByteProvider; | ||||
| import ghidra.formats.gfilesystem.fileinfo.FileAttributeType; | ||||
| import ghidra.formats.gfilesystem.fileinfo.FileAttributes; | ||||
| import ghidra.util.exception.CancelledException; | ||||
| import ghidra.util.task.TaskMonitor; | ||||
|  | ||||
| /** | ||||
|  * Provide class-level documentation that describes what this file system does. | ||||
|  */ | ||||
| @FileSystemInfo(type = "fstypegoeshere", // ([a-z0-9]+ only) | ||||
| 		description = "File system description goes here", factory = A1-vscodeFileSystem.MyFileSystemFactory.class) | ||||
| public class A1-vscodeFileSystem implements GFileSystem { | ||||
|  | ||||
| 	private final FSRLRoot fsFSRL; | ||||
| 	private FileSystemIndexHelper<MyMetadata> fsih; | ||||
| 	private FileSystemRefManager refManager = new FileSystemRefManager(this); | ||||
|  | ||||
| 	private ByteProvider provider; | ||||
|  | ||||
| 	/** | ||||
| 	 * File system constructor. | ||||
| 	 *  | ||||
| 	 * @param fsFSRL The root {@link FSRL} of the file system. | ||||
| 	 * @param provider The file system provider. | ||||
| 	 */ | ||||
| 	public A1-vscodeFileSystem(FSRLRoot fsFSRL, ByteProvider provider) { | ||||
| 		this.fsFSRL = fsFSRL; | ||||
| 		this.provider = provider; | ||||
| 		this.fsih = new FileSystemIndexHelper<>(this, fsFSRL); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Mounts (opens) the file system. | ||||
| 	 *  | ||||
| 	 * @param monitor A cancellable task monitor. | ||||
| 	 */ | ||||
| 	public void mount(TaskMonitor monitor) { | ||||
| 		monitor.setMessage("Opening " + A1-vscodeFileSystem.class.getSimpleName() + "..."); | ||||
|  | ||||
| 		// Customize how things in the file system are stored.  The following should be  | ||||
| 		// treated as pseudo-code. | ||||
| 		for (MyMetadata metadata : new MyMetadata[10]) { | ||||
| 			if (monitor.isCancelled()) { | ||||
| 				break; | ||||
| 			} | ||||
| 			fsih.storeFile(metadata.path, fsih.getFileCount(), false, metadata.size, metadata); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public void close() throws IOException { | ||||
| 		refManager.onClose(); | ||||
| 		if (provider != null) { | ||||
| 			provider.close(); | ||||
| 			provider = null; | ||||
| 		} | ||||
| 		fsih.clear(); | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public String getName() { | ||||
| 		return fsFSRL.getContainer().getName(); | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public FSRLRoot getFSRL() { | ||||
| 		return fsFSRL; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public boolean isClosed() { | ||||
| 		return provider == null; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public int getFileCount() { | ||||
| 		return fsih.getFileCount(); | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public FileSystemRefManager getRefManager() { | ||||
| 		return refManager; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public GFile lookup(String path) throws IOException { | ||||
| 		return fsih.lookup(path); | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public GFile lookup(String path, Comparator<String> nameComp) throws IOException { | ||||
| 		return fsih.lookup(null, path, nameComp); | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public ByteProvider getByteProvider(GFile file, TaskMonitor monitor) | ||||
| 			throws IOException, CancelledException { | ||||
|  | ||||
| 		// Get an ByteProvider for a file.  The following is an example of how the metadata | ||||
| 		// might be used to get an sub-ByteProvider from a stored provider offset. | ||||
| 		MyMetadata metadata = fsih.getMetadata(file); | ||||
| 		return (metadata != null) | ||||
| 				? new ByteProviderWrapper(provider, metadata.offset, metadata.size, file.getFSRL()) | ||||
| 				: null; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public List<GFile> getListing(GFile directory) throws IOException { | ||||
| 		return fsih.getListing(directory); | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public FileAttributes getFileAttributes(GFile file, TaskMonitor monitor) { | ||||
| 		MyMetadata metadata = fsih.getMetadata(file); | ||||
| 		FileAttributes result = new FileAttributes(); | ||||
| 		if (metadata != null) { | ||||
| 			result.add(FileAttributeType.NAME_ATTR, metadata.name); | ||||
| 			result.add(FileAttributeType.SIZE_ATTR, metadata.size); | ||||
| 		} | ||||
| 		return result; | ||||
| 	} | ||||
|  | ||||
| 	// Customize for the real file system. | ||||
| 	public static class MyFileSystemFactory | ||||
| 			implements GFileSystemFactoryByteProvider<A1-vscodeFileSystem>, | ||||
| 			GFileSystemProbeByteProvider { | ||||
|  | ||||
| 		@Override | ||||
| 		public A1-vscodeFileSystem create(FSRLRoot targetFSRL, | ||||
| 				ByteProvider byteProvider, FileSystemService fsService, TaskMonitor monitor) | ||||
| 				throws IOException, CancelledException { | ||||
|  | ||||
| 			A1-vscodeFileSystem fs = new A1-vscodeFileSystem(targetFSRL, byteProvider); | ||||
| 			fs.mount(monitor); | ||||
| 			return fs; | ||||
| 		} | ||||
|  | ||||
| 		@Override | ||||
| 		public boolean probe(ByteProvider byteProvider, FileSystemService fsService, | ||||
| 				TaskMonitor monitor) throws IOException, CancelledException { | ||||
|  | ||||
| 			// Quickly and efficiently examine the bytes in 'byteProvider' to determine if  | ||||
| 			// it's a valid file system.  If it is, return true.  | ||||
|  | ||||
| 			return false; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	// Customize with metadata from files in the real file system.  This is just a stub. | ||||
| 	// The elements of the file system will most likely be modeled by Java classes external to this | ||||
| 	// file. | ||||
| 	private static class MyMetadata { | ||||
| 		private String name; | ||||
| 		private String path; | ||||
| 		private long offset; | ||||
| 		private long size; | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										82
									
								
								03-Average1/A1-vscode/src/main/java/a1-vscode/A1-vscodeLoader.java
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										82
									
								
								03-Average1/A1-vscode/src/main/java/a1-vscode/A1-vscodeLoader.java
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,82 @@ | ||||
| /* ### | ||||
|  * IP: GHIDRA | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *      http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| package a1-vscode; | ||||
|  | ||||
| import java.io.IOException; | ||||
| import java.util.*; | ||||
|  | ||||
| import ghidra.app.util.Option; | ||||
| import ghidra.app.util.bin.ByteProvider; | ||||
| import ghidra.app.util.importer.MessageLog; | ||||
| import ghidra.app.util.opinion.AbstractProgramWrapperLoader; | ||||
| import ghidra.app.util.opinion.LoadSpec; | ||||
| import ghidra.framework.model.DomainObject; | ||||
| import ghidra.program.model.listing.Program; | ||||
| import ghidra.util.exception.CancelledException; | ||||
| import ghidra.util.task.TaskMonitor; | ||||
|  | ||||
| /** | ||||
|  * Provide class-level documentation that describes what this loader does. | ||||
|  */ | ||||
| public class A1-vscodeLoader extends AbstractProgramWrapperLoader { | ||||
|  | ||||
| 	@Override | ||||
| 	public String getName() { | ||||
|  | ||||
| 		// Name the loader.  This name must match the name of the loader in the .opinion files. | ||||
|  | ||||
| 		return "My loader"; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public Collection<LoadSpec> findSupportedLoadSpecs(ByteProvider provider) throws IOException { | ||||
| 		List<LoadSpec> loadSpecs = new ArrayList<>(); | ||||
|  | ||||
| 		// Examine the bytes in 'provider' to determine if this loader can load it.  If it  | ||||
| 		// can load it, return the appropriate load specifications. | ||||
|  | ||||
| 		return loadSpecs; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	protected void load(ByteProvider provider, LoadSpec loadSpec, List<Option> options, | ||||
| 			Program program, TaskMonitor monitor, MessageLog log) | ||||
| 			throws CancelledException, IOException { | ||||
|  | ||||
| 		// Load the bytes from 'provider' into the 'program'. | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public List<Option> getDefaultOptions(ByteProvider provider, LoadSpec loadSpec, | ||||
| 			DomainObject domainObject, boolean isLoadIntoProgram) { | ||||
| 		List<Option> list = | ||||
| 			super.getDefaultOptions(provider, loadSpec, domainObject, isLoadIntoProgram); | ||||
|  | ||||
| 		// If this loader has custom options, add them to 'list' | ||||
| 		list.add(new Option("Option name goes here", "Default option value goes here")); | ||||
|  | ||||
| 		return list; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public String validateOptions(ByteProvider provider, LoadSpec loadSpec, List<Option> options, Program program) { | ||||
|  | ||||
| 		// If this loader has custom options, validate them here.  Not all options require | ||||
| 		// validation. | ||||
|  | ||||
| 		return super.validateOptions(provider, loadSpec, options, program); | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										116
									
								
								03-Average1/A1-vscode/src/main/java/a1-vscode/A1-vscodePlugin.java
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										116
									
								
								03-Average1/A1-vscode/src/main/java/a1-vscode/A1-vscodePlugin.java
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,116 @@ | ||||
| /* ### | ||||
|  * IP: GHIDRA | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *      http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| package a1-vscode; | ||||
|  | ||||
| import java.awt.BorderLayout; | ||||
|  | ||||
| import javax.swing.*; | ||||
|  | ||||
| import docking.ActionContext; | ||||
| import docking.ComponentProvider; | ||||
| import docking.action.DockingAction; | ||||
| import docking.action.ToolBarData; | ||||
| import ghidra.app.ExamplesPluginPackage; | ||||
| import ghidra.app.plugin.PluginCategoryNames; | ||||
| import ghidra.app.plugin.ProgramPlugin; | ||||
| import ghidra.framework.plugintool.*; | ||||
| import ghidra.framework.plugintool.util.PluginStatus; | ||||
| import ghidra.util.HelpLocation; | ||||
| import ghidra.util.Msg; | ||||
| import resources.Icons; | ||||
|  | ||||
| /** | ||||
|  * Provide class-level documentation that describes what this plugin does. | ||||
|  */ | ||||
| //@formatter:off | ||||
| @PluginInfo( | ||||
| 	status = PluginStatus.STABLE, | ||||
| 	packageName = ExamplesPluginPackage.NAME, | ||||
| 	category = PluginCategoryNames.EXAMPLES, | ||||
| 	shortDescription = "Plugin short description goes here.", | ||||
| 	description = "Plugin long description goes here." | ||||
| ) | ||||
| //@formatter:on | ||||
| public class A1-vscodePlugin extends ProgramPlugin { | ||||
|  | ||||
| 	MyProvider provider; | ||||
|  | ||||
| 	/** | ||||
| 	 * Plugin constructor. | ||||
| 	 *  | ||||
| 	 * @param tool The plugin tool that this plugin is added to. | ||||
| 	 */ | ||||
| 	public A1-vscodePlugin(PluginTool tool) { | ||||
| 		super(tool); | ||||
|  | ||||
| 		// Customize provider (or remove if a provider is not desired) | ||||
| 		String pluginName = getName(); | ||||
| 		provider = new MyProvider(this, pluginName); | ||||
|  | ||||
| 		// Customize help (or remove if help is not desired) | ||||
| 		String topicName = this.getClass().getPackage().getName(); | ||||
| 		String anchorName = "HelpAnchor"; | ||||
| 		provider.setHelpLocation(new HelpLocation(topicName, anchorName)); | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public void init() { | ||||
| 		super.init(); | ||||
|  | ||||
| 		// Acquire services if necessary | ||||
| 	} | ||||
|  | ||||
| 	// If provider is desired, it is recommended to move it to its own file | ||||
| 	private static class MyProvider extends ComponentProvider { | ||||
|  | ||||
| 		private JPanel panel; | ||||
| 		private DockingAction action; | ||||
|  | ||||
| 		public MyProvider(Plugin plugin, String owner) { | ||||
| 			super(plugin.getTool(), "A1-vscode Provider", owner); | ||||
| 			buildPanel(); | ||||
| 			createActions(); | ||||
| 		} | ||||
|  | ||||
| 		// Customize GUI | ||||
| 		private void buildPanel() { | ||||
| 			panel = new JPanel(new BorderLayout()); | ||||
| 			JTextArea textArea = new JTextArea(5, 25); | ||||
| 			textArea.setEditable(false); | ||||
| 			panel.add(new JScrollPane(textArea)); | ||||
| 			setVisible(true); | ||||
| 		} | ||||
|  | ||||
| 		// Customize actions | ||||
| 		private void createActions() { | ||||
| 			action = new DockingAction("My Action", getOwner()) { | ||||
| 				@Override | ||||
| 				public void actionPerformed(ActionContext context) { | ||||
| 					Msg.showInfo(getClass(), panel, "Custom Action", "Hello!"); | ||||
| 				} | ||||
| 			}; | ||||
| 			action.setToolBarData(new ToolBarData(Icons.ADD_ICON, null)); | ||||
| 			action.setEnabled(true); | ||||
| 			action.markHelpUnnecessary(); | ||||
| 			dockingTool.addLocalAction(this, action); | ||||
| 		} | ||||
|  | ||||
| 		@Override | ||||
| 		public JComponent getComponent() { | ||||
| 			return panel; | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										2
									
								
								03-Average1/A1-vscode/src/main/resources/images/README.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										2
									
								
								03-Average1/A1-vscode/src/main/resources/images/README.txt
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| The "src/resources/images" directory is intended to hold all image/icon files used by | ||||
| this module. | ||||
		Reference in New Issue
	
	Block a user