Esempio n. 1
0
 public OpenVASManager(OpenVASSession session)
 {
     if (session != null)
     {
         _session = session;
     }
     else
     {
         throw new ArgumentNullException("session");
     }
 }
Esempio n. 2
0
        static void Main1(string[] args)
        {
            // Get OpenVAS Version
            using (OpenVASSession session = new OpenVASSession("admin", "admin", "192.168.1.xxx"))
            {
                XDocument doc = session.ExecuteCommand(
                    XDocument.Parse("<get_version />"));

                Console.WriteLine(doc.ToString());
            }
        }
Esempio n. 3
0
        static void Main2(string[] args)
        {
            using (OpenVASSession session = new OpenVASSession("admin", "admin", "192.168.1.xxx"))
            {
                using (OpenVASManager manager = new OpenVASManager(session))

                {
                    XDocument version = manager.GetVersion();
                    Console.WriteLine(version);
                }
            }
        }