last changes and fix + new benchmarks

This commit is contained in:
Domingo Dirutigliano
2025-02-18 23:03:46 +01:00
parent 5ef38df66a
commit 16f6b6a8fb
15 changed files with 499 additions and 6 deletions

View File

@@ -85,8 +85,18 @@ server = Process(target=startServer)
server.start()
sleep(1)
custom_regex = [
'(?:[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*|"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])'
]
def gen_regex():
regex = secrets.token_hex(8)
"""
if len(custom_regex) == 0:
regex = secrets.token_hex(8)
else:
regex = custom_regex.pop()
"""
regex = secrets.token_hex(20)
return base64.b64encode(bytes(regex.encode())).decode()
#Get baseline reading