ADD file via upload

main
pewxvf3lf 7 months ago
parent fccabb21d2
commit 5ad5e6327f

@ -0,0 +1,14 @@
import re
def isIP(str):
p = re.compile('^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$')
if p.match(str):
return True
else:
return False
def isPORT(str):
p = re.compile(r'^(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|[1-5]\d{4}|[1-9]\d{0,3}|0)$')
if p.match(str):
return True
else:
return False
Loading…
Cancel
Save