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

Function make_tmp_thread_dir

core/compatible.py:120–137  ·  view source on GitHub ↗

create random thread directory Returns: name of directory or False

()

Source from the content-addressed store, hash-verified

118
119
120def make_tmp_thread_dir():
121 """
122 create random thread directory
123
124 Returns:
125 name of directory or False
126 """
127 uppercase_string = string.ascii_uppercase
128 lowercase_string = string.ascii_lowercase
129 digits = string.digits
130 combined_string = uppercase_string + lowercase_string + digits
131 return mkdir(
132 "tmp/thread_" + "".join(
133 [
134 combined_string[random.randint(0, len(combined_string) - 1)] for _ in range(15)
135 ]
136 )
137 )
138
139
140def mkdir(dir):

Callers 1

create_new_imagesFunction · 0.90

Calls 1

mkdirFunction · 0.85

Tested by

no test coverage detected