• If posting about a radio issue: Include the HOST, DSP and UCM/secure firmware versions, flashcode and CPS version you're using along with the operating system info. This is critical information.

Extract data from Codeplug ---

Status

phonebuff

Prolific Contributor
CS Forums $upporter
Joined
Nov 10, 2013
Messages
678
I am attempting to decompile the code plug and extract some data from it -- Specifically Contact Lists -- I have no need to recompile at this time !

I am looking at using powershell and it's dot net tools. I can read the base XML code plug, but when I try and extract the base64 string I get garbage --

I know I must be missing a step but I am not sure which one from reading the various dated posts in this forum. Any pointers ? An I on the wrong track ?

========================================================================================

PS C:\Users\CPS> [xml]$plug= Get-Content "C:\Users\cps\Desktop\SL-7550D.ctb"

PS C:\Users\CPS> $plug
ARCHIVE
-------
ARCHIVE

PS C:\Users\CPS> $plug.archive
TYPE RADIO
---- -----
MALTA RADIO

PS C:\Users\CPS> $plug.archive.radio
VERSION ENCODING #text
------- -------- -----
1 Base64 l/Dc8hqWyM0e8o3qPJROl54QjxLFVFK2Y01p...

PS C:\Users\CPS> $data = [System.Text.Encoding]::ascii.GetString([System.Convert]::FromBase64String($plug.archive.radio.'#text'))

Results in a random character stream … and it does crash powershell if I try to display $data --

-------------------------------------------------------------------------------------------------------------------------------------------------
 
OP
phonebuff

phonebuff

Prolific Contributor
CS Forums $upporter
Joined
Nov 10, 2013
Messages
678
I am guessing I didn't the way you are asking the question.

I opened the CTP through the get-content into the xml variable and I can see the basic attributes, but I don't seem to be able to decode the base64 string from the radio variable which I though was the next step -- Is there an intermediate step I need to pass the data through before I try and decode it with the FromBase64String() function ? I have tried both UTF8 and ASCII as the target output.

-------
 

techman

Prolific Contributor
CS Forums $upporter
Joined
Jan 9, 2013
Messages
268
There was a project/code on github some time ago which gave you 90% of the details needed to deconstruct the file but it has been taken down for some reason........
 
OP
phonebuff

phonebuff

Prolific Contributor
CS Forums $upporter
Joined
Nov 10, 2013
Messages
678
Yes, that's my issue, hoping someone has the data and can re post it or PM it to me --

====
 

Magnus

Prolific Contributor
CS Forums $upporter
Joined
Dec 12, 2011
Messages
1,238
You need to get something like .net reflector and start going through the mototrbo cps and dll's. I don't remember all the specifics but I do know the data in the .ctb is encrypted. I also know cps has all the information to decrypt them.
 
Status