mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-990 - Scripting - fixed incorrect parsing of certification header for python scripts
This commit is contained in:
parent
6397e835dc
commit
e3b787a524
4 changed files with 37 additions and 17 deletions
|
@ -61,6 +61,21 @@ public class PythonScriptProvider extends GhidraScriptProvider {
|
|||
return "#";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getCertifyHeaderStart() {
|
||||
return "## ###";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getCertificationBodyPrefix() {
|
||||
return "#";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getCertifyHeaderEnd() {
|
||||
return "##";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Python";
|
||||
|
|
|
@ -137,15 +137,15 @@ public class PythonScriptInfoTest extends AbstractGhidraHeadedIntegrationTest {
|
|||
try {
|
||||
//@formatter:off
|
||||
scriptFile = createTempPyScriptFileWithLines(
|
||||
"## ###" +
|
||||
"# IP: GHIDRA" +
|
||||
"# " +
|
||||
"# Some license text..." +
|
||||
"# you may not use this file except in compliance with the License." +
|
||||
"# " +
|
||||
"# blah blah blah" +
|
||||
"##" +
|
||||
"" +
|
||||
"## ###",
|
||||
"# IP: GHIDRA",
|
||||
"# ",
|
||||
"# Some license text...",
|
||||
"# you may not use this file except in compliance with the License.",
|
||||
"# ",
|
||||
"# blah blah blah",
|
||||
"##",
|
||||
"",
|
||||
"'''",
|
||||
"This is a test block comment. It will be ignored.",
|
||||
"@category NotTheRealCategory",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue