1
1
#! /bin/bash
2
2
3
+ echo
4
+ echo " Welcome to the pyPhotoDNA installer."
5
+ echo " The script will now setup a pyPhotoDNA environment for you. Please be patient."
6
+ echo
7
+
3
8
if [ " $( uname) " == " Darwin" ]; then
4
- echo
5
- echo " Welcome to the pyPhotoDNA installer."
6
- echo " The script will now setup a pyPhotoDNA environment for you. Please be patient."
7
-
8
- echo
9
- echo " Downloading Inspector (4.4 GB, might take a while)..."
10
- curl -LO https://archive.org/download/cellebrite-inspector-10.3-mac/Cellebrite_Inspector_10.3_Mac.pkg
11
-
12
- echo
13
- echo " Extracting PhotoDNAx64.so."
14
- pkgutil --expand-full Cellebrite_Inspector_10.3_Mac.pkg Inspector
15
- rm Cellebrite_Inspector_10.3_Mac.pkg
16
- mv " Inspector/Inspector.pkg/Payload/Applications/Inspector/Inspector 10.3/Inspector.app/Contents/Helpers/Mac/PhotoDNAx64-osx.so.1.72" PhotoDNAx64.so
17
- rm -rf Inspector
18
-
19
- echo
20
- echo
21
- echo " Installation complete!"
22
- echo " _____________________________"
23
- echo
24
- echo " To generate a PhotoDNA hash, run generateHashes.py."
9
+ echo " Downloading Inspector (4.4 GB, might take a while)..."
10
+ curl -LO https://archive.org/download/cellebrite-inspector-10.3-mac/Cellebrite_Inspector_10.3_Mac.pkg
11
+
12
+ echo
13
+ echo " Extracting PhotoDNAx64.so."
14
+ pkgutil --expand-full Cellebrite_Inspector_10.3_Mac.pkg Inspector
15
+ rm Cellebrite_Inspector_10.3_Mac.pkg
16
+ mv " Inspector/Inspector.pkg/Payload/Applications/Inspector/Inspector 10.3/Inspector.app/Contents/Helpers/Mac/PhotoDNAx64-osx.so.1.72" PhotoDNAx64.so
17
+ rm -rf Inspector
18
+
19
+ echo
20
+ echo
21
+ echo " Installation complete!"
22
+ echo " _____________________________"
23
+ echo
24
+ echo " To generate a PhotoDNA hash, run: python3 generateHashes.py"
25
25
else
26
- echo " pyPhotoDNA does not support Linux. Please run install.sh on a Mac."
27
- fi
26
+ if ! [ -x " $( command -v curl) " ]; then
27
+ echo " Dependency missing. Please install 'curl' and re-run the installer."
28
+ exit 1
29
+ fi
30
+ if ! [ -x " $( command -v wine64) " ]; then
31
+ echo " Dependency missing. Please install 'wine64' and re-run the installer."
32
+ exit 1
33
+ fi
34
+ if ! [ -x " $( command -v cabextract) " ]; then
35
+ echo " Dependency missing. Please install 'cabextract' and re-run the installer."
36
+ exit 1
37
+ fi
38
+ if ! [ -x " $( command -v isoinfo) " ]; then
39
+ echo " Dependency missing. Please install 'genisoimage' and re-run the installer."
40
+ exit 1
41
+ fi
42
+
43
+ echo " Downloading FTK (3.4GB, might take a while)..."
44
+ curl -LO http://ad-iso.s3.amazonaws.com/AD_FTK_6.3.0.iso
45
+
46
+ echo
47
+ echo " Extracting PhotoDNAx64.dll."
48
+ isoinfo -i AD_FTK_6.3.0.iso -x /FTK/FTK/X64/_8A89F09/DATA1.CAB > Data1.cab
49
+ rm AD_FTK_6.3.0.iso
50
+ cabextract -d tmp -q Data1.cab
51
+ rm Data1.cab
52
+ mv tmp/photodnax64.1.72.dll PhotoDNAx64.dll
53
+ rm -rf tmp
54
+
55
+ echo
56
+ echo " Downloading minimal Python for Wine..."
57
+ curl -LO https://github.com/jankais3r/pyPhotoDNA/releases/download/wine_python_39/wine_python_39.tar.gz
58
+ tar -xf wine_python_39.tar.gz
59
+ rm wine_python_39.tar.gz
60
+
61
+ echo
62
+ echo
63
+ echo " Installation complete!"
64
+ echo " _____________________________"
65
+ echo
66
+ echo " To generate a PhotoDNA hash, run: WINEDEBUG=-all wine64 python-3.9.12-embed-amd64/python.exe generateHashes.py"
67
+ fi
0 commit comments