Skip to content

Commit

Permalink
Comment use of escape sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
mlw committed Sep 11, 2023
1 parent b54a810 commit 549769c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ - (FileAccessPolicyDecision)handleMessage:(const Message &)msg
policy->custom_message)];

NSMutableString *blockMsg = [NSMutableString stringWithCapacity:1024];
// Escape sequences `\033[1m` and `\033[0m` begin/end bold lettering
[blockMsg appendFormat:@"\n\033[1mSanta\033[0m\n\n%@\n\n", attrStr.string];
[blockMsg appendFormat:@"\033[1mAccessed Path:\033[0m %@\n"
@"\033[1mRule Version: \033[0m %@\n"
Expand Down
1 change: 1 addition & 0 deletions Source/santad/SNTExecutionController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ - (void)validateExecEvent:(const Message &)esMsg postAction:(bool (^)(SNTAction)
customMessage:cd.customMsg];

NSMutableString *msg = [NSMutableString stringWithCapacity:1024];
// Escape sequences `\033[1m` and `\033[0m` begin/end bold lettering
[msg appendFormat:@"\n\033[1mSanta\033[0m\n\n%@\n\n", s.string];
[msg appendFormat:@"\033[1mPath: \033[0m %@\n"
@"\033[1mIdentifier:\033[0m %@\n"
Expand Down

0 comments on commit 549769c

Please sign in to comment.