コード例 #1
0
ファイル: Form1.cs プロジェクト: JesseClarkND/tools
        private ScannerResult CheckHeaders(ScannerRequest request, StringBuilder sb, StringBuilder linkBuilder = null)
        {
            request.LogDir = Settings.LogDir;
            ScannerResult result = Headers.Check(request);

            if (result.Success)
            {
                sb.Append("\tHeader attacks found! " + String.Join(", " + Environment.NewLine, result.Results.ToArray()) + "! Email sent." + Environment.NewLine);
                SendEmail("Header attacks found", request.URL + " appears to be vulnerable to header attacks " + String.Join(Environment.NewLine, result.Results.ToArray()));
                if (linkBuilder != null)
                {
                    linkBuilder.Append(String.Join(Environment.NewLine, result.Results.ToArray()) + Environment.NewLine);
                }
            }
            else
            {
                sb.Append("\tNo header attacks found." + Environment.NewLine);
            }

            return(result);
        }