After using the following command to download pwn tools
python3 -m pip install --upgrade pwntools
I created a python file called exp.py and in the top of the file I import the pwn tools like this
import pwn
I also used this method
from pwn import *
but am running the program and am getting the following msg
File "exp.py", line 5, in <module>
pwn.context.log_level = 'critical'
NameError: name 'pwn' is not defined
After looking on the code the problem was that i was writing the function from pwn like this
pwn.function()
So i was getting the error of pwn.context.log_level = 'critical', if i remvoed the pwn and keep it like this context.log_level = 'critical' the error did not appear
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.