update SWFChecker.py

This commit is contained in:
idkwh 2025-04-28 17:21:22 +02:00
parent 440f6c633d
commit a5bfbdb521

View File

@ -1,15 +1,16 @@
import os
import zlib
from sys import platform, version
from sys import version, exit
import platform
platf = platform
if platf == "linux" or "linux2" or "darwin":
platf = platform.system()
if platf == "Windows":
os.system("title SWF Checker v2.3")
os.system("clear")
else:
os.system("clear")
elif platf == "win32":
os.system("title SWF Checker v2.1")
os.system("cls")
print(f"SWF Version Checker v2.1\nPython {version}")
print(f"SWF Version Checker v2.3\nPython {version}")
try:
swf = input("SWF Filename: ").strip()
@ -57,13 +58,10 @@ def CheckSWF(swf):
if doact_idx != -1 and not result_isas3:
result_isas3 = False
if flashver < 9:
if result_isas3:
isas3 = True
else:
isas3 = False
if flashver >= 9:
isas3 = result_isas3 # AS3 support is based on external result
else:
isas3 = result_isas3
isas3 = False # AS3 does not exist before Flash Player 9
asver = "ActionScript 3.0 (incompatible)" if isas3 else "ActionScript 1.0/2.0 (compatible)"
return flashver, asver, obj
@ -109,3 +107,10 @@ if flashver is not None:
print("WARNING: The given SWF might overlap/clip on the Wii.")
else:
print("The SWF should NOT overlap and/or clip on the Wii.")
if platf == "Windows":
os.system("pause")
exit()
else:
os.system("/bin/bash -c 'read -s -n 1 -p \"Press any key to exit.\"'")
exit()