Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't correcly execute pwntools #1231

Closed
stvreumi opened this issue Dec 5, 2018 · 4 comments
Closed

Can't correcly execute pwntools #1231

stvreumi opened this issue Dec 5, 2018 · 4 comments

Comments

@stvreumi
Copy link

stvreumi commented Dec 5, 2018

Hello, I got a very weird issue about pwntools.
I recently want to install the tool to do my homework, but it always give me error when I run script:

Traceback (most recent call last):
  File "pwn.py", line 1, in <module>
    from pwn import *
  File "/home/pwntools/pwn.py", line 2, in <module>
    r = remote("XXX", X)
NameError: name 'remote' is not defined

I have try install and launch it on ubuntu 14 & 16 docker container. I also ty the docker image you give in the issue template. It also blame the same error message.
This tool can only work on my DigitalOcean ubuntu 16.06 droplet machine. All other platform I have tired can't work.(I have tried freebsd, ubuntu 16&18 on the DigitalOcean)
If I just using the interactive mode after install, the tools may still work correctly. But after I write the code into script and run. It will blame me the message. And when I back to interactive mode and run, the tool can't work. When I import pwn it will give me the message above.

My test script in the first two lines like this:

from pwn import *
r = remote("XXX", X)

I using MacOS Mojave to test all above. I have tried to install this on my laptop, but it didn't work. So I try other platform and container. But it still don't work.
Is this relevant to my OS or my code?

@Arusekk
Copy link
Member

Arusekk commented Dec 5, 2018

Rename your script to whatever else name. Currently from pwn import * imports itself.

@zachriggle
Copy link
Member

@Arusekk is correct

@stvreumi
Copy link
Author

stvreumi commented Dec 6, 2018

Thanks @Arusekk , I didn't consider this....
Sorry for asking a silly question...

@fc8
Copy link

fc8 commented Sep 18, 2023

@stvreumi You're not alone - -|||

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants