pwndbg / pwndbg

Exploit Development and Reverse Engineering with GDB Made Easy
https://pwndbg.re/
MIT License
7.57k stars 887 forks source link

NameError: name 'address' is not defined, line 60, in nearpc #161

Closed driverCzn closed 7 years ago

driverCzn commented 7 years ago

I use pwndbg in ctfs, and I like it. But a problem occurs to me.

pwndbg> start
Temporary breakpoint 1 at 0x8048657

Temporary breakpoint 1, 0x08048657 in main ()
Traceback (most recent call last):
  File "/usr/share/pwndbg/pwndbg/commands/__init__.py", line 57, in __call__
    return self.function(*args, **kwargs)
  File "/usr/share/pwndbg/pwndbg/commands/__init__.py", line 115, in _OnlyWhenRunning
    return function(*a, **kw)
  File "/usr/share/pwndbg/pwndbg/commands/nearpc.py", line 60, in nearpc
    if not pwndbg.memory.peek(address):
NameError: name 'address' is not defined

object of type 'NoneType' has no len()
'context': Print out the current register, instruction, and stack context.

    Accepts subcommands 'reg', 'code', 'stack', 'backtrace', and 'args'.
pwndbg> 

$ uname -a
Linux arch 4.9.8-1-ARCH #1 SMP PREEMPT Mon Feb 6 12:59:40 CET 2017 x86_64 GNU/Linux

I don't know where the variable 'address' is defined, so I wanna know how to solve this problem.

zachriggle commented 7 years ago

Update pwndbg ❤️ On Sat, Feb 11, 2017 at 1:02 AM driverCzn notifications@github.com wrote:

I use pwndbg in ctfs, and I like it. But a problem occurs to me.

pwndbg> start Temporary breakpoint 1 at 0x8048657

Temporary breakpoint 1, 0x08048657 in main () Traceback (most recent call last): File "/usr/share/pwndbg/pwndbg/commands/init.py", line 57, in call return self.function(*args, *kwargs) File "/usr/share/pwndbg/pwndbg/commands/init.py", line 115, in _OnlyWhenRunning return function(a, **kw) File "/usr/share/pwndbg/pwndbg/commands/nearpc.py", line 60, in nearpc if not pwndbg.memory.peek(address): NameError: name 'address' is not defined

object of type 'NoneType' has no len() 'context': Print out the current register, instruction, and stack context.

Accepts subcommands 'reg', 'code', 'stack', 'backtrace', and 'args'.

pwndbg> $ uname -a Linux arch 4.9.8-1-ARCH #1 https://github.com/pwndbg/pwndbg/issues/1 SMP PREEMPT Mon Feb 6 12:59:40 CET 2017 x86_64 GNU/Linux

I don't know where the variable 'address' is defined, so I wanna know how to solve this problem.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pwndbg/pwndbg/issues/161, or mute the thread https://github.com/notifications/unsubscribe-auth/AAG0GPsF9u4MA6BjZVMtDuj-nos8mme1ks5rbU7vgaJpZM4L-F4e .

zachriggle commented 7 years ago

(This was fixed earlier in 2bb8732efc7ce81c5eb3ebab9481c836b3d6476d)

driverCzn commented 7 years ago

thanks~