tests/final-tests 完成最终代码 #34
@@ -3,6 +3,8 @@ from typing import Dict, List, Tuple, Optional
|
|||||||
from reportlab.lib.pagesizes import letter
|
from reportlab.lib.pagesizes import letter
|
||||||
from reportlab.lib.styles import getSampleStyleSheet
|
from reportlab.lib.styles import getSampleStyleSheet
|
||||||
from reportlab.platypus import Paragraph, Spacer, SimpleDocTemplate
|
from reportlab.platypus import Paragraph, Spacer, SimpleDocTemplate
|
||||||
|
|
||||||
|
from detection.pickle_detection import pickleDataDetection
|
||||||
from .Regexdetection import find_dangerous_functions
|
from .Regexdetection import find_dangerous_functions
|
||||||
from .GPTdetection import detectGPT
|
from .GPTdetection import detectGPT
|
||||||
from .pyc_detection import disassemble_pyc
|
from .pyc_detection import disassemble_pyc
|
||||||
@@ -425,9 +427,18 @@ def main():
|
|||||||
help="Path to pycdc.exe to decompile",
|
help="Path to pycdc.exe to decompile",
|
||||||
default=os.getenv("pycdc"),
|
default=os.getenv("pycdc"),
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-P",
|
||||||
|
"--Pickle",
|
||||||
|
help="Path to pickle file to analyze",
|
||||||
|
default=None,
|
||||||
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
output_format = "txt" # Default output format
|
output_format = "txt" # Default output format
|
||||||
output_file = None
|
output_file = None
|
||||||
|
if args.Pickle:
|
||||||
|
pickleDataDetection(args.Pickle, args.output)
|
||||||
|
return
|
||||||
if args.output:
|
if args.output:
|
||||||
_, ext = os.path.splitext(args.output)
|
_, ext = os.path.splitext(args.output)
|
||||||
ext = ext.lower()
|
ext = ext.lower()
|
||||||
|
|||||||
Reference in New Issue
Block a user