'c_wait' is a PenetrationTesting and DevOps tool [an advanced health-check tool].
The script checks for open-connections (using user-input [args]).
And when the task is complete: The script will exit successfully (or with failure).
- Added more health-check methods (Crystal, Picolisp, G++, Clang++, GNAT(Ada), Haskell, Swift, Kotlin, Prolog(SWI), Neko, FreePascal).
- Added an option to save output to a log file.
- Fixed small bugs and optimized health-check methods.
- Typo.
- Added more health-check methods (CQL-shell, Racket, Guile, Julia).
- Fixed bugs.
- Optimized methods.
- Optimized code.
- Typo.
- More validations.
- Added a new option to display all supported and installed methods: [ ./c_wait.sh --installed ].
- Full support for the latest BusyBox version of Telnet and Wget.
- Added more health-check methods (SSH, MongoDB-Client, Groovy, Zsh, Ocaml).
- Fixed bugs.
- Optimized methods and performance.
- Optimzed code.
- Optimized for Kubernetes and Docker images (including full support for the most popular OS-images: Alpine, Ubuntu, CentOS, Fedora, Debian, AmazonLinux, OracleLinux, ROS, CirrOS, Mageia, ClearLinux, SourceMage and openSUSE).
- In addition, Full support for: BusyBox, Termux, macOS, RedHat, SUSELinux, ArchLinux, Mageia, GentooLinux, Endless, OpenBSD, FreeBSD, Solus, Guix, Slackware and other Linux distributions.
- Supporting over 53 health-check methods, to check for open-connections.
- Allow adding unlimited number of hosts.
- Allow connection-modes:
@ 'all' hosts must be connected to complete the task.
@ 'any' of the hosts must be connected to complete the task.- Allow limited/forever connection-retries.
- Option to display the installed and supported methods inside X machine.
- Customize methods and messages (easily editable from global values).
- Simple, user-friendly and easy to use.
- Netcat
- Bash
- SSH
- cURL
- Wget
- Telnet
- Gawk
- Zsh
- Ncat
- Nmap
- Socat
- Python
- Python3
- NodeJS
- Ruby
- Perl
- PHP
- Tcl
- OpenSSL
- Scala
- Crystal
- CQL-shell
- Mongo-shell
- Groovy
- R
- Elixir
- Erlang
- Clojure
- Racket
- Guile
- PicoLisp
- PowerShell
- Julia
- GCC
- G++
- Clang
- Clang++
- GNAT(Ada)
- Java-JDK
- Haskell
- Rust
- Go
- SBCL
- Dart
- D
- Nim
- OCaml
- Swift
- Kotlin
- .NET
- Prolog(SWI)
- Neko
- FreePascal
HOSTS="8.8.8.8:53 db:3306"
SLEEP_TIME="3"
RETRIES_COUNT="0"
CONNECT_MODE="all"
IS_QUIET_MODE="no"
LOG_FILE="-"
METHODS="nc bash ssh curl wget telnet gawk zsh ncat nmap socat python python3 node ruby perl php tclsh openssl scala crystal cqlsh mongo groovy Rscript elixir erl clojure racket guile pil pwsh julia gcc g++ clang clang++ gnatmake javac ghc rustc go sbcl dart dmd nim ocamlc swiftc kotlinc dotnet swipl nekoc fpc"
TIMEOUT="2"
readonly INIT_MESSAGE="'c_wait' - Initializing ..."
readonly CONNECT_MESSAGE="'c_wait' - Connection Succeed!"
readonly FAIL_MESSAGE="'c_wait' - Connection Failed!"
readonly DONE_MESSAGE="'c_wait' - Task Completed :)"
readonly QUIT_MESSAGE="'c_wait' - Terminated!"
[ 'c_wait' - ConnectionWait v1.4 ]
Usage:
./c_wait.sh --connect {all|any}
--sleep <secs> --retry <num|'forever'>
--log <file|'-'> <hosts:ports ...>
Short usage:
./c_wait.sh -c {all|any} -r <num|'0'>
-s <secs> -l <file|'-'> <hosts ...>
Examples:
./c_wait.sh -l out.txt
./c_wait.sh --sleep 1 google.com 8.8.8.8:53
./c_wait.sh -s 4 ftp:21 192.168.1.1:22
./c_wait.sh --quiet -s 10 -r 3 myserver:8000
./c_wait.sh -c any --log - localhost myftp:21
./c_wait.sh --connect all -q --retry 4 tln:25
Options and default values:
<hosts:ports ...>
('8.8.8.8:53 db:3306')
-c | --connect {all|any}
('all' of the selected hosts)
-s | --sleep <seconds>
('3' seconds)
-r | --retry <number|'forever'>
(connection-retries: 'forever')
-l | --log <file|'-'>
(log file: '')
-q | --quiet
(minimal output? 'no')
Display info:
-i | --installed
(display installed methods)
-h | --help | /?
(display this usage)
services:
db:
image: postgres
container_name: db
..........
..........
expose:
- '5432'
networks:
- shared
..........
..........
django_app:
build: .
..........
..........
entrypoint: /var/www/my_app/entrypoint_django_run.sh
networks:
- shared
..........
..........
networks:
shared:
./c_wait.sh db:5432
python3 manage.py runserver 0.0.0.0:8000
alaahag@gmail.com , +972527337763