fix(performance): GS샵 운영 KEY — 16진수 키 변형(글자 그대로·16진수 풀기·앞 32자)도 시도
- 포털 운영 KEY 가 16진수 글자라 키를 바이트로 쓰는 법을 모드와 함께 차례로 시도, 통과한 조합 기억 - 입력칸·안내 문구를 "운영 KEY"로(개발 KEY 아님), 연결 성공 문구에 통과한 방식 표시 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1220,6 +1220,10 @@ def test_gsshop_token_connection_and_probe():
|
||||
u = padding.PKCS7(128).unpadder()
|
||||
return (u.update(raw) + u.finalize()).decode()
|
||||
|
||||
# 키 변형: 32자 16진수 → 글자 그대로(AES256) + 16진수 풀기(16바이트), 64자 16진수 → 풀어서 32바이트 + 앞 32자
|
||||
hex32 = "af3df6c96b92f9166fd75b80006c6812"
|
||||
assert [v for v, _ in gs.key_variants(hex32)] == ["text", "hex"]
|
||||
assert [(v, len(b)) for v, b in gs.key_variants(hex32 * 2)] == [("hex", 32), ("first32", 32)]
|
||||
now = datetime(2018, 10, 17, 17, 49, 13)
|
||||
for mode in gs.TOKEN_MODES:
|
||||
assert decrypt(gs.make_token(key, "1036018", now, mode), mode) == "201810171749131036018"
|
||||
@@ -1276,7 +1280,7 @@ def test_gsshop_token_connection_and_probe():
|
||||
try:
|
||||
gs.GsshopAdapter().test_connection(bad)
|
||||
except AuthFailed as exc:
|
||||
assert "X" * 32 not in exc.message and "3가지" in exc.message
|
||||
assert "X" * 32 not in exc.message and "3가지" in exc.message # 32자 글자 키 → 모드 3가지
|
||||
else:
|
||||
raise AssertionError("인증 실패여야 합니다")
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user