Escape literal backslashes in f-strings to fix syntax warnings#5
Open
deFractal wants to merge 2 commits into
Open
Escape literal backslashes in f-strings to fix syntax warnings#5deFractal wants to merge 2 commits into
deFractal wants to merge 2 commits into
Conversation
…rent Python Also fix a few minor typos in comments, strings, and documentation
rtpt-romankarwacik
suggested changes
Oct 21, 2025
There was a problem hiding this comment.
One backslash escape is missing:
diff --git a/masky/lib/smb.py b/masky/lib/smb.py
index 5730293..dc56e9b 100644
--- a/masky/lib/smb.py
+++ b/masky/lib/smb.py
@@ -292,7 +292,7 @@ class Smb:
return rslt
def __init_rpc(self, target_host):
- np_bind = f"ncacn_np:{target_host}[\pipe\svcctl]"
+ np_bind = f"ncacn_np:{target_host}[\\pipe\\svcctl]"
self.__rpc_con = transport.DCERPCTransportFactory(np_bind)
self.__rpc_con.set_dport(self.__port)
self.__rpc_con.setRemoteHost(target_host)
deFractal
pushed a commit
to deFractal/Masky
that referenced
this pull request
Nov 15, 2025
from: Z4kSec/pull/5#pullrequestreview-3360223283
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This escapes backslashes which aren't part of an escape sequence in f-strings, to fix instances of
SyntaxWarningin a few files:In main,py, it also combines a triple-quoted r-string and a trip-quoted f-string to align all but the last line of the ASCII art in the source code while fixing a couple of the aforementioned backslash escapes.