pythonlinuxgoogle-cloud-shellshodan

How to Install Shodan CLI into Google Cloud Shell?


I'm unable to use Shodan CLI.

Steps:

I have tried to follow the steps here: Shodan CLI - Official Page

Even by running:

easy_install shodan

I have also tried to:

pip install shodan

And it does install but it still don't works, the thing is that I get the following warning error:

WARNING: The script shodan is installed in '/home/USER/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

I'm still not able to make it work. Not even by going to the Directory /home/USER/.local/bin

PD:

I have even tried to:

apt-get install shodan

But there is no package found.


Solution

  • You need to add your directory to PATH directory by typing in the command:

    export PATH=$PATH:$HOME/.local/bin
    

    or

    export PATH=$PATH:/home/USER/.local/bin
    

    You can also use alias as another option:

    alias shodan='./.local/bin/shodan'
    

    Check if shodan's directory is listed by typing:

    alias shodan
    

    The directory should appear like this:

    alias shodan='./.local/bin/shodan'
    

    Either of these methods successfully runs shodan on my end.

    I've used the following links as references: