diff --git a/.gdb_history b/.gdb_history new file mode 100644 index 0000000..30f4763 --- /dev/null +++ b/.gdb_history @@ -0,0 +1,3 @@ +q +q +clear diff --git a/README.md b/README.md index 5d84de2..ebf7745 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,8 @@ PEDA - Python Exploit Development Assistance for GDB ```sh sudo pacman -S python-six # arch -sudo apt install python-siz # debian +sudo apt install python3-six # debian distros +sudo dnf python3-six dnf # fedodra / Cent / RHEL ``` - clone repository diff --git a/lib/nasm.py b/lib/nasm.py index 13888f4..1074730 100644 --- a/lib/nasm.py +++ b/lib/nasm.py @@ -82,7 +82,7 @@ def nasm2shellcode(asmcode): return "" shellcode = [] - pattern = re.compile("([0-9A-F]{8})\s*([^\s]*)\s*(.*)") + pattern = re.compile(r"([0-9A-F]{8})\s*([^\s]*)\s*(.*)") matches = pattern.findall(asmcode) for line in asmcode.splitlines(): diff --git a/lib/utils.py b/lib/utils.py index 8f2b038..c54e5c4 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -523,7 +523,7 @@ def format_disasm_code(code, nearby=None): result += line + "\n" else: color = style = None - m = re.search(".*(0x[^ ]*).*:\s*([^ ]*)", line) + m = re.search(r".*(0x[^ ]*).*:\s*([^ ]*)", line) if not m: # failed to parse result += line + "\n" continue @@ -540,7 +540,7 @@ def format_disasm_code(code, nearby=None): break prefix = line.split(":\t")[0] - addr = re.search("(0x[^\s]*)", prefix) + addr = re.search(r"(0x[^\s]*)", prefix) if addr: addr = to_int(addr.group(1)) else: @@ -589,8 +589,7 @@ def cyclic_pattern_charset(charset_type=None): charset[2] = "sn()" + charset[2] if charset_type == 2: # maximum type - charset += ['!"#$%&\()*+,-./:;<=>?@[]^_{|}~'] # string.punctuation - + charset += [r'!"#$%&\()*+,-./:;<=>?@[]^_{|}~'] # string.punctuation mixed_charset = mixed = '' k = 0 while True: