DarkHobbit / doublecontact

Offline DE-independent Qt-based contact manager primarily for phonebooks editing/merging. Beta.
GNU General Public License v3.0
52 stars 11 forks source link

PDU decoder fails on entries that contain SMSC #49

Closed bodqhrohro closed 3 years ago

bodqhrohro commented 3 years ago

It doesn't even try to properly decode the SMSC information, and just assumes that it's one byte for MPE and 0xB0 bytes for Nokia backups.

This leads to a completely garbled output for both the sender number and the message body, when reading MPE backups from SE: 2021-06-05-193425_1366x768_scrot

There SMSC data usually occupy 8 bytes.

This article may assist you in improving the decoder: https://www.gsmfavorites.com/documents/sms/pdutext/

Here's also a sample string: 07918350000014F0400ED0D637396C7EBBCB000802601190106321840500038803030020043F0430043A0435044204300020043F043E043F043E0432043D04560442044C00200440043004450443043D043E043A00200432045604340020003100300030002004330440043804320435043D044C0020044204300020043D043004310435044004560442044C0020002A003100300031002A0034003400340023, which should be decoded to пакета поповніть рахунок від 100 гривень та наберіть *101*444#.

DarkHobbit commented 3 years ago

Fixed for MPB's PDU data. In NBF files I didn't find some something like a counter. For Nokia messages program still using offset 0xB0.

bodqhrohro commented 3 years ago

Works, thanks!