Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gid = re.search("Gid:\s*([^\n]*)", status).group(1) #181

Open
nayaneshgudla opened this issue Jul 26, 2024 · 5 comments
Open

gid = re.search("Gid:\s*([^\n]*)", status).group(1) #181

nayaneshgudla opened this issue Jul 26, 2024 · 5 comments

Comments

@nayaneshgudla
Copy link

nayaneshgudla commented Jul 26, 2024

  p = re.compile(".*exec file:\s*`(.*)'")
/home/kali/peda/peda.py:567: SyntaxWarning: invalid escape sequence '\d'
  m = re.match("in.*at(.*:\d*)", what)
/home/kali/peda/peda.py:596: SyntaxWarning: invalid escape sequence '\d'
  m = re.match("^(\d*).*", line)
/home/kali/peda/peda.py:2214: SyntaxWarning: invalid escape sequence '\s'
  p = re.compile("Entry point: ([^\s]*)")
/home/kali/peda/peda.py:2316: SyntaxWarning: invalid escape sequence '\s'
  m = re.findall(".*(0x[^ ]*)\s*%s" % re.escape(symname), out)
/home/kali/peda/peda.py:2681: SyntaxWarning: invalid escape sequence '\ '
  if re.search(re.escape(asmcode).replace("\ ",".*").replace("\?",".*"), asmcode_rs)\
/home/kali/peda/peda.py:2681: SyntaxWarning: invalid escape sequence '\?'
  if re.search(re.escape(asmcode).replace("\ ",".*").replace("\?",".*"), asmcode_rs)\
/home/kali/peda/peda.py:2832: SyntaxWarning: invalid escape sequence '\ '
  pattern = re.compile(b'|'.join(JMPCALL).replace(b' ', b'\ '))
/home/kali/peda/peda.py:3414: SyntaxWarning: invalid escape sequence '\['
  m = re.search(".*\[(.*)\]|.*?s:(0x[^ ]*)", exp)
/home/kali/peda/peda.py:3519: SyntaxWarning: invalid escape sequence '\['
  sock = re.search("socket:\[(.*)\]", rpath)
/home/kali/peda/peda.py:3529: SyntaxWarning: invalid escape sequence '\s'
  ppid = re.search("PPid:\s*([^\s]*)", status).group(1)
/home/kali/peda/peda.py:3531: SyntaxWarning: invalid escape sequence '\s'
  uid = re.search("Uid:\s*([^\n]*)", status).group(1)
/home/kali/peda/peda.py:3533: SyntaxWarning: invalid escape sequence '\s'
  gid = re.search("Gid:\s*([^\n]*)", status).group(1)
/home/kali/peda/peda.py:373: SyntaxWarning: invalid escape sequence '\s'
  p = re.compile(".*exec file:\s*`(.*)'")
/home/kali/peda/peda.py:567: SyntaxWarning: invalid escape sequence '\d'
  m = re.match("in.*at(.*:\d*)", what)
/home/kali/peda/peda.py:596: SyntaxWarning: invalid escape sequence '\d'
  m = re.match("^(\d*).*", line)
/home/kali/peda/peda.py:2214: SyntaxWarning: invalid escape sequence '\s'
  p = re.compile("Entry point: ([^\s]*)")
/home/kali/peda/peda.py:2316: SyntaxWarning: invalid escape sequence '\s'
  m = re.findall(".*(0x[^ ]*)\s*%s" % re.escape(symname), out)
/home/kali/peda/peda.py:2681: SyntaxWarning: invalid escape sequence '\ '
  if re.search(re.escape(asmcode).replace("\ ",".*").replace("\?",".*"), asmcode_rs)\
/home/kali/peda/peda.py:2681: SyntaxWarning: invalid escape sequence '\?'
  if re.search(re.escape(asmcode).replace("\ ",".*").replace("\?",".*"), asmcode_rs)\
/home/kali/peda/peda.py:2832: SyntaxWarning: invalid escape sequence '\ '
  pattern = re.compile(b'|'.join(JMPCALL).replace(b' ', b'\ '))
/home/kali/peda/peda.py:3414: SyntaxWarning: invalid escape sequence '\['
  m = re.search(".*\[(.*)\]|.*?s:(0x[^ ]*)", exp)
/home/kali/peda/peda.py:3519: SyntaxWarning: invalid escape sequence '\['
  sock = re.search("socket:\[(.*)\]", rpath)
