@@ -99,6 +99,10 @@ public static Dictionary<string, string> Scan(string path, IProgress<Progress> p
99
99
if ( ProtectDVDVideo ( path , files ) )
100
100
protections [ path ] = "Protect DVD-Video" ;
101
101
102
+ // PSX Anti-modchip
103
+ if ( PSXAntiModchip ( path , files ) )
104
+ protections [ path ] = "PlayStation Anti-modchip" ;
105
+
102
106
// Zzxzz
103
107
if ( Directory . Exists ( Path . Combine ( path , "Zzxzz" ) ) )
104
108
protections [ path ] = "Zzxzz" ;
@@ -691,6 +695,31 @@ private static bool ProtectDVDVideo(string path, string[] files)
691
695
return false ;
692
696
}
693
697
698
+ private static bool PSXAntiModchip ( string path , string [ ] files )
699
+ {
700
+ if ( files . Where ( s => s . ToLower ( ) . EndsWith ( ".cnf" ) ) . Count ( ) > 0 )
701
+ {
702
+ foreach ( string file in files )
703
+ {
704
+ try
705
+ {
706
+ // Load the current file and check for specialty strings first
707
+ StreamReader sr = new StreamReader ( file , Encoding . Default ) ;
708
+ string FileContent = sr . ReadToEnd ( ) ;
709
+ sr . Close ( ) ;
710
+
711
+ if ( FileContent . Contains ( " SOFTWARE TERMINATED\n CONSOLE MAY HAVE BEEN MODIFIED\n CALL 1-888-780-7690" )
712
+ || FileContent . Contains ( "強制終了しました。\n 本体が改造されている\n おそれがあります。" ) )
713
+ return true ;
714
+
715
+ }
716
+ catch { }
717
+ }
718
+ }
719
+
720
+ return false ;
721
+ }
722
+
694
723
#endregion
695
724
696
725
#region Version detections
@@ -1157,9 +1186,6 @@ private static CaseInsensitiveDictionary<string> CreateFilenameProtectionMapping
1157
1186
// Origin
1158
1187
mapping . Add ( "OriginSetup.exe" , "Origin" ) ;
1159
1188
1160
- // PSX LibCrypt - TODO: That's... not accurate
1161
- mapping . Add ( ".cnf" , "PSX LibCrypt" ) ;
1162
-
1163
1189
// SafeCast
1164
1190
mapping . Add ( "cdac11ba.exe" , "SafeCast" ) ;
1165
1191
0 commit comments