diff --git a/duo-bypass.js b/duo-bypass.js index 7350c71..5a52437 100644 --- a/duo-bypass.js +++ b/duo-bypass.js @@ -24,7 +24,7 @@ async function duoBypass() { const apiParams = urlInput.value.split('=').pop().split('-'); // Post new device to DUO API - const response = await fetch('https://duo-bypass.com/api', { + const response = await fetch('https://duo-bypass.nilsstreedain.com/api', { method: 'POST', headers: { 'Accept': 'application/json', diff --git a/script/Brewfile b/script/Brewfile new file mode 100644 index 0000000..3ff8640 --- /dev/null +++ b/script/Brewfile @@ -0,0 +1,5 @@ +# 'brew install' +brew "jq" +brew "coreutils" +brew "qrencode" +brew "oath-toolkit" diff --git a/script/README.md b/script/README.md index dd96da8..f586f0f 100644 --- a/script/README.md +++ b/script/README.md @@ -1,8 +1,17 @@ # duo-bypass (script) Script to generate valid HOTP key from DUO Security credentials allowing use of 3rd party and open source authentication applications such as Google Authenticator. An automatic installer, along with a online version is currently in progress. -## Install: -An automatic install script is in progress, for the time being, this manual process is required. +## Installation Script +For quick installaion, follow the instructions below, otherwise. If you are not comfortable with installaion via a script, follow the steps in the [Manual Install](#manual-install) section below. + +WARNING: Automatic script requires Homebrew to be setup/installed. If you do not have homebrew installed, read more [here](brew.sh). + +Paste the command below in terminal and enter your password to install duo-bypass +```bash +curl -sSL https://raw.githubusercontent.com/nilsstreedain/duo-bypass/main/script/install.sh | bash +``` + +## Manual Install 1. Install dependencies using apt-get or homebrew - jq - coreutils @@ -15,7 +24,7 @@ chmod +x /usr/local/bin/duo-bypass ``` -## Setup: +## Setup 1. Install `duo-bypass` 2. Navigate to your DUO Security Portal 3. Login with your current DUO 2fa method diff --git a/script/duo-bypass b/script/duo-bypass index 624b7ab..bdbc519 100644 --- a/script/duo-bypass +++ b/script/duo-bypass @@ -1,6 +1,6 @@ #!/bin/sh +x -# duo-workaround +# duo-bypass # # Script to generate valid HOTP key from DUO Security credentials allowing # use of 3rd party and open source authentication applications. diff --git a/script/install.sh b/script/install.sh new file mode 100644 index 0000000..d14197d --- /dev/null +++ b/script/install.sh @@ -0,0 +1,18 @@ +#!/bin/sh +x + +# install.sh +# +# duo-bypass +# +# Script for installing the duo-bypass script +# +# Created by Nils Streedain on 4/26/23. + +# Install Homebrew dependencies +brew bundle --file=<(curl -fsSL https://raw.githubusercontent.com/nilsstreedain/duo-bypass/main/script/Brewfile) + +# Install script to /usr/local/bin/ folder +sudo curl https://raw.githubusercontent.com/nilsstreedain/duo-bypass/main/script/duo-bypass -sSLo "/usr/local/bin/duo-bypass" + +# Give script executable permission +sudo chmod +x /usr/local/bin/duo-bypass diff --git a/wrangler.toml b/wrangler.toml index f55df52..fedceb7 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,7 +1,7 @@ name = "duo-bypass" main = "worker.js" -compatibility_date = "2022-10-08" +compatibility_date = "2023-04-26" workers_dev = false -route = { pattern = "duo-bypass.com/api", zone_name = "duo-bypass.com" } +route = { pattern = "duo-bypass.nilsstreedain.com/api", zone_name = "nilsstreedain.com" } minify = true