common package¶
Submodules¶
common.constants module¶
- class credsweeper.common.constants.Base(value)[source]¶
Bases:
Enum
Stores types of character sets in lower case
- base36 = 'base36'¶
- base64 = 'base64'¶
- hex = 'hex'¶
- class credsweeper.common.constants.Chars(value)[source]¶
Bases:
Enum
Stores three types characters sets.
- Parameters:
HEX_CHARS – set of characters, hexadecimal numeral system (Base16)
BASE36_CHARS – set of 36 characters, used in Base36 encoding
BASE64_CHARS – set of 64 characters, used in Base64 encoding
- BASE36_CHARS = 'abcdefghijklmnopqrstuvwxyz1234567890'¶
- BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='¶
- HEX_CHARS = '1234567890abcdefABCDEF'¶
- class credsweeper.common.constants.DiffRowType[source]¶
Bases:
object
Diff type of row
- ADDED = 'added'¶
- ADDED_ACCOMPANY = 'added_accompany'¶
- DELETED = 'deleted'¶
- DELETED_ACCOMPANY = 'deleted_accompany'¶
- class credsweeper.common.constants.GroupType(value)[source]¶
Bases:
Enum
Group type
- KEYWORD = 'keyword'¶
- PATTERN = 'pattern'¶
- class credsweeper.common.constants.KeyValidationOption(value)[source]¶
Bases:
Enum
API validation state
- INVALID_KEY = 0¶
- NOT_AVAILABLE = 3¶
- UNDECIDED = 2¶
- VALIDATED_KEY = 1¶
- class credsweeper.common.constants.KeywordPattern[source]¶
Bases:
object
Pattern 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>(\\\\)*(\'|\\"|`))?'¶
- class credsweeper.common.constants.RuleType(value)[source]¶
Bases:
Enum
Rule type
- KEYWORD = 'keyword'¶
- PATTERN = 'pattern'¶
- PEM_KEY = 'pem_key'¶
- class credsweeper.common.constants.Separator[source]¶
Bases:
object
Separators collection
- c = '='¶
- common = '=|:=|:'¶
- common_as_set = '=:'¶
- java = '='¶
- json = ':'¶
- php = '=>'¶