From 65a5d53f16c53925634c3252e77355d68929067d Mon Sep 17 00:00:00 2001 From: Iam54r1n4 Date: Sat, 25 Jan 2025 07:26:36 +0000 Subject: [PATCH] Remove validator.py --- core/validator.py | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 core/validator.py diff --git a/core/validator.py b/core/validator.py deleted file mode 100644 index 04c09a2..0000000 --- a/core/validator.py +++ /dev/null @@ -1,10 +0,0 @@ -import os -import click - -def validate_port(ctx,param,value:int) -> int: - if value < 1 or value > 65535: - raise click.BadParameter('Port must be between 1 and 65535') - # check if port is in use - if os.system(f'lsof -i:{value}') == 0: - raise click.BadParameter(f'Port {value} is in use') - return value \ No newline at end of file