MCPcopy Create free account
hub / github.com/OWASP/Python-Honeypot / generate_token

Function generate_token

core/compatible.py:197–207  ·  view source on GitHub ↗

generate token using hex chars Args: length: length of token - default 32 Returns: token string

(length=32)

Source from the content-addressed store, hash-verified

195
196
197def generate_token(length=32):
198 """
199 generate token using hex chars
200
201 Args:
202 length: length of token - default 32
203
204 Returns:
205 token string
206 """
207 return "".join(random.choice("0123456789abcdef") for _ in range(length))
208
209
210def byte_to_str(data):

Callers 6

api_configurationFunction · 0.90
module_configurationFunction · 0.90
module_configurationFunction · 0.90
module_configurationFunction · 0.90
module_configurationFunction · 0.90
test_generate_tokenMethod · 0.90

Calls

no outgoing calls

Tested by 1

test_generate_tokenMethod · 0.72