/home/kali/peda/peda.py:3529: SyntaxWarning: invalid escape sequence '\s'
  ppid = re.search("PPid:\s*([^\s]*)", status).group(1)
/home/kali/peda/peda.py:3531: SyntaxWarning: invalid escape sequence '\s'
  uid = re.search("Uid:\s*([^\n]*)", status).group(1)
/home/kali/peda/peda.py:3533: SyntaxWarning: invalid escape sequence '\s'
  gid = re.search("Gid:\s*([^\n]*)", status).group(1)
/home/kali/peda/peda.py:373: SyntaxWarning: invalid escape sequence '\s'
  p = re.compile(".*exec file:\s*`(.*)'")
/home/kali/peda/peda.py:567: SyntaxWarning: invalid escape sequence '\d'
  m = re.match("in.*at(.*:\d*)", what)
/home/kali/peda/peda.py:596: SyntaxWarning: invalid escape sequence '\d'
  m = re.match("^(\d*).*", line)
/home/kali/peda/peda.py:2214: SyntaxWarning: invalid escape sequence '\s'
  p = re.compile("Entry point: ([^\s]*)")
/home/kali/peda/peda.py:2316: SyntaxWarning: invalid escape sequence '\s'
  m = re.findall(".*(0x[^ ]*)\s*%s" % re.escape(symname), out)
/home/kali/peda/peda.py:2681: SyntaxWarning: invalid escape sequence '\ '
  if re.search(re.escape(asmcode).replace("\ ",".*").replace("\?",".*"), asmcode_rs)\
/home/kali/peda/peda.py:2681: SyntaxWarning: invalid escape sequence '\?'
  if re.search(re.escape(asmcode).replace("\ ",".*").replace("\?",".*"), asmcode_rs)\
/home/kali/peda/peda.py:2832: SyntaxWarning: invalid escape sequence '\ '
  pattern = re.compile(b'|'.join(JMPCALL).replace(b' ', b'\ '))
/home/kali/peda/peda.py:3414: SyntaxWarning: invalid escape sequence '\['
  m = re.search(".*\[(.*)\]|.*?s:(0x[^ ]*)", exp)
/home/kali/peda/peda.py:3519: SyntaxWarning: invalid escape sequence '\['
  sock = re.search("socket:\[(.*)\]", rpath)
/home/kali/peda/peda.py:3529: SyntaxWarning: invalid escape sequence '\s'
  ppid = re.search("PPid:\s*([^\s]*)", status).group(1)
/home/kali/peda/peda.py:3531: SyntaxWarning: invalid escape sequence '\s'
  uid = re.search("Uid:\s*([^\n]*)", status).group(1)
/home/kali/peda/peda.py:3533: SyntaxWarning: invalid escape sequence '\s'
  gid = re.search("Gid:\s*([^\n]*)", status).group(1)```


Getting this error while running gdb
@qzdx
Copy link

qzdx commented Aug 2, 2024

i have this problem too

@Acters
Copy link

Acters commented Sep 26, 2024

This is new in Python 3.12 as the error used to be hidden but now it is enforced to be displayed. the quick fix is to add r to the left of the string to signify it is a raw string. https://docs.python.org/3/library/re.html#raw-string-notation

This is only a warning and it is functuanally the same and has no impact on usage. it is annoying now. simple fix can be found in the pull requests.

@maverick-fox
Copy link

maverick-fox commented Oct 11, 2024

Getting the same bunch of the warnings while running peda

@maverick-fox
Copy link

Getting the same bunch of the errors while running peda

This is new in Python 3.12 as the error used to be hidden but now it is enforced to be displayed. the quick fix is to add r to the left of the string to signify it is a raw string. https://docs.python.org/3/library/re.html#raw-string-notation

This is only a warning and it is functuanally the same and has no impact on usage. it is annoying now. simple fix can be found in the pull requests.

It works for me, after fixing all those warnings in peda.py manually

@Acters
Copy link

Acters commented Oct 15, 2024

Getting the same bunch of the errors while running peda

This is new in Python 3.12 as the error used to be hidden but now it is enforced to be displayed. the quick fix is to add r to the left of the string to signify it is a raw string. https://docs.python.org/3/library/re.html#raw-string-notation
This is only a warning and it is functuanally the same and has no impact on usage. it is annoying now. simple fix can be found in the pull requests.

It works for me, after fixing all those warnings in peda.py manually

re read my comment, there are already pull requests from multiple people who do this. I moved to pwndbg now. GL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants