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

Access denied for shodan API key scan #230

Open
Maselia464 opened this issue Feb 8, 2025 · 0 comments
Open

Access denied for shodan API key scan #230

Maselia464 opened this issue Feb 8, 2025 · 0 comments

Comments

@Maselia464
Copy link

Hello,

So I'm currently following the tutorial to install shodan python library on my debian environnement

but I got this error on loop : https://prnt.sc/u0XEK38_jddX

By using this code that was on the installation guide:
#!/usr/bin/env python3
import shodan

SHODAN_API_KEY = "4l*****"

api = shodan.Shodan(SHODAN_API_KEY)

# Wrap the request in a try/ except block to catch errors
try:
        # Search Shodan
        results = api.search('apache')

        # Show the results
        print('Results found: {}'.format(results['total']))
        for result in results['matches']:
                print('IP: {}'.format(result['ip_str']))
                print(result['data'])
                print('')
except shodan.APIError as e:
        print('Error: {}'.format(e))#!/usr/bin/env python3
import shodan

SHODAN_API_KEY = "4lzMjjaCrDEA87QigpI7bKOiYso35Qac"

api = shodan.Shodan(SHODAN_API_KEY)

# Wrap the request in a try/ except block to catch errors
try:
        # Search Shodan
        results = api.search('apache')

        # Show the results
        print('Results found: {}'.format(results['total']))
        for result in results['matches']:
                print('IP: {}'.format(result['ip_str']))
                print(result['data'])
                print('')
except shodan.APIError as e:
        print('Error: {}'.format(e))

My VM is connected to the internet
Shodan is currently in a python environnement with full access
I used the free account just to discover shodan, I do not plan to use advanced feature on it...

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

1 participant