From 0bcba803151d159273e1853ef63c9fb3d23d10b4 Mon Sep 17 00:00:00 2001 From: Nils Streedain Date: Wed, 26 Apr 2023 23:40:23 -0700 Subject: [PATCH 1/8] Update wrangler.toml --- wrangler.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 0f84a3d2e3459549910704795207af848f2cd6d4 Mon Sep 17 00:00:00 2001 From: Nils Streedain Date: Wed, 26 Apr 2023 23:41:38 -0700 Subject: [PATCH 2/8] Update duo-bypass.js --- duo-bypass.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', From 3b2558367ced7751581ce5ed56cc70eb5025d027 Mon Sep 17 00:00:00 2001 From: Nils Streedain Date: Wed, 26 Apr 2023 23:42:23 -0700 Subject: [PATCH 3/8] Update duo-bypass --- script/duo-bypass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From 221f4873b9a0085019cd88d2246a888b2f746c0c Mon Sep 17 00:00:00 2001 From: Nils Streedain Date: Wed, 26 Apr 2023 23:52:12 -0700 Subject: [PATCH 4/8] Create Brewfile --- script/Brewfile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 script/Brewfile 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" From e9d205d9f44aaa750e98d68c277da739c5c309d0 Mon Sep 17 00:00:00 2001 From: Nils Streedain Date: Thu, 27 Apr 2023 00:01:04 -0700 Subject: [PATCH 5/8] Create install.sh --- script/install.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 script/install.sh diff --git a/script/install.sh b/script/install.sh new file mode 100644 index 0000000..6f5f96c --- /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/change-domain/script/Brewfile) + +# Install script to /usr/local/bin/ folder +sudo curl https://raw.githubusercontent.com/nilsstreedain/duo-bypass/change-domain/script/duo-bypass -sSLo "/usr/local/bin/duo-bypass" + +# Give script executable permission +sudo chmod +x /usr/local/bin/duo-bypass From bc4827a6ae9e7d117a7a267b0051ed1e67fa2a73 Mon Sep 17 00:00:00 2001 From: Nils Streedain Date: Thu, 27 Apr 2023 00:09:59 -0700 Subject: [PATCH 6/8] Fixed domain --- script/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/install.sh b/script/install.sh index 6f5f96c..eedd2ae 100644 --- a/script/install.sh +++ b/script/install.sh @@ -9,7 +9,7 @@ # Created by Nils Streedain on 4/26/23. # Install Homebrew dependencies -brew bundle --file=<(curl -fsSL https://raw.githubusercontent.com/nilsstreedain/duo-bypass/change-domain/script/Brewfile) +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/change-domain/script/duo-bypass -sSLo "/usr/local/bin/duo-bypass" From 74ade9a86b49ae2e7bb927aa1dadff521b28fef1 Mon Sep 17 00:00:00 2001 From: Nils Streedain Date: Thu, 27 Apr 2023 00:10:28 -0700 Subject: [PATCH 7/8] Fixed domain --- script/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/install.sh b/script/install.sh index eedd2ae..d14197d 100644 --- a/script/install.sh +++ b/script/install.sh @@ -12,7 +12,7 @@ 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/change-domain/script/duo-bypass -sSLo "/usr/local/bin/duo-bypass" +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 From 8f031bdb93addb3cb50d211a665e8b5a9b9eeb8f Mon Sep 17 00:00:00 2001 From: Nils Streedain Date: Thu, 27 Apr 2023 00:12:11 -0700 Subject: [PATCH 8/8] Update README.md --- script/README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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