Merge pull request #261 from exploide/fix-escape-sequence-warning

Fixed 'SyntaxWarning: invalid escape sequence' for Python 3.12+
This commit is contained in:
lgandx 2024-01-04 17:32:39 -03:00 committed by GitHub
commit b550dbe4b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

2
packets.py Executable file → Normal file
View file

@ -215,7 +215,7 @@ class DNS_SRV_Ans(Packet):
def calculate(self,data):
self.fields["Tid"] = data[0:2]
DNSName = ''.join(data[12:].split('\x00')[:1])
SplitFQDN = re.split('\W+', DNSName) # split the ldap.tcp.blah.blah.blah.domain.tld
SplitFQDN = re.split(r'\W+', DNSName) # split the ldap.tcp.blah.blah.blah.domain.tld
#What's the question? we need it first to calc all other len.
self.fields["QuestionName"] = DNSName