Skip to content

Commit c3f9dd6

Browse files
authored
Change DEFAULT_RULES from string to list format
1 parent 6cddc2a commit c3f9dd6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sharehound/__main__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
from sharehound.utils.utils import filesize
2929
from sharehound.worker import worker
3030

31-
DEFAULT_RULES = """
32-
DEFAULT: ALLOW
33-
DENY EXPLORATION IF SHARE.NAME IN ['c$','print$','admin$','ipc$']
34-
ALLOW EXPLORATION
35-
"""
31+
DEFAULT_RULES = [
32+
"DEFAULT: ALLOW",
33+
"DENY EXPLORATION IF SHARE.NAME IN ['c$','print$','admin$','ipc$']",
34+
"ALLOW EXPLORATION",
35+
]
3636

3737

3838
def parse_rules(options: argparse.Namespace, logger: Logger) -> list[Rule]:
@@ -49,7 +49,7 @@ def parse_rules(options: argparse.Namespace, logger: Logger) -> list[Rule]:
4949

5050
# Setup default rules
5151
if len(options.rules_file) == 0 and len(options.rule_string) == 0:
52-
options.rule_string = DEFAULT_RULES.strip().split("\n")
52+
options.rule_string = DEFAULT_RULES
5353

5454
if len(options.rules_file) > 0:
5555
for rules_file in options.rules_file:

0 commit comments

Comments
 (0)