NICE 아이디 본인인증 요청을 자동화해주는 비공식 모듈
Project description
PASS-NICE
NICE아이디 본인인증 요청을 자동화해주는 비공식적인 Python 모듈입니다.
⚠️ 주의사항
교육용 및 학습용으로만 사용해 주세요
- 이 라이브러리를 사용함으로써 발생하는 모든 피해나 손실은 사용자 본인의 책임입니다.
- NICE아이디 및 한국도로교통공사측의 삭제 요청이 있을 경우, 즉시 삭제됩니다.
- 상업적 사용 시 출처를 명시해 주세요.
🚀 설치
pip install pass-nice
📋 지원 기능
- ✅ SMS 본인인증 (MVNO 포함, 모든 통신사 지원)
- 🔄 PASS 앱 본인인증 (지원 예정)
- 🌐 비동기 처리 (httpx 기반)
- 🛡️ 타입 안전성 (Type Hints)
🏗️ 지원 통신사
| 통신사 | 코드 | 비고 |
|---|---|---|
| SKT | "SK" |
SK텔레콤 |
| KT | "KT" |
KT |
| LGU+ | "LG" |
LG유플러스 |
| SKT 알뜰폰 | "SM" |
SK 계열 MVNO |
| KT 알뜰폰 | "KM" |
KT 계열 MVNO |
| LGU+ 알뜰폰 | "LM" |
LG 계열 MVNO |
💻 사용법
기본 사용예제
import asyncio
import pass_nice
async def main():
# 클라이언트 생성 (SKT 사용자의 경우로 예제를 작성했습니다.)
async with pass_nice.PASS_NICE("SK") as client:
# 1. 세션 초기화
init_result = await client.init_session()
if not init_result.success:
print(f"세션 초기화 실패: {init_result.message}")
return
# 2. 캡챠 이미지 가져오기
captcha_result = await client.retrieve_captcha()
if not captcha_result.success:
print(f"캡챠 이미지 가져오기 실패: {captcha_result.message}")
return
# 캡챠 이미지를 파일로 저장
with open("captcha.png", "wb") as f:
f.write(captcha_result.data)
# 3. 사용자로부터 캡챠 입력 받기
captcha_answer = input("캡챠 이미지를 확인하고 숫자 6자리를 입력하세요: ")
# 4. SMS 인증 요청
sms_result = await client.send_sms_verification(
name="홍길동",
birthdate="010203", # YYMMDD
gender="1", # 주민등록번호 뒷자리 첫째 자리
phone="01012345678", # 하이픈 없이
captcha_answer=captcha_answer
)
if not sms_result.success:
print(f"SMS 전송 실패: {sms_result.message}")
return
print("SMS가 전송되었습니다!")
# 5. SMS 인증 코드 확인
sms_code = input("휴대폰으로 받은 6자리 인증 코드를 입력하세요: ")
verify_result = await client.check_sms_verification(sms_code)
if verify_result.success:
print("✅ 본인인증이 완료되었습니다!")
else:
print(f"❌ 인증 실패: {verify_result.message}")
# 실행
asyncio.run(main())
🔄 Result 객체
모든 메서드는 Result 객체를 반환합니다:
@dataclass
class Result:
status: bool # 성공/실패 여부
message: str # 메시지 (오류 시 오류 메시지)
error_code: int # 오류 코드 (성공 시 9999)
data: Optional[T] # 반환 데이터 (있는 경우)
📄 라이센스
이 프로젝트는 MIT 라이센스 하에 배포됩니다.
📞 연락처
문의사항이 있으시면 sunr1s2@proton.me로 연락해 주세요.
⭐ 이 프로젝트가 도움이 되셨다면 Star를 눌러주세요!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pass_nice-2.0.0.tar.gz
(9.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pass_nice-2.0.0.tar.gz.
File metadata
- Download URL: pass_nice-2.0.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e9b7e5abe8a005bcf681034959319978756bd2ea87851e37c52adef1a6b19ff
|
|
| MD5 |
3ca196bac81bc1ddb7648457311d4f6d
|
|
| BLAKE2b-256 |
da9df1485335c24b28f396b04a6d6d726c53937a136b70c8f4a4b2ac5c2c00ab
|
File details
Details for the file pass_nice-2.0.0-py3-none-any.whl.
File metadata
- Download URL: pass_nice-2.0.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ab4c84009b417f03d7c4bc24dcdb75225c29f95d8e8bf9bc693d9871c87446d
|
|
| MD5 |
d74eba51efe7b951176893abf68eef89
|
|
| BLAKE2b-256 |
62bf6ea9cacbf27f600618c4470f395a46da5c8a5cbfe6606242f5dfbea14547
|