This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
HOST=$1 | |
PORT=$2 | |
DAYS=${3:-10} | |
CERT_FILE=$(mktemp) | |
### Read Site Certificate and save as File ### | |
timeout --preserve-status 3 openssl s_client -servername $HOST -connect $HOST:$PORT 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > "$CERT_FILE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
RESULT_FILE="/tmp/result.txt" | |
FILE_WITH_CSRF="/tmp/output.html" | |
COOKIES_FILE="/tmp/cookies.txt" | |
MODULE_NAME="node-red-contrib-openhab3" | |
FLOWS_URL="https://flows.nodered.org/add/node" | |
# remove any previous cookies | |
if [ -f "${COOKIES_FILE}" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import re | |
import sys | |
for i in sys.stdin: | |
g = re.match('.*\<.*name="_csrf".*value="(.*)"\>.*', i); | |
if g is not None: | |
print (g.group(1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
read -p "Username >" username | |
IFS= read -p "Password >" password | |
salt=$(sudo getent shadow $username | cut -d$ -f3) | |
epassword=$(sudo getent shadow $username | cut -d: -f2) | |
match=$(python3 -c 'import crypt; print(crypt.crypt("'"${password}"'", "$6$'${salt}'"))') | |
echo "salt=$salt" | |
echo "match=$match" | |
echo "epassword=$epassword" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM traefik:v2.3.2 | |
COPY traefik.yml /etc/traefik/traefik.yml | |
RUN mkdir /etc/traefik/conf | |
COPY tls.yml /etc/traefik/conf | |
COPY http.yml /etc/traefik/conf |