public static CxWSQueryVulnerabilityData[] GetScanResultsPath(long scanId)
        {
            CxWSQueryVulnerabilityData[] res = null;
            LoginResult loginResult          = getLoginResult();

            CxWebServiceClient client;

            try
            {
                client = new CxWebServiceClient(loginResult.AuthenticationData);
            }
            catch (Exception e)
            {
                Logger.Create().Error(e.ToString());
                MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK);
                return(null);
            }

            CxWSResponceQuerisForScan cXWSResponseResults = client.ServiceClient.GetQueriesForScan(loginResult.SessionId, scanId);

            if (!cXWSResponseResults.IsSuccesfull)
            {
                // show error message
                MessageBox.Show(cXWSResponseResults.ErrorMessage, "Error", MessageBoxButtons.OK);
                return(null);
            }

            res = cXWSResponseResults.Queries;

            return(res);
        }
        public static CxWSQueryVulnerabilityData[] GetScanResultsPaths(string scanTaskId, ref long scaId)
        {
            CxWSQueryVulnerabilityData[] res = null;
            LoginResult        loginResult   = getLoginResult();
            CxWebServiceClient client;

            try
            {
                client = new CxWebServiceClient(loginResult.AuthenticationData);
            }
            catch (Exception e)
            {
                Logger.Create().Error(e.ToString());
                MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK);
                return(null);
            }

            //check for format compatability - scan id should be a long number
            long scanTaskIdNum;
            bool resParse = long.TryParse(scanTaskId, out scanTaskIdNum);

            if (!resParse)
            {
                // show error message
                MessageBox.Show("Scan ID is in wrong format", "Error", MessageBoxButtons.OK);
                return(null);
            }

            CxWSResponceQuerisForScan cXWSResponseResults = client.ServiceClient.GetQueriesForScan(loginResult.SessionId, scanTaskIdNum);

            if (!cXWSResponseResults.IsSuccesfull)
            {
                // show error message
                MessageBox.Show(cXWSResponseResults.ErrorMessage, "Error", MessageBoxButtons.OK);
                return(null);
            }

            res = cXWSResponseResults.Queries;

            scaId = scanTaskIdNum;

            return(res);
        }
Beispiel #3
0
    public CxWSResponceQuerisForScan GetQueriesForScan(string sessionID, long scanId)
    {
        CxWSResponceQuerisForScan result = _web_Service.GetQueriesForScan(sessionID, scanId);

        return(result);
    }