forked from bombcrack/bombcrack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (30 loc) · 1.14 KB
/
Makefile
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
PWD = $(shell pwd)
workdir = $(PWD)/.work
tbombdir = $(PWD)/TBomb
crackdir = $(PWD)/Crack
deobfdir = $(PWD)/Deobfuscate
getbomb:
if [ ! -d "$(tbombdir)" ]; then \
git clone git://github.com/darkestentropy/tbomb.git "$(tbombdir)" -b historical; \
fi
clean:
rm -rf "$(workdir)"
rm -rf "$(tbombdir)"
mkenv: getbomb
mkdir -p "$(workdir)"
cp "$(tbombdir)/bomber.py" "$(workdir)/bomber.py.source"
crack: mkenv
@if ! echo $(shell python --version) | grep '.*\s3.*' -q; then \
echo -e "\n\n!!! Python v3 is required. Install Python 3, then run the make command again."; \
exit 1; \
fi
python "$(crackdir)/decompress_lzma.py" $(workdir)
python "$(crackdir)/debytize.py" $(workdir)
python "$(crackdir)/attach_cracker.py" $(workdir) $(crackdir)
python "$(workdir)/bomber.py.cracker_attached" > "$(workdir)/bomber.py.cracked"
cp "$(workdir)/bomber.py.cracked" "$(workdir)/bomber.py.source"
python "$(crackdir)/decompress_zlib.py" $(workdir)
mv "$(workdir)/bomber.py.decompressed" "$(workdir)/bomber.py.cracked"
mv "$(workdir)/bomber.py.cracked" "$(PWD)/bomber.py.cracked"
prettify: crack
autopep8 --in-place -aaa "$(PWD)/bomber.py.cracked"