회원 로그인
정보기억 정보기억에 체크할 경우 다음접속시 아이디와 패스워드를 입력하지 않으셔도 됩니다.
그러나, 개인PC가 아닐 경우 타인이 로그인할 수 있습니다.
PC를 여러사람이 사용하는 공공장소에서는 체크하지 마세요.
소셜네트워크 서비스를 통해서 로그인하시면 별도의 로그인 절차없이 회원서비스를 이용하실 수 있습니다.


최근 게시물

1.노션에서 작성 중

1.노션에서 작성 중

개편하기 전까지 노션에서 작성 중

2024.04.04//read more

2.ChatGPT

2.ChatGPT

OpenAI로 대규모 언어 모델대화형...

2023.03.16//read more

3.노코딩 게임 엔진 - 빌..

3.노코딩 게임 엔진 - 빌..

빌드 지원안드로이드iOS윈도우즈특이사...

2023.03.14//read more

4.(완료) 미접속 회원 정..

4.(완료) 미접속 회원 정..

[완료] 36명의 회원을 정리하였습니...

2023.02.16//read more

5.매뉴얼 플러스 - 전자제..



안정적인 DNS 서비스 DNSEver
DNS Powered by DNSEver.com


랜덤 패스워드 생성

푸딩뱃살 | 2015.03.24 02:34 | 조회 4287
랜덤 패스워드 생성

변수 righthand, lefthand의 조합으로 패스워드 길이(변수 passwordLength) 만큼 랜덤으로 패스워드를 출력한다.
#!/usr/bin/env python
"""
A simple script for making random passwords, WITHOUT 1,l,O,0.  Because
those characters are hard to tell the difference between in some fonts.
"""

#Import Modules
import sys
from random import Random

rng = Random()

righthand = '12345!@#$%qwertasdfgzxcvbQWERTASDFGZXCVB'
lefthand = '67890^&*()yuiophjknmYUIPHJKLNM'
allchars = righthand + lefthand

try:
    passwordLength = int(sys.argv[1])
except:
    #user didn't specify a length.  that's ok, just use 8
    passwordLength = 12
try:
    alternate_hands = sys.argv[2] == 'alt'
    if not alternate_hands:
        print "USAGE:"
        print sys.argv[0], "[length of password]",
        print "[alt (if you want the password to alternate hands]"
except:
    alternate_hands = False

for i in range(passwordLength):
    if not alternate_hands:
        sys.stdout.write( rng.choice(allchars) )
    else:
        if i%2:
            sys.stdout.write( rng.choice(lefthand) )
        else:
            sys.stdout.write( rng.choice(righthand) )

출처> http://code.activestate.com/recipes/473852/history/1
https://github.com/pedroma/scripts/blob/master/generator.py
285개(10/15페이지)
프로그래밍
번호 제목 글쓴이 조회 날짜
105 [Python] zipfile 모듈 사진 첨부파일 푸딩뱃살 4638 2015.09.15 10:17
104 [PHP] array 배열 / sort 정렬 푸딩뱃살 3460 2015.09.02 21:11
103 [PHP] function 함수 푸딩뱃살 2372 2015.08.14 22:28
102 [PHP] while, do, foreach 반복문 푸딩뱃살 4997 2015.08.14 22:25
101 [PHP] if ~ else 조건문 푸딩뱃살 2578 2015.08.14 22:13
100 [PHP] PHP 기초 (에러,주석,변수,연산자) 푸딩뱃살 3251 2015.07.08 00:43
99 [C#] override와 new 푸딩뱃살 3235 2015.05.14 01:34
98 [C#] 다형성 첨부파일 푸딩뱃살 2585 2015.05.08 15:42
97 [C#] 인터페이스 상속 푸딩뱃살 2645 2015.05.08 14:35
96 [C#] 인터페이스 (Interface) 푸딩뱃살 2577 2015.05.07 23:52
95 [C#] 추상 클래스 푸딩뱃살 3302 2015.05.07 22:45
>> [Python] 랜덤 패스워드 생성 첨부파일 푸딩뱃살 4288 2015.03.24 02:34
93 [PHP] php 5.5.x로 업데이트로 인한 preg_replace() 오류 푸딩뱃살 2738 2015.03.14 02:15
92 [PHP] php 5.5.x로 업데이트로 인한 mysql_connect() 오류 푸딩뱃살 6109 2015.03.14 02:01
91 [PHP] PHP Warning: Cannot modity header information ~ PH 푸딩뱃살 2789 2015.03.05 15:41
90 [C#] 참조 전달 ref와 값 전달 out 푸딩뱃살 6871 2015.02.26 00:10
89 [VisualStudio] Visual Studio Express 2013 Windows Desktop 설치 첨부파일 푸딩뱃살 2991 2015.02.17 03:12
88 [C#] 구조체 첨부파일 푸딩뱃살 3627 2015.01.07 14:17
87 [C#] 오버라이드 (override) 푸딩뱃살 4253 2014.11.21 02:17
86 [C#] 이름의 은폐 new 푸딩뱃살 3414 2014.11.21 02:13