|
111 | 111 | <input id="timeout-misconfig-input" type="number" min="0" class="form-control premium-input" value="${escValue(String(cfg.timeout_misconfig ?? 1800))}" /> |
112 | 112 | <span>seconds</span> |
113 | 113 | </div> |
| 114 | + <div class="timeout-field"> |
| 115 | + <label>🕷️ Katana Crawler</label> |
| 116 | + <input id="timeout-katana-input" type="number" min="0" class="form-control premium-input" value="${escValue(String(cfg.timeout_katana ?? 600))}" /> |
| 117 | + <span>seconds</span> |
| 118 | + </div> |
| 119 | + <div class="timeout-field"> |
| 120 | + <label>🐛 Dalfox XSS</label> |
| 121 | + <input id="timeout-xss-input" type="number" min="0" class="form-control premium-input" value="${escValue(String(cfg.timeout_xss ?? 1200))}" /> |
| 122 | + <span>seconds</span> |
| 123 | + </div> |
114 | 124 | </div> |
115 | 125 | <div style="margin-top: 20px; display: flex; align-items: center; gap: 15px;"> |
116 | 126 | <button class="btn btn-primary" onclick="window.SettingsPage.saveTimeoutSettings()" id="timeout-save-btn">💾 Save All Timeouts</button> |
|
203 | 213 | const nuInput = document.getElementById('timeout-nuclei-input'); |
204 | 214 | const buInput = document.getElementById('timeout-backup-input'); |
205 | 215 | const mcInput = document.getElementById('timeout-misconfig-input'); |
| 216 | + const kaInput = document.getElementById('timeout-katana-input'); |
| 217 | + const xsInput = document.getElementById('timeout-xss-input'); |
206 | 218 | const btn = document.getElementById('timeout-save-btn'); |
207 | 219 | const note = document.getElementById('timeout-save-note'); |
208 | | - if (!zdInput || !nuInput || !buInput || !mcInput) return; |
| 220 | + if (!zdInput || !nuInput || !buInput || !mcInput || !kaInput || !xsInput) return; |
209 | 221 | const zdVal = parseInt(zdInput.value, 10); |
210 | 222 | const nuVal = parseInt(nuInput.value, 10); |
211 | 223 | const buVal = parseInt(buInput.value, 10); |
212 | 224 | const mcVal = parseInt(mcInput.value, 10); |
213 | | - if ([zdVal, nuVal, buVal, mcVal].some(v => isNaN(v) || v < 0)) { |
| 225 | + const kaVal = parseInt(kaInput.value, 10); |
| 226 | + const xsVal = parseInt(xsInput.value, 10); |
| 227 | + if ([zdVal, nuVal, buVal, mcVal, kaVal, xsVal].some(v => isNaN(v) || v < 0)) { |
214 | 228 | window.showToast('error', 'Invalid value', 'Timeouts must be 0 or a positive integer.'); |
215 | 229 | return; |
216 | 230 | } |
|
225 | 239 | timeout_nuclei: nuVal, |
226 | 240 | timeout_backup: buVal, |
227 | 241 | timeout_misconfig: mcVal, |
| 242 | + timeout_katana: kaVal, |
| 243 | + timeout_xss: xsVal, |
228 | 244 | }) |
229 | 245 | }); |
230 | 246 | if (!res.ok) throw new Error('Failed to update timeout settings'); |
231 | | - window.showToast('success', 'Saved!', `Zerodays: ${zdVal}s · Nuclei: ${nuVal}s · Backup: ${buVal}s · Misconfig: ${mcVal}s (0 = unlimited)`); |
| 247 | + window.showToast('success', 'Saved!', `Zerodays: ${zdVal}s · Nuclei: ${nuVal}s · Backup: ${buVal}s · Misconfig: ${mcVal}s · Katana: ${kaVal}s · XSS: ${xsVal}s (0 = unlimited)`); |
232 | 248 | if (note) note.textContent = `✅ Saved to DB at ${new Date().toLocaleTimeString()} — persists across redeployments`; |
233 | 249 | try { window.state.config = await window.apiFetch('/api/config'); } catch(_) {} |
234 | 250 | } catch (e) { |
|
0 commit comments