File size: 6,132 Bytes
feb33bc
 
 
 
8546a25
feb33bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8546a25
 
 
feb33bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8546a25
feb33bc
 
 
 
 
c5be06f
 
 
 
 
 
 
feb33bc
c5be06f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8546a25
c5be06f
 
 
 
 
feb33bc
 
8546a25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
feb33bc
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Phishing Website Checker | SpectroGuard</title>

  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: "Poppins", sans-serif;
    }

    html, body {
      height: 100%;
    }

    body {
      display: flex;
      flex-direction: column;
      background: #f6f0f0;
      color: #1a1a1a;
    }

    /* ---------- HEADER ---------- */
    header {
      background:#272727;
      padding: 15px 30px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    header h2 {
      font-size: 28px;
      font-weight: 600;
      letter-spacing: 1px;
      color: #ffffff;
    }

    header nav a:hover {
      color: #000;
    }

    .container {
      max-width: 750px;
      margin: 40px auto;
      text-align: center;
      padding: 40px;
      flex: 1;
    }

    h1 {
      font-size: 42px;
      font-weight: 700;
      margin-bottom: 18px;
    }

    p.desc {
      font-size: 16px;
      color: #555;
      margin-bottom: 35px;
    }

    input {
      width: 90%;
      padding: 16px;
      border: 2px solid #ddd;
      border-radius: 10px;
      font-size: 16px;
      outline: none;
      transition: 0.2s;
    }

    input:focus {
      border-color: #888;
    }

    button {
      margin-top: 20px;
      padding: 14px 28px;
      font-size: 16px;
      background: #2d2d2d;
      color: #f1ebeb;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      transition: 0.25s;
    }

    button:hover {
      background: #000;
    }

    .result {
      margin-top: 28px;
      font-size: 20px;
      font-weight: 600;
    }

    .extra-info {
      margin-top: 40px;
      font-size: 15px;
      color: #555;
      line-height: 1.6;
      text-align: left;
    }

    /* ---------- FOOTER ---------- */
    footer {
      background: #202020;
      padding: 30px;
      color: #ffffff;
    }

    .footer-content {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 20px;
      margin-bottom: 20px;
    }

    .footer-item {
      display: flex;
      gap: 12px;
      align-items: center;
    }

    .footer-item img {
      width: 85px;
      height: 85px;
      border-radius: 40%;
      object-fit: cover;
    }

    .contact {
      font-weight: 500;
      text-align: center;
    }
  </style>
</head>

<body>

  <header>
    <h2>SPECTROGUARD</h2>
  </header>

  <div class="container">
    <h1>Phishing Website Checker</h1>
    <p class="desc">Enter any website URL. Our AI SVM model analyzes domain structure and security signals to determine if the site is legit or phishing.</p>

    <input id="urlInput" type="text" placeholder="Enter website URL..." />

    <button onclick="checkPhishing()">Check Website</button>

    <div class="result" id="resultText">Result: –</div>

    <div class="extra-info">
      This tool analyzes domain complexity, URL structure, HTTPS, redirections, and malicious patterns to flag potential phishing sites, helping users make informed, safer online decisions while remaining vigilant against deceptive attacks.    </div>
  </div>

<footer>
  <div class="footer-content">
    <div class="footer-item">
      <img src="/static/Sir.jpg" alt="Prof. Swapnil Chaudhari">
      <span>Prof. Swapnil Chaudhari
        <h5>Guide and Instructor</h5>
      </span>
    </div>
    <div class="footer-item">
      <img src="/static/Pratiksha.jpg" alt="Pratiksha Alhat">
      <span>Miss. Pratiksha Alhat
        <h5>Connectivity, Training & Testing</h5>
      </span>
    </div>
    <div class="footer-item">
      <img src="/static/Kapil.jpg" alt="Kapil Waghumbare">
      <span>Mr. Kapil Waghumbare
        <h5>UI/UX, Model Design & Tool Development</h5>
      </span>
    </div>
    <div class="footer-item">
      <img src="/static/Shraddha.jpg" alt="Shraddha Gadekar">
      <span>Miss. Shraddha Gadekar
        <h5>Model Design & Tool Development</h5>
      </span>
    </div>
  </div>
  <div class="contact">
    Contact us: <a href="https://mail.google.com/mail/?view=cm&to=spectroguard.security@gmail.com&su=SpectroGuard%20Inquiry" target="_blank" style="color: #1877F2;">spectroguard.security@gmail.com</a>
  </div>
</footer>

  <script>
    const resultEl = document.getElementById("resultText");
    const input    = document.getElementById("urlInput");

    input.addEventListener("keydown", (e) => {
      if (e.key === "Enter") checkPhishing();
    });

    async function checkPhishing() {
      const url = document.getElementById("urlInput").value.trim();
      if (!url) { resultEl.textContent = "Result: Please enter a URL"; return; }

      resultEl.textContent = "Analyzing Website Infrastructure...";
      resultEl.style.color = "#888";

      try {
        // πŸ”— FIXED: Relative address maps perfectly to your live Flask app
        const res = await fetch("/check_phishing", {
          method: "POST",
          headers: { "Content-Type": "application/json" },
          body: JSON.stringify({ url })
        });
        if (!res.ok) throw new Error();
        const data = await res.json();
        
        updateUI(data.score, data.status);
      } catch {
        resultEl.textContent = "⚠ Server Error β€” Connection could not be established";
        resultEl.style.color = "#cc0000";
      }
    }

    function updateUI(score, status) {
      let icon = "❓";
      let color = "#f0ad4e"; 
      let message = "";

      // πŸ”— FIXED: Map your UI components perfectly to your backend's direct response classifications
      if (status === "Safe") {
        icon = "βœ…";
        color = "#28a745";
        message = "Website appears safe and legitimate";
      } else {
        icon = "🚨";
        color = "#cc0000";
        message = "Potential phishing threat detected";
      }

      resultEl.textContent = `${icon} ${status} β€” ${message}. (Phishing Probability: ${score}%)`;
      resultEl.style.color = color;
    }
  </script>
</body>
</html>