forked from Samsung/CredSweeper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
41 lines (32 loc) · 1.38 KB
/
__init__.py
File metadata and controls
41 lines (32 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from pathlib import Path
# total number of files in test samples
SAMPLES_FILES_COUNT = 163
# the lowest value of ML threshold is used to display possible lowest values
NEGLIGIBLE_ML_THRESHOLD = 0.0001
# credentials count after scan with negligible ML threshold
SAMPLES_CRED_COUNT = 506 + 3
# Number of filtered credentials with ML
ML_FILTERED = 22
# credentials count after post-processing
SAMPLES_POST_CRED_COUNT = SAMPLES_CRED_COUNT - ML_FILTERED
# with option --doc & NEGLIGIBLE_ML_THRESHOLD
SAMPLES_IN_DOC = 858 + 3
# archived credentials that are not found without --depth
SAMPLES_IN_DEEP_1 = SAMPLES_POST_CRED_COUNT + 128
SAMPLES_IN_DEEP_2 = SAMPLES_IN_DEEP_1 + 5
SAMPLES_IN_DEEP_3 = SAMPLES_IN_DEEP_2 + 4
# well known string with all latin letters
AZ_DATA = b"The quick brown fox jumps over the lazy dog"
# Assume, there should be only ASCII symbols
AZ_STRING = AZ_DATA.decode(encoding="ascii", errors="strict")
# tests directory - use ONLY this file relevance for "release_test" workflow
TESTS_PATH = Path(__file__).resolve().parent
# test samples directory
SAMPLES_PATH = TESTS_PATH / "samples"
SAMPLE_TAR = SAMPLES_PATH / "pem_key.tar"
SAMPLE_ZIP = SAMPLES_PATH / "pem_key.zip"
SAMPLE_HTML = SAMPLES_PATH / "test.html"
SAMPLE_DOCX = SAMPLES_PATH / "sample.docx"
SAMPLE_PY = SAMPLES_PATH / "sample.py"
SAMPLE_DEB = SAMPLES_PATH / "sample.deb"
SAMPLE_SQLITE = SAMPLES_PATH / "sample.sqlite"