tests/final-tests 完成最终代码 #34

Merged
sangge merged 39 commits from tests/final-tests into main 2024-06-09 13:09:50 +08:00
Showing only changes of commit 0f2fb3c925 - Show all commits

View File

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