From 688f0de678547657316a1b8ecba2ac67e32dab55 Mon Sep 17 00:00:00 2001 From: Hecate2 <2474101468@qq.com> Date: Fri, 6 Sep 2024 12:15:02 +0800 Subject: [PATCH] add SecurityAnalysis --- src/Neo.Compiler.CSharp/Program.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Neo.Compiler.CSharp/Program.cs b/src/Neo.Compiler.CSharp/Program.cs index 39cc1ee8e..46c1d3c65 100644 --- a/src/Neo.Compiler.CSharp/Program.cs +++ b/src/Neo.Compiler.CSharp/Program.cs @@ -124,6 +124,8 @@ private static void Handle(RootCommand command, Options options, string[]? paths if (debugInfo != null) File.WriteAllBytes(Path.Combine(directory, filename + ".optimized.nefdbgnfo"), DumpNef.ZipDebugInfo(debugInfo.ToByteArray(true), filename + ".optimized.debug.json")); Console.WriteLine($"Optimization finished."); + if (options.SecurityAnalysis) + ReEntrancyAnalyzer.AnalyzeSingleContractReEntrancy(nef, manifest, debugInfo).GetWarningInfo(print: true); return; } if (extension != ".cs")