diff --git a/src/Neo.CLI/CLI/MainService.Tools.cs b/src/Neo.CLI/CLI/MainService.Tools.cs index 62df42109e..c000b48655 100644 --- a/src/Neo.CLI/CLI/MainService.Tools.cs +++ b/src/Neo.CLI/CLI/MainService.Tools.cs @@ -19,6 +19,7 @@ using System; using System.Collections.Generic; using System.Globalization; +using System.IO; using System.Linq; using System.Numerics; using System.Reflection; @@ -449,11 +450,16 @@ private static string Base64Fixed(string str) private string? NefFileAnalyis(string base64) { byte[] nefData; - try + if (File.Exists(base64)) // extension name not considered + nefData = File.ReadAllBytes(base64); + else { - nefData = Convert.FromBase64String(base64); + try + { + nefData = Convert.FromBase64String(base64); + } + catch { return null; } } - catch { return null; } NefFile nef; Script script; bool verifyChecksum = false;