mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Merge branch 'master' of gitlab.evoforge.org:ghidra/ghidra into debugger
This commit is contained in:
@@ -1,30 +1,4 @@
|
||||
##VERSION: 2.0
|
||||
README.txt||GHIDRA||||END|
|
||||
distributableGPLExtension.gradle||GHIDRA||||END|
|
||||
distributableGPLModule.gradle||GHIDRA||||END|
|
||||
distributableGhidraExtension.gradle||GHIDRA||||END|
|
||||
distributableGhidraModule.gradle||GHIDRA||||END|
|
||||
externalGhidraExtension.gradle||GHIDRA||||END|
|
||||
helpProject.gradle||GHIDRA||||END|
|
||||
jacocoProject.gradle||GHIDRA||||END|
|
||||
javaProject.gradle||GHIDRA||||END|
|
||||
javaTestProject.gradle||GHIDRA||||END|
|
||||
nativeProject.gradle||GHIDRA||||END|
|
||||
processorProject.gradle||GHIDRA||||END|
|
||||
root/distribution.gradle||GHIDRA||||END|
|
||||
root/eclipse.gradle||GHIDRA||||END|
|
||||
root/jacoco.gradle||GHIDRA||||END|
|
||||
root/prepDev.gradle||GHIDRA||||END|
|
||||
root/svg.gradle||GHIDRA||||END|
|
||||
root/test.gradle||GHIDRA||||END|
|
||||
root/usage.gradle||GHIDRA||||END|
|
||||
support/app_config_breakout.txt||GHIDRA||||END|
|
||||
support/distributionCommon.gradle||GHIDRA||||END|
|
||||
support/eclipseLauncher.gradle||GHIDRA||||END|
|
||||
support/extensionCommon.gradle||GHIDRA||||END|
|
||||
support/fetchDependencies.gradle||GHIDRA||||END|
|
||||
support/ip.gradle||GHIDRA||||END|
|
||||
support/jacoco.excludes.src.txt||GHIDRA||||END|
|
||||
support/loadApplicationProperties.gradle||GHIDRA||||END|
|
||||
support/settingsUtil.gradle||GHIDRA||||END|
|
||||
support/testUtils.gradle||GHIDRA||||END|
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*****************************************************************************************
|
||||
This file is a "mix-in" gradle script that individual gradle projects should include if it
|
||||
has content that should be included in a distribution as an extension. Including this
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
|
||||
|
||||
rootProject.assembleDistribution {
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*****************************************************************************************
|
||||
This file is a "mix-in" gradle script that individual gradle projects should include if it
|
||||
has content that should be included in a distribution as an extension. Including this
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*****************************************************************************************
|
||||
This file is a "mix-in" gradle script that individual gradle projects should include if it
|
||||
has content that should be included in a distribution. (Unless the content should be included
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
apply from: "$rootProject.projectDir/gradle/support/distributionCommon.gradle"
|
||||
apply from: "$rootProject.projectDir/gradle/support/extensionCommon.gradle"
|
||||
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*****************************************************************************************
|
||||
This file is a "mix-in" gradle script that individual gradle projects should include if they
|
||||
have content for the Ghidra help system. A gradle project can include help support by adding
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*****************************************************************************************
|
||||
This file is a "mix-in" gradle script that individual gradle projects that should be included
|
||||
when running jacoco
|
||||
@@ -32,4 +47,4 @@ clean {
|
||||
logger.debug("Deleting jacoco report directory: $rootProject.buildDir/reports/jacoco/")
|
||||
file("$rootProject.buildDir/reports/jacoco/").deleteDir() // delete jacocoReport, jacocoBranchReport output
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*****************************************************************************************
|
||||
This file is a "mix-in" gradle script that individual gradle projects should include if they
|
||||
have java code.
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*****************************************************************************************
|
||||
This file is a "mix-in" gradle script that individual gradle projects that should be included
|
||||
if this module has tests that should be included when running all the Ghidra tests.
|
||||
@@ -164,10 +179,18 @@ def initTestJVM(Task task, String rootDirName) {
|
||||
'-Djdk.attach.allowAttachSelf',
|
||||
'-javaagent:' + jmockitPath,
|
||||
'-DLock.DEBUG=true',
|
||||
'-Xdebug',
|
||||
'-Xnoagent',
|
||||
'-Djava.compiler=NONE',
|
||||
'-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=' + debugPort
|
||||
'-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=' + debugPort
|
||||
|
||||
|
||||
// Note: modern remote debug invocation;
|
||||
// -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
|
||||
|
||||
//
|
||||
// We removed these lines, which should not be needed in modern JVMs
|
||||
// -Xdebug
|
||||
// -Xnoagent
|
||||
// -Djava.compiler=NONE
|
||||
// -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
|
||||
}
|
||||
}
|
||||
/*********************************************************************************
|
||||
@@ -193,4 +216,4 @@ def endTestTimer(Task task) {
|
||||
long secs = (elapsedMS - (hrs * msPerHour) - (mins * msPerMin)) / 1000;
|
||||
println ":" + task.project.name + ":" + task.name + " elapsed time: " +
|
||||
String.format("%d:%02d:%02d", hrs, mins, secs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*****************************************************************************************
|
||||
This file is a "mix-in" gradle script that individual gradle projects should include if they
|
||||
have native code (C or C++).
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*****************************************************************************************
|
||||
This file is a "mix-in" gradle script that individual gradle projects should include if they
|
||||
have processor definitions.
|
||||
@@ -258,4 +273,4 @@ def resolveSleighArg(String arg, boolean useDevPath) {
|
||||
newArg += modulePath
|
||||
newArg += tail
|
||||
return newArg
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
import org.apache.tools.ant.filters.*
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
eclipse {
|
||||
project {
|
||||
name = '___root'
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
import groovy.io.FileType;
|
||||
|
||||
apply plugin:'jacoco'
|
||||
@@ -96,4 +111,4 @@ task jacocoReport(type: JacocoReport, group: 'Coverage reports') {
|
||||
enabled false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
|
||||
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/******************************************************************************************
|
||||
* PrepDev - task to prepare a development environment for Ghidra. It needs to be run
|
||||
* whenever the Ghidra git repos are first cloned or after a 'clean'. It also
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*********************************************************************************
|
||||
* SVG
|
||||
*
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*********************************************************************************
|
||||
* test.gradle
|
||||
*
|
||||
@@ -332,10 +347,18 @@ def initTestJVM(Task task, String rootDirName) {
|
||||
'-Djdk.attach.allowAttachSelf',
|
||||
'-javaagent:' + jmockitPath,
|
||||
'-DLock.DEBUG=true',
|
||||
'-Xdebug',
|
||||
'-Xnoagent',
|
||||
'-Djava.compiler=NONE',
|
||||
'-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=' + debugPort
|
||||
'-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=' + debugPort
|
||||
|
||||
|
||||
// Note: modern remote debug invocation;
|
||||
// -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
|
||||
|
||||
//
|
||||
// We removed these lines, which should not be needed in modern JVMs
|
||||
// -Xdebug
|
||||
// -Xnoagent
|
||||
// -Djava.compiler=NONE
|
||||
// -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
defaultTasks ':usage'
|
||||
|
||||
task usage {
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
apply from: "$rootProject.projectDir/gradle/support/ip.gradle"
|
||||
|
||||
// all application tests depend on all the sleigh processors to be built
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
import org.gradle.api.*;
|
||||
import org.gradle.artifacts.*;
|
||||
import org.gradle.process.JavaExecSpec;
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
import org.apache.tools.ant.filters.*
|
||||
|
||||
task zipExtensions (type: Zip) {
|
||||
@@ -121,4 +136,4 @@ plugins.withType(JavaPlugin) {
|
||||
into { getBaseProjectName(p) + "/lib" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*******************************************************************************
|
||||
* fetchDependencies.gradle *
|
||||
* *
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*********************************************************************************
|
||||
* ip.gradle
|
||||
*
|
||||
@@ -152,12 +166,13 @@ def addToMap(Map<String, List<String>> map, String ip, String path) {
|
||||
/*********************************************************************************
|
||||
* checks if a file supports a C style header based on its extension.
|
||||
*********************************************************************************/
|
||||
def isSourceFile(File file) {
|
||||
def isCSourceFile(File file) {
|
||||
|
||||
String filename = file.getName().toLowerCase();
|
||||
|
||||
return filename.endsWith(".java") ||
|
||||
filename.endsWith(".c") ||
|
||||
filename.endsWith(".gradle") ||
|
||||
filename.endsWith(".groovy") ||
|
||||
filename.endsWith(".cpp") ||
|
||||
filename.endsWith(".cc") ||
|
||||
@@ -170,26 +185,49 @@ def isSourceFile(File file) {
|
||||
filename.endsWith(".proto");
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* checks if a file supports a Bash style header based on its extension.
|
||||
*********************************************************************************/
|
||||
def isBashSourceFile(File file) {
|
||||
|
||||
String filename = file.getName().toLowerCase();
|
||||
|
||||
// NOTE: bash/shell scripts without extension will not utilize a header
|
||||
return filename.endsWith(".py") ||
|
||||
filename.endsWith(".sh") ||
|
||||
filename.endsWith(".bash") ||
|
||||
filename.endsWith(".command");
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************************
|
||||
* Gets the ip for a file in the module from its header (or certification.manifest
|
||||
* Gets the ip for a file in the module from its header (or certification.manifest)
|
||||
*********************************************************************************/
|
||||
def getIp(File projectDir, File file) {
|
||||
if (isSourceFile(file)) {
|
||||
return getIpForSourceFile(file);
|
||||
String ip = null;
|
||||
if (isCSourceFile(file)) {
|
||||
ip = getIpForSourceFile(file, " * IP:");
|
||||
}
|
||||
return getIpForNonSourceFile(projectDir, file);
|
||||
else if (isBashSourceFile(file)) {
|
||||
ip = getIpForSourceFile(file, "# IP:");
|
||||
}
|
||||
if (ip == null) {
|
||||
ip = getIpForNonSourceFile(projectDir, file);
|
||||
}
|
||||
return ip;
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* Gets the ip from a file that has a certification header
|
||||
*********************************************************************************/
|
||||
def getIpForSourceFile(File file) {
|
||||
def getIpForSourceFile(File file, String prefix) {
|
||||
// IP marking occurs within first 4-lines of file
|
||||
String ip =null
|
||||
String line;
|
||||
int lineNum = 0;
|
||||
file.withReader { reader ->
|
||||
while((line = reader.readLine()) != null) {
|
||||
if (line.startsWith(" * IP:")) {
|
||||
while(++lineNum < 5 && (line = reader.readLine()) != null) {
|
||||
if (line.startsWith(prefix)) {
|
||||
ip = line.substring(7).trim();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/*****************************************************************************************
|
||||
*
|
||||
* Reads the Ghidra/application.properties file and sets properties for the version,
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
/**************************************************************************************
|
||||
* Method to add a single project to this gradle build.
|
||||
*
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* ###
|
||||
* 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.
|
||||
*/
|
||||
import java.util.regex.*;
|
||||
import groovy.io.FileType;
|
||||
import java.lang.reflect.Constructor;
|
||||
|
||||
Reference in New Issue
Block a user