Platform independant what of generating Linux compatible crypt(3) sha512 hashes ($6$ style). For systems (like macOS/OSX) where you can't `mkpasswd -m sha-512`.
mkpasswd.py
Mkpasswd For Macbook Pro
I have decided to give CoreOS a try on libvirt, using the image fedora-coreos-3.3.2-qemu.x8664.qcow2 and the instructions using the virt-install method. I’m using f32 as host os and after a few unsuccessful tries, I setenforce 0 to get SELinux out for the moment. However, until now CoreOS boots but I not able to login (neither on the login prompt nor with ssh). This is my fcc file. Mac-style bless on HFS or HFS+ files grub-menulst2cfg. Converts a GRUB Legacy menu.lst into a grub.cfg for use with GRUB 2 grub-mkconfig. Generate a grub config file grub-mkimage. Make a bootable image of GRUB grub-mklayout. Generates a GRUB keyboard layout file.
Mkpasswd For Macbook
Mkpasswd For Mac Torrent
#!/usr/bin/env python3 |
# Because OSX doesn't have mkpasswd... |
# Based on https://stackoverflow.com/a/17992126/117471 |
# python3 -c 'from passlib.hash import sha512_crypt; print(sha512_crypt.encrypt(input()))' <<< bruno # NOQA |
# Usage: |
# |
# $ ./mkpasswd.py |
# Password: |
# $6$rounds=656000$pfFmQISGcjWHOCxW$rBptiSK.tqSPnUiq6KiSHzz6LvvW/x1SjkkWFwxWB9Dt75NLNBs0N3OyGV4K5ejjBs/u.o3jtigvUKbmmwVQP. |
# |
# $ PROCESS_TIME=1 ./mkpasswd.py |
# Password: |
# $6$rounds=656000$e0OGrad82DBrUo9T$ldqtOdN54gmXI6nb0D.Y5mm5ih.LIQm/Ep/bkNL76.3hE65FqXA9wyZ.M5YOrv6dSvwhPAktXGJ6LJT0Fgd4x. |
# 656000 rounds in 1.008705 seconds of cpu time |
# |
# $ ROUNDS=1280000 PROCESS_TIME=1 ./mkpasswd.py <<< bruno |
# $6$rounds=1280000$QO5FSyw5rQpiY6PI$0zRMJ4RzCbH61XxIdpsUm/79.VZ13Mm9TBN9GvJwt1LI1U5FVzakrLya5VJsXlTou3p5ZeWmo29bIUjubRuc31 |
# 1280000 rounds in 1.9206560000000001 seconds of cpu time |
importos |
importsys |
importtime |
fromgetpassimportgetpass |
frompasslib.hashimportsha512_crypt |
rounds=os.environ.get('ROUNDS') |
ifnotrounds: |
rounds=sha512_crypt.default_rounds |
passwd=input() ifnotsys.stdin.isatty() elsegetpass() |
proc=sha512_crypt.using(rounds=rounds) |
start=time.process_time() |
out=proc.encrypt(passwd) |
end=time.process_time() |
print(out) |
ifos.environ.get('PROCESS_TIME'): |
print('{} rounds in {} seconds of cpu time'.format(rounds, end-start)) |
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment