コード例 #1
0
ファイル: login2.py プロジェクト: AlexUlrich/digsby
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')
コード例 #2
0
ファイル: login2.py プロジェクト: sgricci/digsby
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')
コード例 #3
0
ファイル: login2.py プロジェクト: sgricci/digsby
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
コード例 #4
0
ファイル: login2.py プロジェクト: AlexUlrich/digsby
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
コード例 #5
0
ファイル: login2.py プロジェクト: sgricci/digsby
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
コード例 #6
0
ファイル: login2.py プロジェクト: AlexUlrich/digsby
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
コード例 #7
0
ファイル: smtp.py プロジェクト: Esteban-Rocha/digsby
 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)
コード例 #8
0
ファイル: smtp.py プロジェクト: sgricci/digsby
 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)