-
Notifications
You must be signed in to change notification settings - Fork 0
/
finding_stuff.py
65 lines (50 loc) · 1.8 KB
/
finding_stuff.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import os
files = os.listdir('RUSTY')
for file in files:
with open(os.path.join('RUSTY', file), 'rb') as f:
## looking for "ko-no-(hen)" SJIS
# (it's in VISUAL.COM)
#if f.read().find('\x82\xb1\x82\xcc\x95\xd3') != -1:
# print file
## looking for "kon kanga" SJIS
# (probably compressed)
#if f.read().find('\x8d\xa1\x82\xf0') != -1:
# print file
# looking for 'rugoto' SJIS
# (probably compressed)
#if f.read().find('\x82\xe9\x82\xb1\x82\xc6') != -1:
# print file
# looking for "nan kanga" SJIS
# 89 bd 82 f0
## looking for "ge--" SJIS (start menu options)
# (it's in JO.EXE, uncompressed)
#if f.read().find('\x83\x51\x81\x7c') != -1:
# print file
# looking for that file at 18b8 in memory while VISUAL.COM is running
# (it's JO.EXE)
#if f.read().find('\x60\x1e\x06\xbe\x80\x00\x46\x46\xe8\xf3') != -1:
# print file
# look for the code "mov al, [si]"
# (it's JO.EXE)
#if f.read().find('\x8a\x04\x0a\xc0\x74\x7a\x3c\x0d\x74\x36\x3c') != -1:
# print file
# looking for the file that gets loaded at 8312:47e0 (it's MAGLOAD.COM)
#if f.read().find('\x50\x53\x51\x52\x2e\xa2') != -1:
# print file
# looking for the file loaded at 8312:47e0 before VISUAL.COM (it's GRPEGC.COM)
#if f.read().find('\x06\xd6\x00\xd5\x07\xa5') != -1:
# print file
if f.read().find('\x83\xc1\x04') != -1:
print file
# TODO: Surely this isn't the right way to do this. Pretty shameful
# looking for all files that begin with the header 'LZ[1a]' (4c5a1a)
# (it's a lot of them)
#if f.read(3) == b'\x4c\x5a\x1a':
# lzss_files.append(file)
#this_dir_files = os.listdir(os.path.curdir)
#this_dir_files.remove('.git')
#for file in this_dir_files:
# if file.startswith('decompressed_'):
# with open(file, 'rb') as f:
# if f.read().find('\x83\x51\x81\x7c') != -1:
# print file