@@ -966,7 +966,7 @@ public static bool ParseGetKeyLog(string? logPath, out byte[]? key, out byte[]?
966966 #region Xbox and Xbox 360
967967
968968 /// <summary>
969- /// Get the XGD1 Master ID (XMID) information
969+ /// Get the XGD1 Manufacturing ID (XMID) information
970970 /// </summary>
971971 /// <param name="dmi">DMI.bin file location</param>
972972 /// <returns>String representation of the XGD1 DMI information, empty string on error</returns>
@@ -1248,10 +1248,8 @@ public static bool IsFixedSS(byte[] ss)
12481248 return false ;
12491249 }
12501250
1251- // Check challenge responses
1252- FixSS ( ss , false ) ;
1253-
1254- return true ;
1251+ // Check challenge responses (don't write)
1252+ return FixSS ( ss , false ) ;
12551253 }
12561254
12571255 /// <summary>
@@ -1365,27 +1363,17 @@ public static bool FixSS(byte[] ss, bool write = true)
13651363 ss [ 102 ] = 15 ; // 0x0F
13661364 ss [ 103 ] = 1 ; // 0x01
13671365 }
1368- else if ( write )
1369- {
1370- ss [ 552 ] = 1 ; // 0x01
1371- ss [ 553 ] = 0 ; // 0x00
1372-
1373- ss [ 561 ] = 91 ; // 0x5B
1374- ss [ 562 ] = 0 ; // 0x00
1375-
1376- ss [ 570 ] = 181 ; // 0xB5
1377- ss [ 571 ] = 0 ; // 0x00
1378-
1379- ss [ 579 ] = 15 ; // 0x0F
1380- ss [ 580 ] = 1 ; // 0x01
1381- }
13821366 break ;
13831367
13841368 default :
13851369 // Unknown XGD type
13861370 return false ;
13871371 }
13881372
1373+ // Must be 21 challenge entries
1374+ if ( ss [ 0x660 ] != 21 )
1375+ return false ;
1376+
13891377 // Determine challenge table offset
13901378 int ccrt_offset = 0 ;
13911379 if ( xgdType == 2 )
@@ -1417,6 +1405,7 @@ public static bool FixSS(byte[] ss, bool write = true)
14171405 dcrt [ i + j ] ^= iv [ j ] ;
14181406 iv [ j ] = ss [ 0x304 + i + j ] ;
14191407 }
1408+
14201409 // Validate challenge type 1
14211410 if ( dcrt [ i ] == 1 )
14221411 {
@@ -1435,7 +1424,6 @@ public static bool FixSS(byte[] ss, bool write = true)
14351424 }
14361425 Array . Copy ( ss , 0x304 + 240 , dcrt , 240 , 12 ) ;
14371426
1438- // Check for empty challenge responses
14391427 int [ ] entryOffsets = [ 0 , 9 , 18 , 27 , 36 , 45 , 54 , 63 ] ;
14401428 int [ ] entryLengths = [ 8 , 8 , 8 , 8 , 4 , 4 , 4 , 4 ] ;
14411429 for ( int i = 0 ; i < entryOffsets . Length ; i ++ )
0 commit comments