vpn 세팅 스크립트 수정 10
This commit is contained in:
+10
-1
@@ -34,6 +34,10 @@ inputs:
|
|||||||
default: "form"
|
default: "form"
|
||||||
description: >
|
description: >
|
||||||
호환성용 입력. 현재 웹 로그인 방식은 password 단계 후 OTP를 ga_code_attempt 폼에 별도 제출합니다.
|
호환성용 입력. 현재 웹 로그인 방식은 password 단계 후 OTP를 ga_code_attempt 폼에 별도 제출합니다.
|
||||||
|
debug-otp:
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
description: "true면 seed 검증용으로 생성된 OTP를 로그에 출력합니다. 확인 후 즉시 false로 되돌리세요."
|
||||||
|
|
||||||
resource-name:
|
resource-name:
|
||||||
required: false
|
required: false
|
||||||
@@ -109,6 +113,7 @@ runs:
|
|||||||
VPN_PASS: ${{ inputs.vpn-password }}
|
VPN_PASS: ${{ inputs.vpn-password }}
|
||||||
OTP_SEED: ${{ inputs.otp-seed }}
|
OTP_SEED: ${{ inputs.otp-seed }}
|
||||||
OTP_SEED_FORMAT: ${{ inputs.otp-seed-format }}
|
OTP_SEED_FORMAT: ${{ inputs.otp-seed-format }}
|
||||||
|
DEBUG_OTP: ${{ inputs.debug-otp }}
|
||||||
RESOURCE_NAME: ${{ inputs.resource-name }}
|
RESOURCE_NAME: ${{ inputs.resource-name }}
|
||||||
TIMEOUT: ${{ inputs.timeout }}
|
TIMEOUT: ${{ inputs.timeout }}
|
||||||
run: |
|
run: |
|
||||||
@@ -228,11 +233,15 @@ runs:
|
|||||||
|
|
||||||
for otp_offset in 0 -1 1; do
|
for otp_offset in 0 -1 1; do
|
||||||
echo "OTP 제출 시도 (time-window offset=${otp_offset})"
|
echo "OTP 제출 시도 (time-window offset=${otp_offset})"
|
||||||
|
OTP_CODE="$(totp "$otp_offset")"
|
||||||
|
if [ "$DEBUG_OTP" = "true" ]; then
|
||||||
|
echo "DEBUG generated OTP offset=${otp_offset}: ${OTP_CODE} (unix-time=$(date +%s))"
|
||||||
|
fi
|
||||||
rm -f "$TOKEN_HEADERS" "$WORKDIR/04-token.body"
|
rm -f "$TOKEN_HEADERS" "$WORKDIR/04-token.body"
|
||||||
|
|
||||||
curl_common -L -b "$COOKIE_JAR" -c "$COOKIE_JAR" \
|
curl_common -L -b "$COOKIE_JAR" -c "$COOKIE_JAR" \
|
||||||
-X POST "$VPN_HOST/my.policy" \
|
-X POST "$VPN_HOST/my.policy" \
|
||||||
--data-urlencode "ga_code_attempt=$(totp "$otp_offset")" \
|
--data-urlencode "ga_code_attempt=$OTP_CODE" \
|
||||||
--data-urlencode "vhost=standard" \
|
--data-urlencode "vhost=standard" \
|
||||||
-o "$WORKDIR/03-webtop-${otp_offset}.html"
|
-o "$WORKDIR/03-webtop-${otp_offset}.html"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user