コード例 #1
0
ファイル: DirbScan.cs プロジェクト: JonasGav/SecSoul.Web
        public Task ExecuteDirbScan(ScanRequest request)
        {
            try
            {
                var uri = new Uri(request.WebsiteUrl);

                var dirb = _possibleScans.Scans.First(x => x.Id == (int)ScanEnum.Dirb);

                _shellService.ShellExecute(string.Format(dirb.Script, request.Id, uri.AbsoluteUri));

                ExtractDirbResult(request);
            }
            catch (Exception e)
            {
                _logger.LogError(e, "Error at ExecuteDirbScan, Error: ");
            }
            return(Task.CompletedTask);
        }
コード例 #2
0
ファイル: NmapScan.cs プロジェクト: JonasGav/SecSoul.Web
        public Task ExecuteNmapScan(ScanRequest request)
        {
            try
            {
                var uri = new Uri(request.WebsiteUrl);

                var nmap = _possibleScans.Scans.First(x => x.Id == (int) ScanEnum.Nmap);
                
                _shellService.ShellExecute(string.Format(nmap.Script, request.Id, uri.Host));

                ExtractNmapResult(request);
            }
            catch (Exception e)
            {
                _logger.LogError(e, "Error at ExecuteNmapScan, Error: ");
            }
            return Task.CompletedTask;
        }
コード例 #3
0
        public Task ExecuteHashCheckScan(ScanRequest request)
        {
            try
            {
                var uri = new Uri(request.WebsiteFtp);

                var nmap = _possibleScans.Scans.First(x => x.Id == (int)ScanEnum.HashScan);

                _shellService.ShellExecute(string.Format(nmap.Script, request.Id, uri.AbsoluteUri, request.FtpUsername,
                                                         request.FtpPassword));

                ExtractHashCheckResult(request);
            }
            catch (Exception e)
            {
                _logger.LogError(e, "Error at ExecuteHashCheckScan, Error: ");
            }

            return(Task.CompletedTask);
        }