Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qeeqbox committed Jul 9, 2020
1 parent d35a05b commit 9aa3707
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ Customizable honeypots for monitoring network traffic, bots activities and usern
- & More features to Explore

## Install and run
#### On ubuntu 18 or 19 System (Auto-configure dev)
#### On ubuntu 18 or 19 System (Auto-configure)
```bash
git clone https://github.com/qeeqbox/chameleon.git
cd chameleon
chmod +x ./run.sh
./run.sh auto_dev

The Grafana interface localhost:3000 will open automatically after finishing the initialization process (username is changeme457f6460cb287 and passowrd is changemed23b8cc6a20e0)
```
Wait for a few seconds until honeypot shows the IP address
```bash
Expand All @@ -47,21 +49,15 @@ ping 172.19.0.3
or run any network tool against it
nmap 172.19.0.3
```
To mointor the logs
```bash
open localhost:3000 (username is changeme457f6460cb287 and passowrd is changemed23b8cc6a20e0)
```

#### On ubuntu 18 or 19 System (Auto-configure test)
```bash
git clone https://github.com/qeeqbox/chameleon.git
cd chameleon
chmod +x ./run.sh
./run.sh auto_test
```
To mointor the logs
```bash
open localhost:3000 (username and passowrd: admin)

The Grafana interface localhost:3000 will open automatically after finishing the initialization process (username is admin and passowrd is admin)
```

#### Or, import your desired non-blocking server as object (SSH Server )
Expand Down
24 changes: 18 additions & 6 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@ echo -e "Current servers (DNS, HTTP Proxy, HTTP, HTTPS, SSH, POP3, IMAP, STMP, R

setup_requirements () {
sudo apt update -y
sudo apt install -y linux-headers-$(uname -r) docker.io jq
sudo apt install -y linux-headers-$(uname -r) docker.io jq xdg-utils
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
which docker-compose && echo "Good"
which docker && echo "Good"
}

wait_on_web_interface () {
echo ''
until $(curl --silent --head --fail http://localhost:3000 --output /dev/null); do
echo -ne "\n\n[\033[47m\033[0;31mInitializing project in progress..\033[0m]\n\n"
sleep 5
done
echo ''
xdg-open http://localhost:3000
}

test_project () {
sudo docker-compose -f docker-compose-test.yml up --build
}
Expand All @@ -31,28 +41,30 @@ auto_configure_test () {
test_project
}

auto_configure_dev () {
auto_configure () {
setup_requirements
dev_project
}

if [[ "$1" == "auto_test" ]]; then
stop_containers
wait_on_web_interface &
auto_configure_test
stop_containers
fi

if [[ "$1" == "auto_dev" ]]; then
if [[ "$1" == "auto_configure" ]]; then
stop_containers
auto_configure_dev
wait_on_web_interface &
auto_configure
stop_containers
fi

while read -p "`echo -e '\nChoose an option:\n1) Setup requirements (docker, docker-compose)\n2) Test the project (All servers and Sniffer)\n8) Run auto dev\n9) Run auto test\n>> '`"; do
while read -p "`echo -e '\nChoose an option:\n1) Setup requirements (docker, docker-compose)\n2) Test the project (All servers and Sniffer)\n8) Run auto configuration\n9) Run auto test\n>> '`"; do
case $REPLY in
"1") setup_requirements;;
"2") test_project;;
"8") auto_configure_dev;;
"8") auto_configure;;
"9") auto_configure_test;;
*) echo "Invalid option";;
esac
Expand Down

0 comments on commit 9aa3707

Please sign in to comment.