credsweeper.common package¶
Submodules¶
credsweeper.common.constants module¶
- class credsweeper.common.constants.Base(value)[source]¶
Bases:
EnumStores types of character sets in lower case
- base36 = 'base36'¶
- base64 = 'base64'¶
- hex = 'hex'¶
- class credsweeper.common.constants.Chars(value)[source]¶
Bases:
EnumStores three types characters sets.
- BASE32_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'¶
- BASE36_CHARS = 'abcdefghijklmnopqrstuvwxyz1234567890'¶
- BASE64STD_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'¶
- BASE64URL_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'¶
- BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='¶
- HEX_CHARS = '0123456789ABCDEFabcdef'¶
- class credsweeper.common.constants.DiffRowType(value)[source]¶
Bases:
EnumDiff type of row
- ADDED = 'added'¶
- DELETED = 'deleted'¶
- class credsweeper.common.constants.GroupType(value)[source]¶
Bases:
EnumGroup type - used in Group constructor for load predefined set of filters
- DEFAULT = 'default'¶
- KEYWORD = 'keyword'¶
- PATTERN = 'pattern'¶
- class credsweeper.common.constants.KeyValidationOption(value)[source]¶
Bases:
EnumAPI validation state
- INVALID_KEY = 0¶
- NOT_AVAILABLE = 3¶
- UNDECIDED = 2¶
- VALIDATED_KEY = 1¶
- class credsweeper.common.constants.KeywordPattern[source]¶
Bases:
objectPattern set of keyword types
- key = '(?P<variable>(((\'|\\"|`)[^:=\'\\"`<>]*|[^:=\'\\"`<>\\s\\(]*)(?P<keyword>{})[^:=\'\\"`<>\\?\\!]*)(\'|\\"|`)?)'¶
- separator = '\\s*\\]?\\s*(?P<separator>{})((?!\\s*ENC(\\(|\\[))(\\s|\\w)*\\((\\s|\\w|=|\\()*|\\s*)'¶
- value = '(?P<value_leftquote>(\\\\)*(b|r)?(\'|\\"|`))?(?P<value>[^\'\\"`\\\\]{0,1000})(?P<value_rightquote>(\\\\)*(\'|\\"|`))?'¶
- credsweeper.common.constants.MAX_LINE_LENGTH = 2000¶
//docs.python.org/3/library/codecs.html
- Type:
values according https
- class credsweeper.common.constants.RuleType(value)[source]¶
Bases:
EnumRule type
- KEYWORD = 'keyword'¶
- MULTI = 'multi'¶
- PATTERN = 'pattern'¶
- PEM_KEY = 'pem_key'¶
- class credsweeper.common.constants.Separator[source]¶
Bases:
objectSeparators collection
- c = '='¶
- common = '=|:=|:'¶
- common_as_set = '=:'¶
- java = '='¶
- json = ':'¶
- php = '=>'¶
credsweeper.common.keyword_checklist module¶
- class credsweeper.common.keyword_checklist.KeywordChecklist[source]¶
Bases:
objectKeywordsChecklist contains words 3 or more letters length
- KEYWORD_PATH = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/credsweeper/checkouts/v1.5.7/credsweeper/common/keyword_checklist.txt')¶
- MORPHEME_PATH = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/credsweeper/checkouts/v1.5.7/credsweeper/common/morpheme_checklist.txt')¶