Spaces:
Paused
Paused
Update main.py
Browse files
main.py
CHANGED
|
@@ -196,7 +196,7 @@ FORM_CONTENT = """
|
|
| 196 |
</div>
|
| 197 |
<div class="form-group">
|
| 198 |
<label for="threads">Number of Threads (Concurrency):</label>
|
| 199 |
-
<input type="number" id="threads" name="threads" value="
|
| 200 |
</div>
|
| 201 |
<button type="submit">Start Scan</button>
|
| 202 |
</form>
|
|
@@ -268,8 +268,8 @@ async def scan(
|
|
| 268 |
# Input validation
|
| 269 |
if not (1 <= start_port <= end_port <= 65535):
|
| 270 |
return HTMLResponse(content="<h1>Error: Invalid port range.</h1>", status_code=400)
|
| 271 |
-
if not (1 <= threads <=
|
| 272 |
-
return HTMLResponse(content="<h1>Error: Thread count must be between 1 and
|
| 273 |
|
| 274 |
# Resolve hostname
|
| 275 |
try:
|
|
|
|
| 196 |
</div>
|
| 197 |
<div class="form-group">
|
| 198 |
<label for="threads">Number of Threads (Concurrency):</label>
|
| 199 |
+
<input type="number" id="threads" name="threads" value="2500" min="1" max="2500" required>
|
| 200 |
</div>
|
| 201 |
<button type="submit">Start Scan</button>
|
| 202 |
</form>
|
|
|
|
| 268 |
# Input validation
|
| 269 |
if not (1 <= start_port <= end_port <= 65535):
|
| 270 |
return HTMLResponse(content="<h1>Error: Invalid port range.</h1>", status_code=400)
|
| 271 |
+
if not (1 <= threads <= 2500):
|
| 272 |
+
return HTMLResponse(content="<h1>Error: Thread count must be between 1 and 2500.</h1>", status_code=400)
|
| 273 |
|
| 274 |
# Resolve hostname
|
| 275 |
try:
|