Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gr4viton/shodaniel
Docker based shodan webcam screensaver
https://github.com/gr4viton/shodaniel
Last synced: about 6 hours ago
JSON representation
Docker based shodan webcam screensaver
- Host: GitHub
- URL: https://github.com/gr4viton/shodaniel
- Owner: gr4viton
- License: lgpl-3.0
- Created: 2020-01-12T22:38:28.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T03:55:16.000Z (almost 2 years ago)
- Last Synced: 2023-08-06T09:04:31.221Z (over 1 year ago)
- Language: Python
- Size: 52.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ip-search-engines - Shodaniel
README
# shodaniel
## what?
shodan search for open webcam streams and random show them in a loop = screensaver
## how
- docker container runs gui via Xserver sharing (sorry applindows)
- code in python### packages
- [requirements/base.in](requirements/base.in)
- future?:
- kivy, Qt# plan
## classes
Streamer
- control what is shown
- UI
- holds video canvas
- timings of random cycling
- main loop
- crawler get 5 stream ips
- create 5 streams
- add 5 streams to queue
- cycle in queue
- user input (exit, next previous)Crawler
- acquire ips via shodan
- get mutliple ipsStream(CamGear)
- holds open video
- check whether not emptyStreamQueue
- loads streams
- holds loaded streams
- cycles through streams
- method
- add() - adds new Stream
- next()## todo
- basic working concept
- find streams
- show streams
- list through them
- auto rotate
- stream filtering
- as to what to show
- another displaying option
- make it multi platform
- skip X from docker
- use rtsp stream and vlc on local host machin
- flask / fastapi for the control of streamer# test
test gui via docker-compose - shodan screensaver?
## multiplatform?
- it needs X to run - so probly only linux
- platforms
- linux
- with X11 = OK
- mac
- not tested - maybe possible with x-quartz / [xrdp](https://github.com/deskor/xrdp)
- read [thread here](https://forums.docker.com/t/how-to-run-gui-apps-in-containiers-in-osx-docker-for-mac/17797/6)
- windows
- ??via VNC it should be possible on "any system"
- not tested## run
Make sure you have docker and docker-compose installed.
```sh
docker-compose build
xhost +local:docker
docker-compose up
```# troubleshoot
## x could not connect to display
if you get error
```
No protocol specified
QXcbConnection: Could not connect to display :0
```
you may need to run this on your host - localmachine
```sh
xhost +local:docker
```[source](https://forums.docker.com/t/start-a-gui-application-as-root-in-a-ubuntu-container/17069)
it happens cuz in docker container you are using the user `root`.
if you would use user `user` (non-root priviledged) it would work normaly,
but the opencv docker image is done in a way you need to work as root in the docker container
# links
- [opencv in docker](https://www.learnopencv.com/install-opencv-docker-image-ubuntu-macos-windows/)
- [elegant venv in dockerfile](https://pythonspeed.com/articles/activate-virtualenv-dockerfile/)- [vidgear](https://github.com/abhiTronix/vidgear/wiki/CamGear)
- [xeyes in docker](https://nelkinda.com/blog/xeyes-in-docker/)
- [rtsp url suffix example](https://community.ui.com/questions/How-do-i-view-Aircam-stream-in-VLC-media-player/44edbcad-f4f1-4e16-9531-faccb3f8cae2)
- [rtsp url documentation](https://www.leadtools.com/help/leadtools/v20/multimedia/transforms/rtsp-source-url-syntax.html)
- [opencv 3 cameras threads](https://stackoverflow.com/a/54068591/3029008)
- [opencv 3 concatenate images](https://note.nkmk.me/en/python-opencv-hconcat-vconcat-np-tile/)
- [python threading how to kill a thread](https://www.geeksforgeeks.org/python-different-ways-to-kill-a-thread/)
- [opencv fullscreen](https://answers.opencv.org/question/198479/display-a-streamed-video-in-full-screen-opencv3/)