OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3.7
/
test
/
libregrtest
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/09/2024 06:49:08 AM
rwxr-xr-x
📄
__init__.py
190 bytes
12/09/2021 05:04:37 PM
rw-r--r--
📁
__pycache__
-
05/09/2024 06:49:08 AM
rwxr-xr-x
📄
cmdline.py
17.74 KB
12/09/2021 05:04:37 PM
rw-r--r--
📄
main.py
23.6 KB
12/09/2021 05:04:37 PM
rw-r--r--
📄
refleak.py
8 KB
12/09/2021 05:04:37 PM
rw-r--r--
📄
runtest.py
10.33 KB
12/09/2021 05:04:37 PM
rw-r--r--
📄
runtest_mp.py
13.29 KB
12/09/2021 05:04:37 PM
rw-r--r--
📄
save_env.py
10.75 KB
12/09/2021 05:04:37 PM
rw-r--r--
📄
setup.py
4.12 KB
12/09/2021 05:04:37 PM
rw-r--r--
📄
utils.py
1.46 KB
12/09/2021 05:04:37 PM
rw-r--r--
📄
win_utils.py
4.95 KB
12/09/2021 05:04:37 PM
rw-r--r--
Editing: utils.py
Close
import math import os.path import sys import textwrap def format_duration(seconds): ms = math.ceil(seconds * 1e3) seconds, ms = divmod(ms, 1000) minutes, seconds = divmod(seconds, 60) hours, minutes = divmod(minutes, 60) parts = [] if hours: parts.append('%s hour' % hours) if minutes: parts.append('%s min' % minutes) if seconds: parts.append('%s sec' % seconds) if ms: parts.append('%s ms' % ms) if not parts: return '0 ms' parts = parts[:2] return ' '.join(parts) def removepy(names): if not names: return for idx, name in enumerate(names): basename, ext = os.path.splitext(name) if ext == '.py': names[idx] = basename def count(n, word): if n == 1: return "%d %s" % (n, word) else: return "%d %ss" % (n, word) def printlist(x, width=70, indent=4, file=None): """Print the elements of iterable x to stdout. Optional arg width (default 70) is the maximum line length. Optional arg indent (default 4) is the number of blanks with which to begin each line. """ blanks = ' ' * indent # Print the sorted list: 'x' may be a '--random' list or a set() print(textwrap.fill(' '.join(str(elt) for elt in sorted(x)), width, initial_indent=blanks, subsequent_indent=blanks), file=file) def print_warning(msg): print(f"Warning -- {msg}", file=sys.stderr, flush=True)