Example #1
0
def make_remainder(password):
    return '@\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00' + pack_pstr(
            '\x00' + pack_pstr(password) +\
            '\x00\x03\x00\x01' +\
            '\x00\x05UTF-8' +\
            '\x00\x02' +\
            '\x00\x02en' +\
            '\x00\x03' +\
            '\x00\x02US')
Example #2
0
def make_remainder(password):
    return '@\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00' + pack_pstr(
            '\x00' + pack_pstr(password) +\
            '\x00\x03\x00\x01' +\
            '\x00\x05UTF-8' +\
            '\x00\x02' +\
            '\x00\x02en' +\
            '\x00\x03' +\
            '\x00\x02US')
Example #3
0
def make_packet2(un, password):
    n = top3 + 'i0' + middle
    n += pack_pstr(un.encode('ascii'))
    n += m2
    r = make_remainder(password)
    n += pack('!H', len(r))
    n += r
    return n
Example #4
0
def make_packet2(un, password):
    n = top3 + 'i0' + middle
    n += pack_pstr(un.encode('ascii'))
    n += m2
    r = make_remainder(password)
    n += pack('!H', len(r))
    n += r
    return n
Example #5
0
def make_packet(un, password):
    #i0 are two "random bytes", not sure what the restrictions here are
    n = top3 + 'i0' + middle
    n += pack_pstr(un)
    n += m2
    r = make_remainder(password)
    n += pack('!H', len(r))
    n += r
    t = top % (len(n))
    return t + top2 + n
Example #6
0
def make_packet(un, password):
    #i0 are two "random bytes", not sure what the restrictions here are
    n = top3 + 'i0' + middle
    n += pack_pstr(un)
    n += m2
    r = make_remainder(password)
    n += pack('!H', len(r))
    n += r
    t = top % (len(n))
    return t + top2 + n
Example #7
0
 def _glue_pw(cls, encrypted_pw, encrypted_smtppw):
     password = pack_pstr(profile.plain_pw(encrypted_pw).encode("utf-8")).decode("utf-8")
     smtppw = pack_pstr(profile.plain_pw(encrypted_smtppw).encode("utf-8")).decode("utf-8")
     return profile.crypt_pw(password + smtppw)
Example #8
0
 def _glue_pw(cls, encrypted_pw, encrypted_smtppw):
     password = pack_pstr(profile.plain_pw(encrypted_pw).encode('utf-8')).decode('utf-8')
     smtppw = pack_pstr(profile.plain_pw(encrypted_smtppw).encode('utf-8')).decode('utf-8')
     return profile.crypt_pw(password + smtppw)