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); }
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; }
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); }