Skip to content

Commit

Permalink
Cumulative updates (#93)
Browse files Browse the repository at this point in the history
* cumulative update

* remove obsolete files
  • Loading branch information
MilesQLi authored Feb 27, 2023
1 parent 8b3c149 commit 1c3c309
Show file tree
Hide file tree
Showing 118 changed files with 10,557 additions and 3,058 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
url = https://github.com/Z3Prover/z3
[submodule "kam1n0/kam1n0-apps/src/main/resources/static/material-kit"]
path = kam1n0/kam1n0-apps/src/main/resources/static/material-kit
url = https://github.com/creativetimofficial/material-kit
url = https://github.com/creativetimofficial/material-kit
4 changes: 4 additions & 0 deletions kam1n0-clients/ghidra-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.metadata/
kam1n0/build
kam1n0/dist
kam1n0/.gradle
5 changes: 5 additions & 0 deletions kam1n0-clients/ghidra-plugin/kam1n0/.antProperties.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- This file is generated on each "Link Ghidra" command. Do not modify. -->

<project>
<property name="ghidra.install.dir" value="C:\Git\assembly-code\ghidra_10.1.2_PUBLIC_20220125\ghidra_10.1.2_PUBLIC" />
</project>
1 change: 1 addition & 0 deletions kam1n0-clients/ghidra-plugin/kam1n0/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
5 changes: 5 additions & 0 deletions kam1n0-clients/ghidra-plugin/kam1n0/.pydevproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
</pydev_project>
Empty file.
61 changes: 61 additions & 0 deletions kam1n0-clients/ghidra-plugin/kam1n0/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/* ###
* 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")
}

if (ghidraInstallDir) {
apply from: new File(ghidraInstallDir).getCanonicalPath() + "/support/buildExtension.gradle"
}
else {
throw new GradleException("GHIDRA_INSTALL_DIR is not defined!")
}
//----------------------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.

}
15 changes: 15 additions & 0 deletions kam1n0-clients/ghidra-plugin/kam1n0/data/README.txt
Original file line number Diff line number Diff line change
@@ -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 changes: 50 additions & 0 deletions kam1n0-clients/ghidra-plugin/kam1n0/data/buildLanguage.xml
Original file line number Diff line number Diff line change
@@ -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 changes: 121 additions & 0 deletions kam1n0-clients/ghidra-plugin/kam1n0/data/languages/skel.cspec
Original file line number Diff line number Diff line change
@@ -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 changes: 20 additions & 0 deletions kam1n0-clients/ghidra-plugin/kam1n0/data/languages/skel.ldefs
Original file line number Diff line number Diff line change
@@ -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 changes: 12 additions & 0 deletions kam1n0-clients/ghidra-plugin/kam1n0/data/languages/skel.opinion
Original file line number Diff line number Diff line change
@@ -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 changes: 23 additions & 0 deletions kam1n0-clients/ghidra-plugin/kam1n0/data/languages/skel.pspec
Original file line number Diff line number Diff line change
@@ -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>
Loading

0 comments on commit 1c3c309

Please sign in to comment.