Skip to content

Commit 949dcd0

Browse files
authored
web-check (#2662)
* add: web-check-install.sh * add: web-check.sh * Create web-check.json * Update web-check-install.sh * Update web-check-install.sh * Update web-check-install.sh * Update web-check.sh * Update web-check.json * Update web-check.sh * Update web-check-install.sh * Update web-check.json
1 parent 4cad868 commit 949dcd0

File tree

3 files changed

+234
-0
lines changed

3 files changed

+234
-0
lines changed

ct/web-check.sh

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: CrazyWolf13
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/Lissy93/web-check
7+
8+
APP="web-check"
9+
TAGS="network;analysis"
10+
var_cpu="2"
11+
var_ram="2048"
12+
var_disk="12"
13+
var_os="debian"
14+
var_version="12"
15+
var_unprivileged="1"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d /opt/web-check ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
msg_error "Currently we don't provide an update function for this ${APP}."
31+
exit
32+
}
33+
34+
start
35+
build_container
36+
description
37+
38+
msg_ok "Completed Successfully!\n"
39+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
40+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
41+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"

install/web-check-install.sh

+159
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: CrazyWolf13
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/lissy93/web-check
7+
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
8+
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt-get -y install --no-install-recommends \
18+
curl \
19+
sudo \
20+
mc \
21+
git \
22+
gnupg \
23+
traceroute \
24+
make \
25+
g++ \
26+
traceroute \
27+
xvfb \
28+
dbus \
29+
xorg \
30+
xvfb \
31+
gtk2-engines-pixbuf \
32+
dbus-x11 \
33+
xfonts-base \
34+
xfonts-100dpi \
35+
xfonts-75dpi \
36+
xfonts-scalable \
37+
imagemagick \
38+
x11-apps
39+
msg_ok "Installed Dependencies"
40+
41+
msg_info "Setting up Node.js Repository"
42+
mkdir -p /etc/apt/keyrings
43+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
44+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
45+
msg_ok "Set up Node.js Repository"
46+
47+
msg_info "Setup Python3"
48+
$STD apt-get install -y python3
49+
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
50+
msg_ok "Setup Python3"
51+
52+
msg_info "Installing Chromium"
53+
curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /etc/apt/trusted.gpg.d/google-archive.gpg
54+
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >/etc/apt/sources.list.d/google.list
55+
$STD apt-get update
56+
$STD apt-get -y install \
57+
chromium \
58+
libxss1 \
59+
lsb-release
60+
msg_ok "Installed Chromium"
61+
62+
msg_info "Installing Node.js"
63+
$STD apt-get update
64+
$STD apt-get install -y nodejs
65+
$STD npm install -g yarn
66+
msg_ok "Installed Node.js"
67+
68+
msg_info "Setting up Chromium"
69+
/usr/bin/chromium --no-sandbox --version > /etc/chromium-version
70+
chmod 755 /usr/bin/chromium
71+
msg_ok "Setup Chromium"
72+
73+
msg_info "Installing Web-Check (Patience)"
74+
temp_file=$(mktemp)
75+
RELEASE="patch-1"
76+
wget -q "https://github.com/CrazyWolf13/web-check/archive/refs/heads/${RELEASE}.tar.gz" -O $temp_file
77+
tar xzf $temp_file
78+
mv web-check-${RELEASE} /opt/web-check
79+
cd /opt/web-check
80+
cat <<EOF > /opt/web-check/.env
81+
CHROME_PATH=/usr/bin/chromium
82+
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
83+
HEADLESS=true
84+
GOOGLE_CLOUD_API_KEY=''
85+
REACT_APP_SHODAN_API_KEY=''
86+
REACT_APP_WHO_API_KEY=''
87+
SECURITY_TRAILS_API_KEY=''
88+
CLOUDMERSIVE_API_KEY=''
89+
TRANCO_USERNAME=''
90+
TRANCO_API_KEY=''
91+
URL_SCAN_API_KEY=''
92+
BUILT_WITH_API_KEY=''
93+
TORRENT_IP_API_KEY=''
94+
PORT='3000'
95+
DISABLE_GUI='false'
96+
API_TIMEOUT_LIMIT='10000'
97+
API_CORS_ORIGIN='*'
98+
API_ENABLE_RATE_LIMIT='false'
99+
REACT_APP_API_ENDPOINT='/api'
100+
ENABLE_ANALYTICS='false'
101+
EOF
102+
$STD yarn install --frozen-lockfile --network-timeout 100000
103+
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
104+
msg_ok "Installed Web-Check"
105+
106+
msg_info "Building Web-Check"
107+
$STD yarn build --production
108+
msg_ok "Built Web-Check"
109+
110+
msg_info "Creating Service"
111+
cat <<EOF > /opt/run_web-check.sh
112+
#!/bin/bash
113+
SCREEN_RESOLUTION="1280x1024x24"
114+
if ! systemctl is-active --quiet dbus; then
115+
echo "Warning: dbus service is not running. Some features may not work properly."
116+
fi
117+
[[ -z "${DISPLAY}" ]] && export DISPLAY=":99"
118+
Xvfb "${DISPLAY}" -screen 0 "${SCREEN_RESOLUTION}" &
119+
XVFB_PID=$!
120+
sleep 2
121+
cd /opt/web-check
122+
exec yarn start
123+
EOF
124+
chmod +x /opt/run_web-check.sh
125+
cat <<EOF > /etc/systemd/system/web-check.service
126+
[Unit]
127+
Description=Web Check Service
128+
After=network.target
129+
130+
[Service]
131+
Type=simple
132+
User=root
133+
Group=root
134+
WorkingDirectory=/opt/web-check
135+
EnvironmentFile=/opt/web-check/.env
136+
ExecStartPre=/bin/bash -c "service dbus start || true"
137+
ExecStartPre=/bin/bash -c "if ! pgrep -f 'Xvfb.*:99' > /dev/null; then Xvfb :99 -screen 0 1280x1024x24 & fi"
138+
ExecStart=/opt/run_web-check.sh
139+
Restart=on-failure
140+
Environment=DISPLAY=:99
141+
142+
[Install]
143+
WantedBy=multi-user.target
144+
EOF
145+
systemctl enable -q --now web-check
146+
msg_ok "Created Service"
147+
148+
motd_ssh
149+
customize
150+
151+
msg_info "Cleaning up"
152+
rm -rf $temp_file
153+
rm -rf /var/lib/apt/lists/* /app/node_modules/.cache
154+
$STD apt-get -y autoremove
155+
$STD apt-get -y autoclean
156+
msg_ok "Cleaned"
157+
158+
motd_ssh
159+
customize

json/web-check.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "Web-Check",
3+
"slug": "web-check",
4+
"categories": [
5+
4
6+
],
7+
"date_created": "2025-02-26",
8+
"type": "ct",
9+
"updateable": false,
10+
"privileged": false,
11+
"interface_port": 3000,
12+
"documentation": "https://github.com/Lissy93/web-check/blob/master/.github/README.md",
13+
"website": "https://github.com/lissy93/web-check",
14+
"logo": "https://raw.githubusercontent.com/Lissy93/web-check/refs/heads/master/.github/web-check-logo.png",
15+
"description": "Get an insight into the inner-workings of a given website: uncover potential attack vectors, analyse server architecture, view security configurations, and learn what technologies a site is using.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/web-check.sh",
20+
"resources": {
21+
"cpu": 2,
22+
"ram": 2048,
23+
"hdd": 12,
24+
"os": "debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": []
34+
}

0 commit comments

Comments
 (0)