Warning: file_exists(): open_basedir restriction in effect. File(/srv/http/vhosts/aur.archlinux.org/public/web/locale//en/LC_MESSAGES/aurweb.mo) is not within the allowed path(s): (/srv/http/vhosts/aur-dev.archlinux.org/:/etc/aurweb/) in /srv/http/vhosts/aur-dev.archlinux.org/public/web/lib/streams.php on line 90
AUR (en) - peda-git

Notice: Undefined variable: name in /srv/http/vhosts/aur-dev.archlinux.org/public/web/lib/pkgfuncs.inc.php on line 248

Package Details: peda-git 1:1.1.82.b7c7d7a-1

Git Clone URL: https://aur-dev.archlinux.org/peda-git.git (read-only)
Package Base: peda-git
Description: Python Exploit Development Assistance for GDB
Upstream URL: https://github.com/longld/peda
Licenses: custom:Creative Commons
Conflicts: peda
Provides: peda
Submitter: Shibumi
Maintainer: anthraxx (Shibumi)
Last Packager: anthraxx
Votes: 10
Popularity: 0.005335
First Submitted: 2014-06-08 21:10
Last Updated: 2016-08-17 22:52

Latest Comments

Shibumi commented on 2015-03-06 13:39

@Chiggins
mhh I think youre right. Sorry for my late reply. I will change this

Chiggins commented on 2015-02-03 03:43

Correct me if I'm wrong... But shouldn't this require gdb itself as a dependency?

borja commented on 2014-12-12 02:16

Lol, Im a bit stupid. Instead of applying the patch patching just exec:

$ sed -e 's/^from util/from peda_util/' -i peda.py lib/nasm.py lib/shellcode.py
$ mv lib/utils.py lib/peda_utils.py

It works:

$ gdb -q
gdb-peda$ quit

borja commented on 2014-12-12 02:03

Fixed. The problem is caused by peda/lib/utils.py. Just move peda/lib/utils.py to peda/lib/peda_utils.py and patch:

diff --git a/lib/nasm.py b/lib/nasm.py
index 25ec066..8505135 100644
--- a/lib/nasm.py
+++ b/lib/nasm.py
@@ -7,7 +7,7 @@
#

import os
-from utils import *
+from peda_utils import *
import config

class Nasm(object):
@@ -58,7 +58,7 @@ class Nasm(object):
- ASM code (String)
"""
out = execute_external_command("%s -b %d -" % (config.NDISASM, mode), buf)
- return out
+ return out

@staticmethod
def format_shellcode(buf, mode=32):
@@ -72,7 +72,7 @@ class Nasm(object):
def nasm2shellcode(asmcode):
if not asmcode:
return ""
-
+
shellcode = []
pattern = re.compile("([0-9A-F]{8})\s*([^\s]*)\s*(.*)")

diff --git a/lib/shellcode.py b/lib/shellcode.py
index e5eceaa..fa0a542 100644
--- a/lib/shellcode.py
+++ b/lib/shellcode.py
@@ -10,7 +10,7 @@ import random
import socket
import struct
import httplib
-from utils import msg, error_msg
+from peda_utils import msg, error_msg

shellcode_x86_linux = {
"exec": (
diff --git a/peda.py b/peda.py
index 349a98e..9d47cbd 100644
--- a/peda.py
+++ b/peda.py
@@ -1,3 +1,4 @@
+# -*- coding: UTF-8 -*-
#
# PEDA - Python Exploit Development Assistance for GDB
#
@@ -30,7 +31,7 @@ sys.path.append(os.path.dirname(PEDAFILE) + "/lib/")

from skeleton import *
from shellcode import *
-from utils import *
+from peda_utils import *
import config
from nasm import *

Shibumi commented on 2014-12-07 19:13

@borja
Could you pls describe the problem more precisly?
How did you installed peda?
looks like some python module is missing.. mhh

borja commented on 2014-12-07 10:56

For some reasons is not working for me:

$ gdb -q
Traceback (most recent call last):
File "/usr/share/peda/peda.py", line 33, in <module>
from shellcode import *
File "/usr/share/peda/lib/shellcode.py", line 13, in <module>
from utils import msg, error_msg
ImportError: cannot import name msg
(gdb)