DecentralizedAmateurPagingNetwork / Core

The DAPNET Core is the core application of DAPNET, responsible for handling transmitter clients, clustering, and providing the REST API.
https://www.afu.rwth-aachen.de/projekte/funkruf-pager-pocsag/funkrufmaster-2-0-dapnet
42 stars 11 forks source link

Possible solution for Skyper activations after Nov 2022 #166

Closed philpem closed 3 years ago

philpem commented 6 years ago

I understand from https://hampager.de/dokuwiki/doku.php?id=rubricactivationskyper that the Skyper activation code expires in November 2022, and there is currently no solution. I wish to offer a possible solution.

The "activation" was previously generated in Funkrufmaster by a library called "spezlib", which was replaced with an "activation string" in later versions.

Activations are sent to the pager's own RIC (capcode), using function code 2 and alphanumeric coding.

First take the RIC and divide it by eight (take the lowest three bits). This will be a number between 0 and 7. Add two to the remainder. We will call this the "substitution key".

For November 2011 expiry, we start with this string:

0 311211

Add the substitution key to every character in turn. If the remainder is zero (substitution key of 2), this should leave you with:

2"533433

Send this to your pager and you're activated until... oh. November 2011 was about seven years ago. This is a problem... We need to make new activation strings.

Thankfully there's a pattern to them.

(Known) Nov 2011: 0 311211
(Known) Nov 2022: 0 311222
(Infer) Nov 2023: 0 311223

The "AKTIVIERUNGSCODE" (what TransmitSettings.java calls "activationCode") has this format:

Blocks are separated with a comma
Each block contains three numbers separated with a space:
  shift   mask    base

Output code = ((RIC >> shift) & mask) + base

The "base" number already includes the offset of 2.

And thus, you can activate any Skyper for any date you choose.

I don't have a Skyper to try this on (I've been looking for one suitably modified but they're quite rare in the UK). If anyone can give or lend me one, I'd be happy to submit a patch!

Phil M0OFX

xfxian commented 6 years ago

Interesting, maybe the scheme actually is something like: "0 3mm2yy"?

Did a very quick JS function to calculate it this way:

/**
 * Calculates a Skyper activation key
 *
 * @param ric Skyper RIC as string
 * @param year Expiration year as number
 * @returns the Skyper activation key as string
 */
function calculateSkyperKey(ric, month, year) {
  // Calculate start string based on known constant string and
  // given month and year
  const startString = '0 ' + ((300200 + (month * 1000)) + (year - 2000)).toString();

  // Calculate substitution key from RIC
  const substitutionKey = (ric % 8) + 2;

  // Add substitution key to every ASCII char from the start string
  key = startString.split('').map((char) => {
    return String.fromCharCode(char.charCodeAt(0) + substitutionKey);
  }).join('');

  return key;
}

You can try it out here: https://jsfiddle.net/kv9pw/904/

I have a Skyper myself and will try in the next days when I have the transmitter running.

klaussoft commented 6 years ago

It works a little bit. I tried to change every digit. The results are: 1: no processing 2: processed, but no result 3: no processing 4: processed, but no result 5: no processing 6: no processing 7: processed, but no result 8: processed, year changed

The year can be up to 2026. In this result the latest possible activation date is 1126