Fix P25p1 -f1 Unmute on RC4 Key; Misc;

This commit is contained in:
lwvmobile
2023-06-11 19:43:49 -04:00
parent 330ebe2bf3
commit 846b202192
4 changed files with 18 additions and 10 deletions

View File

@@ -51,7 +51,7 @@ char * FM_banner[9] = {
" ██╔══██╗██╔════╝██╔══██╗ ███║ ╚════██║",
" ██║ ██║╚█████╗ ██║ ██║ Lima ███║ ███╔═╝",
" ██║ ██║ ╚═══██╗██║ ██║ Zulu ███║ ██╔══╝ ",
" ██████╔╝██████╔╝██████╔╝ Edition IV ████████╗███████╗",
" ██████╔╝██████╔╝██████╔╝ Edition V ████████╗███████╗",
" ╚═════╝ ╚═════╝ ╚═════╝ ╚═══════╝╚══════╝",
" "
};
@@ -1141,7 +1141,7 @@ usage ()
printf ("\n");
printf (" -R <dec> Manually Enter dPMR or NXDN EHR Scrambler Key Value (Decimal Value)\n");
printf (" \n");
printf (" -1 Manually Enter RC4 Key Value (DMR, P25) (Hex Value) \n");
printf (" -1 <hex> Manually Enter RC4 Key Value (DMR, P25) (Hex Value) \n");
printf (" \n");
printf (" -k <file> Import Key List from csv file (Decimal Format) -- Lower Case 'k'.\n");
printf (" Only supports NXDN, DMR Basic Privacy (decimal value). \n");
@@ -1152,7 +1152,7 @@ usage ()
printf (" \n");
printf (" -4 Force Privacy Key over Encryption Identifiers (DMR BP and NXDN Scrambler) \n");
printf (" \n");
printf (" -6 Force RC4 Key over Missing PI header/LE Encryption Identifiers (DMR) \n");
printf (" -0 Force RC4 Key over Missing PI header/LE Encryption Identifiers (DMR) \n");
printf ("\n");
printf (" Trunking Options:\n");
printf (" -C <file> Import Channel to Frequency Map (channum, freq) from csv file. (Capital C) \n");
@@ -1365,7 +1365,7 @@ main (int argc, char **argv)
}
#ifdef AERO_BUILD
fprintf (stderr, "Build Version: v2.1 Win32 \n");
fprintf (stderr, "Build Version: v2.1 Beta \n");
#else
fprintf (stderr, "Build Version: %s \n", GIT_TAG);
#endif

View File

@@ -2158,7 +2158,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
if (opts->ncurses_compact == 1)
{
printw ("------------------------------------------------------------------------------\n");
printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "v2.1 Win32");
printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "v2.1 Beta");
printw ("------------------------------------------------------------------------------\n");
}
#elif LIMAZULUTWEAKS
@@ -2194,7 +2194,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
if (i == 4) printw (" MBElib %s", versionstr);
#ifdef AERO_BUILD
if (i == 5) printw (" %s ", "Aero Build");
if (i == 6) printw (" v2.1 Win32 \n");
if (i == 6) printw (" v2.1 Beta \n");
#elif ZDEV_BUILD
if (i == 5) printw (" %s ", "zDEV Build");
if (i == 6) printw (" %s \n", GIT_TAG);

View File

@@ -472,12 +472,16 @@ processHDU(dsd_opts* opts, dsd_state* state)
fprintf (stderr, " HDU ALG ID: 0x%02X KEY ID: 0x%04X MI: 0x%08llX%08llX%02llX", algidhex, kidhex, mihex1, mihex2, mihex3);
state->payload_algid = algidhex;
state->payload_keyid = kidhex;
if (state->R != 0 && state->payload_algid == 0xAA) fprintf (stderr, " Key: %010llX", state->R);
if (state->R != 0 && state->payload_algid == 0xAA)
{
fprintf (stderr, " Key: %010llX", state->R);
opts->unmute_encrypted_p25 = 1;
}
fprintf (stderr, "%s", KNRM);
//only use 64 MSB, trailing 8 bits aren't used, so no mihex3
state->payload_miP = (mihex1 << 32) | (mihex2);
if (state->payload_algid != 0x80 && state->payload_algid != 0x0) //print on payload == 1
if (state->payload_algid != 0x80 && state->payload_algid != 0x0)
{
fprintf (stderr, "%s", KRED);
fprintf (stderr, " ENC");

View File

@@ -374,12 +374,16 @@ processLDU2 (dsd_opts * opts, dsd_state * state)
fprintf (stderr, " LDU2 ALG ID: 0x%02X KEY ID: 0x%04X MI: 0x%08llX%08llX%02llX", algidhex, kidhex, mihex1, mihex2, mihex3);
state->payload_algid = algidhex;
state->payload_keyid = kidhex;
if (state->R != 0 && state->payload_algid == 0xAA) fprintf (stderr, " Key: %010llX", state->R);
if (state->R != 0 && state->payload_algid == 0xAA)
{
fprintf (stderr, " Key: %010llX", state->R);
opts->unmute_encrypted_p25 = 1;
}
fprintf (stderr, "%s", KNRM);
//only use 64 MSB, trailing 8 bits aren't used, so no mihex3
state->payload_miP = (mihex1 << 32) | (mihex2);
if (state->payload_algid != 0x80 && state->payload_algid != 0x0) //print on payload == 1
if (state->payload_algid != 0x80 && state->payload_algid != 0x0)
{
fprintf (stderr, "%s", KRED);
fprintf (stderr, " ENC");