SpecialistOff.NET / Вопросы / Статьи / Фрагменты кода / Резюме / Метки / Помощь / Файлы
Список вопросов ПечатьRemiZOffAlex Создано: 2019-06-18 17:57:14.466073 Обновлено: 2019-06-18 17:57:14.466073 |
---|
PythonВариант I python -c 'import crypt; print crypt.crypt("PASSWORD", "$6$random_salt")' Вариант II import crypt import string import random alphabet = string.digits + string.ascii_letters password = '' salt = '' for i in range(16): password += random.choice(alphabet) salt += random.choice(alphabet) print(password) print(crypt.crypt(password, "$6$" + salt)) Вариант III python3 - <<EOF import crypt import string import random alphabet = string.digits + string.ascii_letters password = '' salt = '' for i in range(16): password += random.choice(alphabet) salt += random.choice(alphabet) print(password) print(crypt.crypt(password, "\$6\$" + salt)) EOF Perlperl -e 'print crypt("PASSWORD","\$6\$random_salt\$") . "\n"' |