Python generates 8-bit random passwords. python generates 8-bit random passwords.
This example describes how to generate a simple 8-bit random password in Python. We will share this with you for your reference. The details are as follows:
#! /Usr/bin/env python #-*-coding: UTF-8-*-import randomimport string # first method seed = "1234567890 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ! @ # $ % ^ & * () _ + =-"Sa = [] for I in range (8): sa. append (random. choice (seed) salt = ''. join (sa) print salt # method 2 salt = ''. join (random. sample (string. ascii_letters + string. digits, 8) print salt
PS: Here are two related online tools for your reference:
Online random number/string generation tool:
Http://tools.jb51.net/aideddesign/suijishu
High-strength Password generator:
Http://tools.jb51.net/password/CreateStrongPassword