Skip to content

Commit

Permalink
Update Some Code
Browse files Browse the repository at this point in the history
Signed-off-by: ColdWindScholar <[email protected]>
  • Loading branch information
ColdWindScholar committed Apr 10, 2024
1 parent 80a6505 commit 624ccb2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,17 @@ def is_super(fil) -> any:
buf += bytearray(file_.read(4))
return buf[1:] == b'\x67\x44\x6c\x61'

def is_super2(fil) -> any:
with open(fil, 'rb') as file_:
try:
file_.seek(4096, 0)
except:
return False
buf = bytearray(file_.read(4))
return buf == b'\x67\x44\x6c\x61'

try:
if is_super(file):
if is_super(file) or is_super2(file):
return 'super'
except IndexError:
...
Expand Down

0 comments on commit 624ccb2

Please sign in to comment.