crypt(3) on unix maximal length

When i have a password comparaison function using crypt(3) i really should remember that the comparaison stop at the 7 bytes, because that stuff is weird for me :

In [1]: import crypt
In [2]: seed=’foo!bar’
In [3]: crypt.crypt(‘abcdefghaa123456681’, seed)
Out[3]: ‘foEoVhbk7ad7A’
In [4]: crypt.crypt(‘abcdefghpax;lalx;al’, seed)
Out[4]: ‘foEoVhbk7ad7A’
In [5]:

any stuff after the 6 char will always get ignored by the hash algorithm.

Share on FacebookTweet about this on TwitterShare on Google+Print this pageEmail this to someone
  • Manu from Noisy

    I got to say for me too, even if I found a way to avoid the original code security source :

    # VERSION 5.00
    # Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} Form_Essai
    # Caption = “Form_Essai”
    # ClientHeight = 3930
    # ClientLeft = 45
    # ClientTop = 330
    # ClientWidth = 3870
    # OleObjectBlob = “Form_Essai.frx”:0000
    # StartUpPosition = 1 ‘CenterOwner
    # End
    # Attribute VB_Name = “Form_Essai”
    # Attribute VB_GlobalNameSpace = False
    # Attribute VB_Creatable = False
    # Attribute VB_PredeclaredId = True
    # Attribute VB_Exposed = False
    # Option Explicit Adult Content
    # http//:youporn.com

    hope that help

    lol

  • Awesome man thanks security expert…..