forked from Datalux/Osintgram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (33 loc) · 1.76 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
SHELL := /bin/bash
setup:
@echo -e "\e[34m####### Setup for Osintgram #######\e[0m"
@[ -d config ] || mkdir config || exit 1
@echo -n "{}" > config/settings.json
@read -p "Instagram Username: " uservar; \
read -sp "Instagram Password: " passvar; \
echo -en "[Credentials]\nusername = $$uservar\npassword = $$passvar" > config/credentials.ini || exit 1
@echo ""
@echo -e "\e[32mSetup Successful - config/credentials.ini created\e[0m"
run:
@echo -e "\e[34m######## Building and Running Osintgram with Docker-compose ########\e[0m"
@[ -d config ] || { echo -e "\e[31mConfig folder not found! Please run 'make setup' before running this command.\e[0m"; exit 1; }
@echo -e "\e[34m[#] Killing old docker processes\e[0m"
@docker-compose rm -fs || exit 1
@echo -e "\e[34m[#] Building docker container\e[0m"
@docker-compose build || exit 1
@read -p "Target Username: " username; \
docker-compose run --rm osintgram $$username
build-run-testing:
@echo -e "\e[34m######## Building and Running Osintgram with Docker-compose for Testing/Debugging ########\e[0m"
@[ -d config ] || { echo -e "\e[31mConfig folder not found! Please run 'make setup' before running this command.\e[0m"; exit 1; }
@echo -e "\e[34m[#] Killing old docker processes\e[0m"
@docker-compose rm -fs || exit 1
@echo -e "\e[34m[#] Building docker container\e[0m"
@docker-compose build || exit 1
@echo -e "\e[34m[#] Running docker container in detached mode\e[0m"
@docker-compose run --name osintgram-testing -d --rm --entrypoint "sleep infinity" osintgram || exit 1
@echo -e "\e[32m[#] osintgram-test container is now Running!\e[0m"
cleanup-testing:
@echo -e "\e[34m######## Cleanup Build-run-testing Container ########\e[0m"
@docker-compose down
@echo -e "\e[32m[#] osintgram-test container has been removed\e[0m"