Exemplo n.º 1
0
        /// <summary>
        /// A DIE scan thread
        /// </summary>
        /// <param name="argslist">scanner, target args object</param>
        private void DetectItScanThread(object?argslist)
        {
            if (argslist is null)
            {
                return;
            }

            List <object> args = (List <object>)argslist;

            DiELibDotNet.DieLib scanner = (DiELibDotNet.DieLib)args[0];
            BinaryTarget        targ    = (BinaryTarget)args[1];

            if (!scanner.DatabaseLoaded)
            {
                return;
            }

            ulong handle = (ulong)args[2];


            string result;

            try
            {
                DiELibDotNet.DieScript.SCAN_OPTIONS options = new DiELibDotNet.DieScript.SCAN_OPTIONS();
                options.showOptions = true;
                options.showVersion = true;
                options.showType    = true;
                options.deepScan    = false; //very slow
                while (true)
                {
                    if (rgatState.NetworkBridge.Connected && rgatState.NetworkBridge.GUIMode is false)
                    {
                        DieScript.SCANPROGRESS?progress = dielib.QueryProgress(handle);
                        JObject statusObj = new JObject {
                            { "TargetSHA1", targ.GetSHA1Hash() },
                            { "Type", "DIE" },
Exemplo n.º 2
0
 /// <summary>
 /// Create a DIE scanner
 /// </summary>
 /// <param name="DBPath">Path to the DIE signatures</param>
 public DetectItEasy(string DBPath)
 {
     dielib = new DiELibDotNet.DieLib(GetScriptsPath(DBPath));
     dielib.SetLogCallback((string logevent) => { Logging.RecordLogEvent($"DiEScript log output: \"{logevent}\""); });
 }