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

NameError: global name 'connection' is not defined #6

Closed
Ravi355 opened this issue Aug 23, 2017 · 7 comments
Closed

NameError: global name 'connection' is not defined #6

Ravi355 opened this issue Aug 23, 2017 · 7 comments

Comments

@Ravi355
Copy link

Ravi355 commented Aug 23, 2017

Hello, when i run the you're script on ubuntu 16.04, I have following erro:

Traceback (most recent call last):
File "Admin.py", line 191, in
target_result = str(check_target(target, args.UserAgent, args.tor))
File "Admin5.py", line 81, in check_target
conn = connection.conn(target, UserAgent)
NameError: global name 'connection' is not defined

Help Me,
Best Regards,

@fnk0c
Copy link
Owner

fnk0c commented Aug 24, 2017

Hello, @Ravi355, first of all, thank you for the report.

Did you renamed the files? I'm asking it because according to your error message there is a file named Admin.py and Admin5.py.
If not, could you send me the command line you're typing?

Best Regards

@Ravi355
Copy link
Author

Ravi355 commented Aug 24, 2017

Thank you for the quick reply.
Sorry,
I renamed file,
command line I typed : $ python Admin5.py -u example.com

I imported modules are:

from sys import path, argv
import argparse
path.append("src")
import connections

#import scans
from theano import scan

from time import sleep
from threading import Thread, active_count

Best Regards,

@fnk0c
Copy link
Owner

fnk0c commented Aug 24, 2017

I believe the error is a typo.

you're doing import connections when it was supposed to be import connection without the s at the end.

@Ravi355
Copy link
Author

Ravi355 commented Aug 25, 2017

I got following error:

Traceback (most recent call last):
File "Admin5.py", line 27, in
import connection
ImportError: No module named connection

@fnk0c
Copy link
Owner

fnk0c commented Aug 29, 2017

Do you have the following files inside the src directory?

  1. banner
  2. connection.py
  3. scans.py

Also, are you modifing the script? Because I'm failing to see why this error is occoruing

@Ravi355
Copy link
Author

Ravi355 commented Aug 29, 2017

Hello,
I am pleased to inform you that, It's not you're script error. It's my fault.
Thanks for everything you do for me.

Best Regards,

@fnk0c
Copy link
Owner

fnk0c commented Aug 31, 2017

Glad to know everything is fine now.
You're welcome and don't hesitate in open other issues if needed.

Good Luck

@fnk0c fnk0c closed this as completed Aug 31, 2017
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

2 participants