longld / peda

PEDA - Python Exploit Development Assistance for GDB
Other
5.9k stars 807 forks source link

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

Open nayaneshgudla opened 4 months ago

nayaneshgudla commented 4 months ago

  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 commented 3 months ago

i have this problem too

Acters commented 2 months ago

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 commented 1 month ago

Getting the same bunch of the warnings while running peda

maverick-fox commented 1 month ago

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 commented 1 month ago

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