示例#1
0
        public IToolResults Run(Guid scanID, Guid userID)
        {
            string cmd, output;

            WriteResourceFile(_options.ResourceFilePath);

            cmd = "-r " + _options.ResourceFilePath;

            ProcessStartInfo si = new ProcessStartInfo();

            si.RedirectStandardOutput = true;
            si.UseShellExecute        = false;

            Process proc = new Process();

            proc.StartInfo           = si;
            proc.EnableRaisingEvents = false;
            proc.StartInfo.FileName  = _options.Path;
            proc.StartInfo.Arguments = cmd;
            proc.Start();

            output = proc.StandardOutput.ReadToEnd();

            proc.WaitForExit();

            MetasploitToolResults results = new MetasploitToolResults(output);


            Console.WriteLine(output);
            return(results);
        }
示例#2
0
        public IToolResults Run(Guid scanID, Guid userID)
        {
            string cmd, output;

            WriteResourceFile(_options.ResourceFilePath);

            cmd = "-r " + _options.ResourceFilePath;

            ProcessStartInfo si = new ProcessStartInfo();
            si.RedirectStandardOutput = true;
            si.UseShellExecute = false;

            Process proc = new Process();

            proc.StartInfo = si;
            proc.EnableRaisingEvents = false;
            proc.StartInfo.FileName = _options.Path;
            proc.StartInfo.Arguments = cmd;
            proc.Start();

            output = proc.StandardOutput.ReadToEnd();

            proc.WaitForExit();

            MetasploitToolResults results = new MetasploitToolResults(output);

            Console.WriteLine(output);
            return results;
        }