smartpss如何添加摄像头(可自动检测可公开访问的网络摄像头scan-for-webcams的安装说明)
smartpss如何添加摄像头(可自动检测可公开访问的网络摄像头scan-for-webcams的安装说明)export "SHODAN_API_KEY"="<your api key>"然后您可以运行该程序!即可获得API keygit clone https://github.com/JettChenT/scan-for-webcams;cd scan-for-webcams安装要求的依赖(install requirements):pip install -r requirements.txt设置shodan登记注册,并邮箱激活账户
自动扫描互联网上可公开访问的网络摄像头
目录- python MJPG.py:适用于互联网上的公共 MJPG streamers https://github.com/jacksonliam/mjpg-streamer
- python webcamXP.py:适用于互联网上的公共webcamXP streamers http://www.webcamxp.com/
该程序将输出格式为ip_address:port的链接列表
如果您的终端支持链接,请单击该链接并在浏览器中将其打开,否则,请复制该链接并在浏览器中将其打开。
安装克隆&cd到本地目录:
git clone https://github.com/JettChenT/scan-for-webcams;cd scan-for-webcams
安装要求的依赖(install requirements):
pip install -r requirements.txt
设置shodan
- 去到网址shodan.io(https://shodan.io/),注册/登录并获取您的API密钥
登记注册,并邮箱激活账户
即可获得API key
- 获得你的API key后,设置环境变量SHODAN_API_KEY设置为这个API的key
export "SHODAN_API_KEY"="<your api key>"
然后您可以运行该程序!
演示(base) ➜ scan-for-webcams git:(master) ✗ # 安装软件包
(base) ➜ scan-for-webcams git:(master) ✗ ls
LICENSE MJPG.py README.md requirements.txt shodan-api-key.env webcamXP.py
(base) ➜ scan-for-webcams git:(master) ✗ pip install -r requirements.txt
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: shodan==1.23.0 in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (1.23.0)
Requirement already satisfied: requests==2.18.4 in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (2.18.4)
Requirement already satisfied: rich==3.0.5 in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (3.0.5)
Requirement already satisfied: click in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from shodan==1.23.0->-r requirements.txt (line 1)) (7.0)
Requirement already satisfied: XlsxWriter in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from shodan==1.23.0->-r requirements.txt (line 1)) (1.1.5)
Requirement already satisfied: click-plugins in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from shodan==1.23.0->-r requirements.txt (line 1)) (1.1.1)
Requirement already satisfied: colorama in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from shodan==1.23.0->-r requirements.txt (line 1)) (0.4.1)
Requirement already satisfied: certifi>=2017.4.17 in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from requests==2.18.4->-r requirements.txt (line 2)) (2019.11.28)
Requirement already satisfied: idna<2.7 >=2.5 in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from requests==2.18.4->-r requirements.txt (line 2)) (2.6)
Requirement already satisfied: chardet<3.1.0 >=3.0.2 in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from requests==2.18.4->-r requirements.txt (line 2)) (3.0.4)
Requirement already satisfied: urllib3<1.23 >=1.21.1 in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from requests==2.18.4->-r requirements.txt (line 2)) (1.22)
Requirement already satisfied: pygments<3.0.0 >=2.6.0 in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from rich==3.0.5->-r requirements.txt (line 3)) (2.6.1)
Requirement already satisfied: pprintpp<0.5.0 >=0.4.0 in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from rich==3.0.5->-r requirements.txt (line 3)) (0.4.0)
Requirement already satisfied: commonmark<0.10.0 >=0.9.0 in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from rich==3.0.5->-r requirements.txt (line 3)) (0.9.1)
Requirement already satisfied: typing-extensions<4.0.0 >=3.7.4 in /Users/jettchen/anaconda3/lib/python3.7/site-packages (from rich==3.0.5->-r requirements.txt (line 3)) (3.7.4.2)
WARNING: You are using pip version 20.1; however version 20.1.1 is available.
You should consider upgrading via the '/Users/jettchen/anaconda3/bin/python -m pip install --upgrade pip' command.
(base) ➜ scan-for-webcams git:(master) ✗ # 把shodan的apikey设置到环境中
(base) ➜ scan-for-webcams git:(master) ✗ # export "SHODAN_API_KEY"="<your api key>"
(base) ➜ scan-for-webcams git:(master) ✗ #我自己创建了一个 .env 文件(但是不在github仓库中) ,里面包含了我的key 你也可以这样做!
(base) ➜ scan-for-webcams git:(master) ✗ source shodan-api-key.env
(base) ➜ scan-for-webcams git:(master) ✗ # 运行程序!
(base) ➜ scan-for-webcams git:(master) ✗ python MJPG.py
78.200.213.249:8089
193.197.172.126:9000
90.70.223.148:8081
94.124.213.104:9000
24.79.8.101:8081
2.10.49.203:8081
74.69.57.190:9001
83.88.251.10:8081
115.28.84.125:9001
91.218.193.147:8081
87.144.129.122:8081
213.185.145.54:9000
183.88.229.26:8081
153.228.13.28:8081
61.205.61.79:8081
109.88.194.156:8081
180.131.157.146:8889
199.192.71.185:8081
193.254.13.95:8181
178.193.148.47:8081
31.31.231.29:8081
46.47.132.106:8181
114.168.147.216:9001
90.42.74.78:9001
211.127.170.164:8081
(base) ➜ scan-for-webcams git:(master) ✗ # 点击输出的链接或者复制到你的浏览器就可以看到webcam!