简体   繁体   English

如何将 Shodan CLI 安装到 Google Cloud Shell?

[英]How to Install Shodan CLI into Google Cloud Shell?

I'm unable to use Shodan CLI.我无法使用 Shodan CLI。

Steps:脚步:

I have tried to follow the steps here: Shodan CLI - Official Page我已尝试按照此处的步骤操作: Shodan CLI - 官方页面

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甚至不去目录/home/USER/.local/bin

PD: PD:

I have even tried to:我什至尝试过:

apt-get install shodan

But there is no package found.但是没有找到 package。

You need to add your directory to PATH directory by typing in the command:您需要通过键入以下命令将目录添加到PATH目录:

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

or或者

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

You can also use alias as another option:您还可以使用alias作为另一个选项:

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

Check if shodan 's directory is listed by typing:通过键入以下内容检查是否列出了shodan的目录:

alias shodan

The directory should appear like this:该目录应如下所示:

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

Either of these methods successfully runs shodan on my end.这些方法中的任何一种都成功地在我这边运行shodan

I've used the following links as references:我使用以下链接作为参考:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM