Results 1 to 8 of 8
  1.    #1  
    For those interesting in patching or adding to carrierdb.json on WebOS 2.0 devices, here are some tools that can decrypt and encrypt the dataconnection blobs. You'll need PyCrypto + Python for these versions of the tools, but they should be relatively easy to port to other languages.

    It's a simple statically-keyed blowfish cipher in CBC mode. The last byte in the data tells you how many bytes of padding were tacked on to make it a multiple of the blowfish block size.

    Example:

    Code:
    echo "yq2GHC/Cjs/vhbVZlRISndg1sgGx9w+uWMXHvxd8kW4N4cpeWN8riLiPVTjKzCAfqZgiZUjJeCSLz3c/NwOU/+vSn6MCWacW66YTu+rNR4EyPTD8w8wjLELRPJ41+VKWRMnQnfOCe9kKAiv/b8Iu4S4jBkBYsjbkDLSpKnWna05UshOtRjgH5DqTWpaWiRRHZsOaNlfnMfz+UAB8BOB8I6IAJPjs1KFTejKmgIA6gXWYOYYMV/7BLGoV6u9pRuoMwsW5YbQ/rMoDHhHntKno51rz+oI+zabRJeaIv1s5X7MuDpx1IE9WHbrMbHtisojaNsfMMgJqwiVuJfjYmyFwVdF5UAqcJpieYLS2rZ3Ugr4fhjJx23Z3qd+r+stln+VBEi+uBoeBiPTvKUQmWAv8w2no4t0i0X0Uj7VIE/7IqvYcNgjLUVbYGKjmM/akK0QC16ho6mmW/8sj3+JjcwhJYrDY+4eXcarOIxS39+4PUkpWyRKYru7ddXLuJq2ug975BOPNC8Bfp+rA4JCwmH0IaWeevRikTiP6Dhl2UvdbqgC3ICECdj5FYbqtJAZ6YC//tvGietA3C5WXjhLSpyReCMBEMgn5khiKqMYdxZGX74QBEfUDexgt6F5qCXEr08+Yx391VvNjdsUEN3To4rXExX2e8KYaKQy4b2+vj5NbA2CPTioK1Ye6ajjUcPH0EJE8zb7DWRjpvh5iGHMD5femW7kygIXaJJJapnZNbA3iw2SWPHg28doMjOz7aeb9vaO6C8QMxn9Dslc8YBQrsQFgYcW/1OTvBUnqsm3G8Wx6oNaEjqISuGTNLIAUculybnBDwCHd89LZgEMb6sJLoNJSvX9VyVTSl1fG" | ./decrypt.py 
    [{"apnid":410,"regionName":"INTERNET TIGO SV","serviceDefault":1,"supportedService":1,"cshnUserName":"","cshnPassword":"","apn":"internet.tigo.sv","ignoreRoamGuard":false,"tetheredNaiRequired":false,"slot":0,"domains":[]},{"apnid":411,"regionName":"MMS TIGO SV","serviceDefault":4,"supportedService":4,"cshnUserName":"","cshnPassword":"","apn":"mms.tigo.sv","ignoreRoamGuard":false,"tetheredNaiRequired":false,"slot":0,"domains":[]},{"apnid":658,"regionName":"WAP TIGO SV","serviceDefault":2,"supportedService":2,"cshnUserName":"","cshnPassword":"","apn":"wap.tigo.sv","ignoreRoamGuard":false,"tetheredNaiRequired":false,"slot":0,"domains":[]}]
    Decrypt:

    Code:
    #!/usr/bin/python
    import sys
    from binascii import *
    from base64 import *
    import Crypto.Cipher.Blowfish as bf
    
    b = bf.new(unhexlify('36260911170154229903184995501501'), bf.MODE_CBC, unhexlify('0102030405060708'))
    
    out = b.decrypt(b64decode(sys.stdin.read()))
    padding_count = ord(out[-1])
    sys.stdout.write(out[:-padding_count])

    Encrypt:

    Code:
    #!/usr/bin/python
    import sys
    from binascii import *
    from base64 import *
    import Crypto.Cipher.Blowfish as bf
    
    b = bf.new(unhexlify('36260911170154229903184995501501'), bf.MODE_CBC, unhexlify('0102030405060708'))
    
    input = sys.stdin.read()
    padding_count = ((8 - (len(input) % 8)))
    input += padding_count * chr(((8 - (len(input) % 8))))
    print b64encode(b.encrypt(input))
    Last edited by digitalunlock; 06/07/2011 at 01:31 PM.
  2. #2  
    Thanks!

    -- Rod
  3. #3  
    wow! thanks maybe I can get mms in Belarus to work under 2.1
    I will try it out right now!
  4.    #4  
    Quote Originally Posted by ahsirg View Post
    wow! thanks maybe I can get mms in Belarus to work under 2.1
    I will try it out right now!
    One additional note: below are some examples of what you'll find when you decrypt the blob. Not sure if "apnid" has a specific meaning or if it was just generated from one of Palm's internal databases:

    Code:
    [{"apnid":18,"regionName":"NetCom","serviceDefault":1,"supportedService":1,"cshnUserName":"hs_null","cshnPassword":"hs_null","apn":"netcom","ignoreRoamGuard":false,"tetheredNaiRequired":false,"slot":0,"domains":[]},{"apnid":19,"regionName":"NetCom","serviceDefault":4,"supportedService":4,"cshnUserName":"mms","cshnPassword":"netcom","apn":"mms.netcom.no","ignoreRoamGuard":false,"tetheredNaiRequired":false,"slot":0,"domains":[]}]
    
    [{"apnid":1070,"regionName":"Fido Internet","serviceDefault":1,"supportedService":1,"cshnUserName":"","cshnPassword":"","apn":"fido-core-appl1.apn","ignoreRoamGuard":false,"tetheredNaiRequired":false,"slot":0,"domains":[]},{"apnid":1071,"regionName":"Fido MMS","serviceDefault":4,"supportedService":4,"cshnUserName":"","cshnPassword":"","apn":"fido-core-appl1.apn","ignoreRoamGuard":false,"tetheredNaiRequired":false,"slot":0,"domains":[]},{"apnid":1072,"regionName":"Fido Tethering","serviceDefault":5,"supportedService":5,"cshnUserName":"","cshnPassword":"","apn":"isp.fido.apn","ignoreRoamGuard":false,"tetheredNaiRequired":false,"slot":0,"domains":[]}]
  5.    #5  
    BTW, we've also ported this tool to Javascript for those who don't want to use Python at the command line:

    DigitalUnlock carrierdb.json Editor
  6. #6  
    I've successfully made some entries for the carrierdb.json,
    but still no luck at getting:
    voicemail number to work
    mms to work

    maybe i did smth wrong, although never mind, i can live without it
  7.    #7  
    Quote Originally Posted by ahsirg View Post
    I've successfully made some entries for the carrierdb.json,
    but still no luck at getting:
    voicemail number to work
    mms to work

    maybe i did smth wrong, although never mind, i can live without it
    Can you post your modified entries here?
  8. #8  
    Sorry i missed the message, will post soon.

Posting Permissions