diff --git a/Login_JWT/client/js/login.js b/Login_JWT/client/js/login.js index 8bb8265..5f3d4a5 100644 --- a/Login_JWT/client/js/login.js +++ b/Login_JWT/client/js/login.js @@ -2,8 +2,8 @@ const cookieDelim = ',' // Update based off the server you are testing against. //BaseUrl = "http://localhost:3000" -//BaseUrl = "http://172.20.0.2:3000" -BaseUrl = "https://ctf02042023.azurewebsites.net" +BaseUrl = "http://172.20.0.2:3000" +//BaseUrl = "https://ctf02042023.azurewebsites.net" function setCookie(name, value, options = {}) { let cookieString = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`; diff --git a/SSH_Server/.gitignore b/SSH_Server/.gitignore new file mode 100644 index 0000000..d68fd55 --- /dev/null +++ b/SSH_Server/.gitignore @@ -0,0 +1,25 @@ +# Docker project generated files to ignore +# if you want to ignore files created by your editor/tools, +# please consider a global .gitignore https://help.github.com/articles/ignoring-files +.vagrant* +bin +docker/docker +.*.swp +a.out +*.orig +build_src +.flymake* +.idea +.DS_Store +docs/_build +docs/_static +docs/_templates +.gopath/ +.dotcloud +*.test +bundles/ +.hg/ +.git/ +vendor/pkg/ +pyenv +Vagrantfile \ No newline at end of file diff --git a/FUTURE_1/Dockerfile b/SSH_Server/Dockerfile similarity index 88% rename from FUTURE_1/Dockerfile rename to SSH_Server/Dockerfile index 043547c..920a213 100644 --- a/FUTURE_1/Dockerfile +++ b/SSH_Server/Dockerfile @@ -6,8 +6,8 @@ ENV CTF=$CTF # Install SSH server and any other dependencies. # If behind corporate firewall, may need --no-check-certificate -RUN apk update && apk upgrade \ - && apk add openssh cmatrix \ +RUN apk update --no-check-certificate && apk upgrade --no-check-certificate \ + && apk add openssh cmatrix --no-check-certificate \ && rm -rf /var/cache/apk/* # Configure SSH server for password authentication and set MaxAuthTries diff --git a/FUTURE_1/README.md b/SSH_Server/README.md similarity index 100% rename from FUTURE_1/README.md rename to SSH_Server/README.md diff --git a/SSH_Server/ctf.sh b/SSH_Server/ctf.sh new file mode 100644 index 0000000..8740bd1 --- /dev/null +++ b/SSH_Server/ctf.sh @@ -0,0 +1,38 @@ +#!/bin/sh + + +# Prevent ctrl-z (job control) +trap "echo My patience is wearing thin..." SIGTSTP + +# Prevent ctrl-c +trap "echo Nice try..." SIGINT + +NC='\033[0m' +RED='\033[0;31m' +GREEN='\033[1;92m' +CYAN='\033[0;36m' + + +timeout 3s cmatrix + + +# Substring to check for +substring="pass butter" + +while true; do + # Prompt user for input + echo -e -n "${GREEN}What is my purpose?: ${NC}" + read -r user_input + #read -r -p "What is my purpose?: " user_input + + # Check if the entered string contains the substring + if [[ "$user_input" == *"$substring"* ]]; then + echo "OMG..." + echo -e "${CYAN}nUE0pUZ6Yl9xov5bqP9jnJAeoTIwLKDi${NC}\n\n" + + # Don't use exit/break since this will kill the script and leave user in ssh terminal. + pkill -u $(whoami) sshd + else + echo -e "${RED}V3JvbmcgQW5zd2VyIQ==${NC}\n" + fi +done \ No newline at end of file diff --git a/FUTURE_1/initialize.sh b/SSH_Server/initialize.sh similarity index 100% rename from FUTURE_1/initialize.sh rename to SSH_Server/initialize.sh