Spaces:
Sleeping
Sleeping
Download templates/components/technical_analysis.html from m8chaa/one_click_ssl_m: direct link, hf CLI and curl.
- Browser
- Download file 20.4 kB
-
https://huggingface.co/spaces/m8chaa/one_click_ssl_m/resolve/main/templates/components/technical_analysis.html
- Command line
-
hf download hf://spaces/m8chaa/one_click_ssl_m/templates/components/technical_analysis.html
-
curl -L -o technical_analysis.html https://huggingface.co/spaces/m8chaa/one_click_ssl_m/resolve/main/templates/components/technical_analysis.html
20.4 kB
| <!-- Technical Analysis 컴포넌트 --> | |
| <section class="technical-analysis"> | |
| <h2>🔍 상세 기술 분석</h2> | |
| <!-- SSL/HTTPS 상태 분석 --> | |
| <div class="ssl-status-analysis"> | |
| <h3>SSL/HTTPS 상태 분석</h3> | |
| {% if ssl_case_type == 'no_ssl' %} | |
| <!-- SSL 완전 부재 케이스 --> | |
| <div class="analysis-result result-critical"> | |
| <div class="result-icon">❌</div> | |
| <div class="result-content"> | |
| <h4>SSL/HTTPS 서비스 없음</h4> | |
| <p><strong>상태:</strong> 443 포트가 닫혀있거나 SSL 인증서가 설치되지 않음</p> | |
| <div class="technical-details"> | |
| <div class="detail-item"> | |
| <strong>포트 443 연결:</strong> <span class="status-failed">연결 실패</span> | |
| </div> | |
| <div class="detail-item"> | |
| <strong>HTTPS 접속:</strong> <span class="status-failed">Connection refused</span> | |
| </div> | |
| <div class="detail-item"> | |
| <strong>브라우저 표시:</strong> <span class="status-failed">"안전하지 않음" 경고</span> | |
| </div> | |
| </div> | |
| <div class="command-example"> | |
| <strong>확인 명령어:</strong> | |
| <code>curl -I https://{{ domain }}</code> → Connection refused | |
| </div> | |
| </div> | |
| </div> | |
| {% elif ssl_case_type == 'self_signed' %} | |
| <!-- 자체 서명 인증서 케이스 --> | |
| <div class="analysis-result result-warning"> | |
| <div class="result-icon">⚠️</div> | |
| <div class="result-content"> | |
| <h4>자체 서명 인증서 사용</h4> | |
| <p><strong>상태:</strong> SSL 인증서가 존재하나 신뢰할 수 없는 발급자</p> | |
| <div class="certificate-details"> | |
| <div class="cert-info-grid"> | |
| <div class="cert-field"> | |
| <strong>Subject (발급 대상):</strong> | |
| <span>{{ cert_subject }}</span> | |
| </div> | |
| <div class="cert-field"> | |
| <strong>Issuer (발급자):</strong> | |
| <span class="self-signed-indicator">{{ cert_issuer }}</span> | |
| </div> | |
| <div class="cert-field"> | |
| <strong>자체 서명 여부:</strong> | |
| <span class="status-warning">✓ Subject = Issuer (자체 서명)</span> | |
| </div> | |
| <div class="cert-field"> | |
| <strong>유효 기간:</strong> | |
| <span>{{ cert_valid_from }} ~ {{ cert_valid_to }}</span> | |
| </div> | |
| </div> | |
| </div> | |
| {% if has_server_error %} | |
| <div class="server-error-details"> | |
| <h5>🚨 추가 서버 문제 발견</h5> | |
| <div class="error-item"> | |
| <strong>HTTP 상태 코드:</strong> <span class="status-failed">{{ http_status_code }}</span> | |
| </div> | |
| {% if http_status_code == 406 %} | |
| <p class="error-explanation"> | |
| <strong>406 Not Acceptable:</strong> 서버가 Accept 헤더를 처리하지 못하고 있습니다. | |
| nginx 프록시 설정 또는 PHP 애플리케이션에서 HTTPS 요청 처리에 문제가 있을 수 있습니다. | |
| </p> | |
| {% endif %} | |
| </div> | |
| {% endif %} | |
| </div> | |
| </div> | |
| {% elif ssl_case_type == 'expired' %} | |
| <!-- 만료된 인증서 케이스 --> | |
| <div class="analysis-result result-critical"> | |
| <div class="result-icon">⏰</div> | |
| <div class="result-content"> | |
| <h4>SSL 인증서 만료</h4> | |
| <p><strong>상태:</strong> 유효했던 인증서가 기간 만료됨</p> | |
| <div class="expiry-details"> | |
| <div class="expiry-info"> | |
| <strong>만료일:</strong> <span class="expired-date">{{ cert_expiry_date }}</span> | |
| </div> | |
| <div class="expiry-info"> | |
| <strong>만료 경과:</strong> <span class="days-expired">{{ days_expired }}일 전 만료</span> | |
| </div> | |
| <div class="expiry-info"> | |
| <strong>발급자:</strong> <span>{{ cert_issuer }}</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| {% elif ssl_case_type == 'domain_mismatch' %} | |
| <!-- 도메인 불일치 케이스 --> | |
| <div class="analysis-result result-warning"> | |
| <div class="result-icon">🔀</div> | |
| <div class="result-content"> | |
| <h4>인증서 도메인 불일치</h4> | |
| <p><strong>상태:</strong> 인증서가 다른 도메인용으로 발급됨</p> | |
| <div class="domain-details"> | |
| <div class="domain-info"> | |
| <strong>접속 도메인:</strong> <span>{{ domain }}</span> | |
| </div> | |
| <div class="domain-info"> | |
| <strong>인증서 도메인:</strong> | |
| {% for cert_domain in cert_domains %} | |
| <span class="cert-domain">{{ cert_domain }}</span>{% if not loop.last %}, {% endif %} | |
| {% endfor %} | |
| </div> | |
| <div class="domain-info"> | |
| <strong>와일드카드 매칭:</strong> | |
| <span class="{% if wildcard_match %}status-success{% else %}status-failed{% endif %}"> | |
| {% if wildcard_match %}✓ 매칭됨{% else %}✗ 매칭 안됨{% endif %} | |
| </span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| {% elif ssl_case_type == 'valid' %} | |
| <!-- 정상 SSL 케이스 --> | |
| <div class="analysis-result result-success"> | |
| <div class="result-icon">✅</div> | |
| <div class="result-content"> | |
| <h4>정상적인 SSL 인증서</h4> | |
| <p><strong>상태:</strong> 신뢰할 수 있는 CA에서 발급된 유효한 인증서</p> | |
| <div class="ssl-details-grid"> | |
| <div class="ssl-detail"> | |
| <strong>SSL Labs 등급:</strong> | |
| <span class="ssl-grade grade-{{ ssl_labs_grade.lower() }}">{{ ssl_labs_grade }}</span> | |
| </div> | |
| <div class="ssl-detail"> | |
| <strong>발급 기관:</strong> <span>{{ cert_issuer }}</span> | |
| </div> | |
| <div class="ssl-detail"> | |
| <strong>암호화 강도:</strong> <span>{{ encryption_strength }} bit</span> | |
| </div> | |
| <div class="ssl-detail"> | |
| <strong>프로토콜 지원:</strong> | |
| {% for protocol in supported_protocols %} | |
| <span class="protocol-badge">{{ protocol }}</span> | |
| {% endfor %} | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| {% endif %} | |
| </div> | |
| <!-- 브라우저별 경고 상황 --> | |
| <div class="browser-warnings"> | |
| <h3>브라우저별 경고 상황</h3> | |
| <div class="browser-grid"> | |
| {% for browser in browsers %} | |
| <div class="browser-item {% if browser.has_warning %}browser-warning{% else %}browser-safe{% endif %}"> | |
| <div class="browser-icon">{{ browser.icon }}</div> | |
| <div class="browser-info"> | |
| <h4>{{ browser.name }}</h4> | |
| <p class="browser-status">{{ browser.warning_message }}</p> | |
| {% if browser.additional_info %} | |
| <div class="browser-detail">{{ browser.additional_info }}</div> | |
| {% endif %} | |
| </div> | |
| </div> | |
| {% endfor %} | |
| </div> | |
| </div> | |
| <!-- 보안 헤더 분석 --> | |
| <div class="security-headers"> | |
| <h3>보안 헤더 분석</h3> | |
| <div class="headers-analysis"> | |
| {% for header_name, header_data in security_headers.items() %} | |
| <div class="header-item"> | |
| <div class="header-status"> | |
| {% if header_data.present %} | |
| <span class="status-success">✓</span> | |
| {% else %} | |
| <span class="status-failed">✗</span> | |
| {% endif %} | |
| </div> | |
| <div class="header-info"> | |
| <h4>{{ header_name }}</h4> | |
| {% if header_data.present %} | |
| <p class="header-value">{{ header_data.value }}</p> | |
| <div class="header-score">점수: {{ header_data.score }}/10</div> | |
| {% else %} | |
| <p class="header-missing">헤더가 설정되지 않음</p> | |
| <div class="header-recommendation">{{ header_data.recommendation }}</div> | |
| {% endif %} | |
| </div> | |
| </div> | |
| {% endfor %} | |
| </div> | |
| </div> | |
| <!-- 보안 점수 세부 분석 --> | |
| <div class="security-score-breakdown"> | |
| <h3>📊 보안 점수 세부 분석</h3> | |
| <div class="score-breakdown"> | |
| <div class="score-category"> | |
| <div class="category-name">SSL/TLS 인증서</div> | |
| <div class="category-progress"> | |
| <div class="progress-bar"> | |
| <div class="progress-fill" style="width: {{ (ssl_score / 40 * 100)|round }}%"></div> | |
| </div> | |
| </div> | |
| <div class="category-score">{{ ssl_score }}/40</div> | |
| <div class="category-detail">{{ ssl_score_detail }}</div> | |
| </div> | |
| <div class="score-category"> | |
| <div class="category-name">보안 헤더</div> | |
| <div class="category-progress"> | |
| <div class="progress-bar"> | |
| <div class="progress-fill" style="width: {{ (headers_score / 20 * 100)|round }}%"></div> | |
| </div> | |
| </div> | |
| <div class="category-score">{{ headers_score }}/20</div> | |
| <div class="category-detail">{{ headers_count }}개 헤더 중 {{ headers_present }}개 설정됨</div> | |
| </div> | |
| <div class="score-category"> | |
| <div class="category-name">프로토콜 지원</div> | |
| <div class="category-progress"> | |
| <div class="progress-bar"> | |
| <div class="progress-fill" style="width: {{ (protocol_score / 15 * 100)|round }}%"></div> | |
| </div> | |
| </div> | |
| <div class="category-score">{{ protocol_score }}/15</div> | |
| <div class="category-detail">{{ protocol_detail }}</div> | |
| </div> | |
| <div class="score-category"> | |
| <div class="category-name">암호화 강도</div> | |
| <div class="category-progress"> | |
| <div class="progress-bar"> | |
| <div class="progress-fill" style="width: {{ (cipher_score / 25 * 100)|round }}%"></div> | |
| </div> | |
| </div> | |
| <div class="category-score">{{ cipher_score }}/25</div> | |
| <div class="category-detail">{{ cipher_detail }}</div> | |
| </div> | |
| <div class="score-total"> | |
| <div class="total-label">총 보안 점수</div> | |
| <div class="total-score">{{ total_score }}/100</div> | |
| <div class="total-grade grade-{{ grade_class }}">{{ security_grade }}</div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- 성능 영향 분석 --> | |
| <div class="performance-analysis"> | |
| <h3>⚡ 성능 영향 분석</h3> | |
| <div class="performance-metrics"> | |
| <div class="perf-metric"> | |
| <strong>HTTP 응답 시간:</strong> | |
| <span class="perf-time {{ 'slow' if http_response_time > 3000 else 'normal' }}"> | |
| {{ http_response_time }}ms | |
| </span> | |
| </div> | |
| {% if https_available %} | |
| <div class="perf-metric"> | |
| <strong>HTTPS 응답 시간:</strong> | |
| <span class="perf-time {{ 'slow' if https_response_time > 3000 else 'normal' }}"> | |
| {{ https_response_time }}ms | |
| </span> | |
| </div> | |
| <div class="perf-metric"> | |
| <strong>SSL 핸드셰이크 오버헤드:</strong> | |
| <span class="perf-overhead">+{{ ssl_overhead_time }}ms</span> | |
| </div> | |
| {% endif %} | |
| <div class="perf-metric"> | |
| <strong>HTTP/2 지원:</strong> | |
| <span class="{% if http2_support %}status-success{% else %}status-warning{% endif %}"> | |
| {% if http2_support %}✓ 지원됨{% else %}✗ 지원 안됨{% endif %} | |
| </span> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <style> | |
| /* Technical Analysis 스타일 */ | |
| .technical-analysis { | |
| margin-bottom: 30px; | |
| } | |
| /* 분석 결과 박스 */ | |
| .analysis-result { | |
| display: flex; | |
| align-items: flex-start; | |
| padding: 20px; | |
| border-radius: 8px; | |
| margin-bottom: 20px; | |
| page-break-inside: avoid; | |
| border-left: 5px solid; | |
| } | |
| .analysis-result.result-critical { | |
| background-color: #fff5f5; | |
| border-left-color: #dc3545; | |
| border: 1px solid #f8d7da; | |
| } | |
| .analysis-result.result-warning { | |
| background-color: #fffdf0; | |
| border-left-color: #ffc107; | |
| border: 1px solid #fff3cd; | |
| } | |
| .analysis-result.result-success { | |
| background-color: #f5fff5; | |
| border-left-color: #28a745; | |
| border: 1px solid #d4edda; | |
| } | |
| .result-icon { | |
| font-size: 24px; | |
| margin-right: 15px; | |
| flex-shrink: 0; | |
| } | |
| .result-content { | |
| flex: 1; | |
| } | |
| .result-content h4 { | |
| margin: 0 0 10px 0; | |
| font-size: 16px; | |
| font-weight: bold; | |
| color: #333; | |
| } | |
| /* 기술 세부사항 */ | |
| .technical-details, .certificate-details { | |
| margin-top: 15px; | |
| background: rgba(255, 255, 255, 0.7); | |
| padding: 15px; | |
| border-radius: 6px; | |
| } | |
| .detail-item, .cert-field { | |
| display: flex; | |
| justify-content: space-between; | |
| padding: 8px 0; | |
| border-bottom: 1px solid #e9ecef; | |
| } | |
| .detail-item:last-child, .cert-field:last-child { | |
| border-bottom: none; | |
| } | |
| .detail-item strong, .cert-field strong { | |
| min-width: 150px; | |
| color: #495057; | |
| } | |
| /* 상태 표시 */ | |
| .status-failed { | |
| color: #dc3545; | |
| font-weight: bold; | |
| } | |
| .status-warning { | |
| color: #fd7e14; | |
| font-weight: bold; | |
| } | |
| .status-success { | |
| color: #28a745; | |
| font-weight: bold; | |
| } | |
| /* 명령어 예시 */ | |
| .command-example { | |
| margin-top: 12px; | |
| padding: 10px; | |
| background-color: #f8f9fa; | |
| border-radius: 4px; | |
| font-family: 'Courier New', monospace; | |
| } | |
| .command-example code { | |
| background-color: #e9ecef; | |
| padding: 2px 6px; | |
| border-radius: 3px; | |
| font-size: 11px; | |
| } | |
| /* 인증서 정보 그리드 */ | |
| .cert-info-grid { | |
| display: grid; | |
| grid-template-columns: 1fr; | |
| gap: 8px; | |
| } | |
| .self-signed-indicator { | |
| color: #fd7e14; | |
| font-weight: bold; | |
| } | |
| /* 서버 오류 상세 */ | |
| .server-error-details { | |
| margin-top: 15px; | |
| padding: 15px; | |
| background-color: #fff5f5; | |
| border: 1px solid #f8d7da; | |
| border-radius: 6px; | |
| } | |
| .server-error-details h5 { | |
| margin: 0 0 10px 0; | |
| color: #721c24; | |
| font-size: 14px; | |
| } | |
| .error-explanation { | |
| font-size: 12px; | |
| line-height: 1.4; | |
| color: #721c24; | |
| margin-top: 10px; | |
| font-style: italic; | |
| } | |
| /* 브라우저 그리드 */ | |
| .browser-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| gap: 15px; | |
| margin-top: 15px; | |
| } | |
| .browser-item { | |
| display: flex; | |
| align-items: center; | |
| padding: 15px; | |
| border-radius: 6px; | |
| border: 1px solid #e9ecef; | |
| } | |
| .browser-item.browser-warning { | |
| background-color: #fff3cd; | |
| border-color: #ffeaa7; | |
| } | |
| .browser-item.browser-safe { | |
| background-color: #d4edda; | |
| border-color: #c3e6cb; | |
| } | |
| .browser-icon { | |
| font-size: 20px; | |
| margin-right: 12px; | |
| flex-shrink: 0; | |
| } | |
| .browser-info h4 { | |
| margin: 0 0 5px 0; | |
| font-size: 14px; | |
| font-weight: bold; | |
| } | |
| .browser-status { | |
| margin: 0; | |
| font-size: 12px; | |
| line-height: 1.3; | |
| } | |
| .browser-detail { | |
| font-size: 10px; | |
| color: #6c757d; | |
| margin-top: 5px; | |
| } | |
| /* 보안 헤더 */ | |
| .headers-analysis { | |
| margin-top: 15px; | |
| } | |
| .header-item { | |
| display: flex; | |
| align-items: flex-start; | |
| padding: 12px; | |
| border-bottom: 1px solid #e9ecef; | |
| background: rgba(255, 255, 255, 0.5); | |
| } | |
| .header-item:last-child { | |
| border-bottom: none; | |
| } | |
| .header-status { | |
| margin-right: 12px; | |
| font-size: 16px; | |
| } | |
| .header-info h4 { | |
| margin: 0 0 5px 0; | |
| font-size: 13px; | |
| font-weight: bold; | |
| } | |
| .header-value { | |
| font-family: 'Courier New', monospace; | |
| font-size: 11px; | |
| background: #f8f9fa; | |
| padding: 4px 6px; | |
| border-radius: 3px; | |
| margin: 0 0 5px 0; | |
| } | |
| .header-missing { | |
| color: #6c757d; | |
| font-size: 12px; | |
| margin: 0; | |
| } | |
| .header-score { | |
| font-size: 11px; | |
| font-weight: bold; | |
| color: #28a745; | |
| } | |
| .header-recommendation { | |
| font-size: 11px; | |
| color: #6c757d; | |
| font-style: italic; | |
| } | |
| /* 점수 분석 */ | |
| .security-score-breakdown { | |
| background: #f8f9fa; | |
| padding: 20px; | |
| border-radius: 8px; | |
| margin-top: 25px; | |
| } | |
| .score-breakdown { | |
| margin-top: 15px; | |
| } | |
| .score-category { | |
| display: grid; | |
| grid-template-columns: 150px 1fr 60px; | |
| gap: 12px; | |
| align-items: center; | |
| padding: 12px 0; | |
| border-bottom: 1px solid #dee2e6; | |
| } | |
| .score-category:last-child { | |
| border-bottom: none; | |
| } | |
| .category-name { | |
| font-size: 12px; | |
| font-weight: bold; | |
| color: #495057; | |
| } | |
| .progress-bar { | |
| height: 8px; | |
| background-color: #e9ecef; | |
| border-radius: 4px; | |
| overflow: hidden; | |
| } | |
| .progress-fill { | |
| height: 100%; | |
| background-color: #28a745; | |
| transition: width 0.3s ease; | |
| } | |
| .category-score { | |
| font-size: 12px; | |
| font-weight: bold; | |
| text-align: right; | |
| } | |
| .category-detail { | |
| grid-column: 1 / -1; | |
| font-size: 10px; | |
| color: #6c757d; | |
| margin-top: 5px; | |
| } | |
| .score-total { | |
| display: grid; | |
| grid-template-columns: 1fr auto auto; | |
| gap: 15px; | |
| align-items: center; | |
| margin-top: 15px; | |
| padding-top: 15px; | |
| border-top: 2px solid #007bff; | |
| font-weight: bold; | |
| } | |
| .total-label { | |
| font-size: 14px; | |
| color: #333; | |
| } | |
| .total-score { | |
| font-size: 16px; | |
| color: #007bff; | |
| } | |
| .total-grade { | |
| font-size: 16px; | |
| } | |
| /* SSL Labs 등급 */ | |
| .ssl-grade { | |
| display: inline-block; | |
| padding: 4px 8px; | |
| border-radius: 4px; | |
| font-weight: bold; | |
| color: white; | |
| text-align: center; | |
| min-width: 30px; | |
| } | |
| /* 프로토콜 배지 */ | |
| .protocol-badge { | |
| display: inline-block; | |
| padding: 2px 6px; | |
| margin: 0 2px; | |
| background-color: #007bff; | |
| color: white; | |
| font-size: 10px; | |
| border-radius: 3px; | |
| } | |
| /* 성능 메트릭 */ | |
| .performance-metrics { | |
| margin-top: 15px; | |
| background: rgba(255, 255, 255, 0.7); | |
| padding: 15px; | |
| border-radius: 6px; | |
| } | |
| .perf-metric { | |
| display: flex; | |
| justify-content: space-between; | |
| padding: 8px 0; | |
| border-bottom: 1px solid #e9ecef; | |
| } | |
| .perf-metric:last-child { | |
| border-bottom: none; | |
| } | |
| .perf-time.slow { | |
| color: #dc3545; | |
| font-weight: bold; | |
| } | |
| .perf-time.normal { | |
| color: #28a745; | |
| } | |
| .perf-overhead { | |
| color: #fd7e14; | |
| font-size: 11px; | |
| } | |
| /* 반응형 */ | |
| @media print { | |
| .browser-grid { | |
| grid-template-columns: repeat(2, 1fr); | |
| } | |
| .score-category { | |
| grid-template-columns: 120px 1fr 50px; | |
| gap: 8px; | |
| } | |
| } | |
| </style> |