Skip to content

Commit bf6d593

Browse files
committed
add SecuROMDetector
1 parent 02c0ae8 commit bf6d593

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SecuROMDetector is based on IMGIdentifier
2+
3+
def identify_exe(exe_path, exe_check):
4+
try:
5+
with open(exe_path, 'rb') as file:
6+
exe_contents = file.read()
7+
if exe_check.encode() in exe_contents:
8+
return True
9+
except FileNotFoundError:
10+
print(f"File {exe_path} not found.")
11+
return False
12+
13+
# Ask the user for the file path
14+
exe_file = input("Enter the name of the EXE file (with .EXE extension): ")
15+
16+
# Check if the input file has a valid .exe extension
17+
if exe_file.lower().endswith((".exe")):
18+
found_pattern = False
19+
20+
# Check for SecuROM version 4.77.00
21+
if identify_exe(exe_file, "4.77.00"):
22+
print("SecuROM 4.77.00")
23+
found_pattern = True
24+
25+
# Check for .cms_t pattern
26+
if identify_exe(exe_file, ".cms_t"):
27+
print("SecuROM code found inside the executable (.cms_t)")
28+
found_pattern = True
29+
30+
# Check for .cms_d pattern
31+
if identify_exe(exe_file, ".cms_d"):
32+
print("SecuROM data found inside the executable (.cms_d)")
33+
found_pattern = True
34+
35+
# If no recognized pattern was found
36+
if not found_pattern:
37+
print("Maybe this EXE uses a different version of SecuROM, "
38+
"Please contact BJNFNE on Discord")
39+
else:
40+
print("Invalid EXE file extension. Please add the .exe extension as well.")
41+
42+
input("Press enter to close SecuROMDetector")

0 commit comments

Comments
 (0)