-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathinstall.sh
executable file
·87 lines (68 loc) · 5.06 KB
/
install.sh
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# License holder: -
#COMMANDS
clear
function get_version() {
local file_path="$1"
local version_line
version_line=$(sed -n '2p' "$file_path")
local version_number
version_number=$(echo "$version_line" | cut -d ' ' -f 3)
echo "$version_number"
}
echo -e "This script will:\n-Install Curl\n-Install Jq\n-Install shodan framework.\n"
function banner {
clear
echo -e "
\e[32m █████████ █████ █████ \e[0m ███████████
\e[32m ███░░░░░███ ░░███ ░░███ \e[0m ░░███░░░░░███
\e[32m ███ ░░░ ████████ ███████ █████ ██████ \e[0m ░███ ░███ ██████ ██████ ██████ ████████
\e[32m ░███ ░███ ░░██ ██ ░░██ ███░░ ░░░███░ \e[0m ░██████████ ███░░███ ███░░███ ███░░███░░███░░███
\e[32m ░███ █████ ░███ ░██ ░██ ░██ ░░█████ ░███ \e[0m ░███░░░░░███ ░███████ ░███ ░░░ ░███ ░███ ░███ ░███
\e[32m ░███ ░░██ ░███ ░██ ░██ ░██ ░░░██ ░███ \e[0m ░███ ░███ ░███░░░ ░███ ███░███ ░███ ░███ ░███
\e[32m ░██████████ ████ █████ ░███████ ██████ ░░███ \e[0m █████ █████░░██████ ░░██████ ░░██████ ████ █████
\e[32m ░░░░░░░░░ ░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░░ \e[0m░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░░░░ ░░░░ ░░░░░
'##::::'##:::::'#######:::::::::'#####:::
## ##:::: ##::::'##.... ##:::::::'##.. ##::
## ##:::: ##::::..::::: ##::::::'##:::: ##:
## ##:::: ##:::::'#######::::::: ##:::: ##:
## . ##:: ##:::::'##::::::::::::: ##:::: ##:
## :. ## ##:::::: ##::::::::'###:. ##:: ##::
## ::. ###::::::: #########: ###::. #####:::
## :::...::::::::.........::...::::.....::::\e[5m############\e[0m"
echo -e "\e[32m GhostRecon: Open Source Intelligence Investigations Made Easy\e[0m"
echo ""
}
banner
read -p "Press enter to proceed"
# Install Curl, Jq, Shodan, and Exiv2
sudo apt-get -y install curl jq python3-shodan exiv2
# Create directory for tools
PATH_TO_TOOLS="/usr/share/GhostRecon"
PATH_TO_REPORTS="$HOME/.local/share/GhostRecon"
sudo mkdir -p "$PATH_TO_TOOLS" "$PATH_TO_REPORTS"
# Update tools
banner
echo -e "\e[1;31m [*] UPDATING SCRIPTS\e[0m"
echo "-------------------------------------------------------------------------------"
echo ""
sudo curl -s -o "$PATH_TO_TOOLS/email_scanner.py" "https://raw.githubusercontent.com/KawaCoder/GhostRecon/master/tools/email_scanner.py"
sudo curl -s -o "$PATH_TO_TOOLS/phone_locator.py" "https://raw.githubusercontent.com/KawaCoder/GhostRecon/master/tools/phone_locator.py"
sudo curl -s -o "$PATH_TO_TOOLS/uninstall.sh" "https://raw.githubusercontent.com/KawaCoder/GhostRecon/master/tools/uninstall.sh"
sudo curl -s -o "$PATH_TO_TOOLS/install.sh" "https://raw.githubusercontent.com/KawaCoder/GhostRecon/master/install.sh"
sudo curl -s -o "/usr/bin/Grecon" "https://raw.githubusercontent.com/KawaCoder/GhostRecon/master/Grecon"
# Make scripts executable
sudo chmod +x "$PATH_TO_TOOLS"/uninstall.sh /usr/bin/Grecon "$PATH_TO_TOOLS"/install.sh
version_local=$(get_version "/usr/bin/Grecon")
api_response=$(curl -s https://api.github.com/repos/KawaCoder/GhostRecon/branches/master)
lastcommitmessage=$(echo "$api_response" | jq -r '.commit.commit.message')
lastupdate_date=$(echo "$api_response" | jq -r '.commit.commit.author.date')
echo ""
echo -e "\e[1;31m VERSION: $version_local $lastupdate_date by DR34M-M4K3R\e[0m"
echo "----------------------------------------------------------------------------"
echo "$lastcommitmessage"
echo "----------------------------------------------------------------------------"
echo "You can restart GhostRecon "