Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
binwalk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
binwalk
Commits
fcf8a435
Commit
fcf8a435
authored
Nov 29, 2013
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated setup.py and easy_install.sh to reflect new dependencies
parent
74c38e96
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
48 deletions
+46
-48
easy_install.sh
src/easy_install.sh
+44
-43
setup.py
src/setup.py
+2
-5
No files found.
src/easy_install.sh
View file @
fcf8a435
...
@@ -12,14 +12,7 @@ function libmagic
...
@@ -12,14 +12,7 @@ function libmagic
URL
=
"
$SITE$OUTFILE
"
URL
=
"
$SITE$OUTFILE
"
echo
"Downloading '
$URL
'..."
echo
"Downloading '
$URL
'..."
if
[
"
$(
which wget
)
"
!=
""
]
then
wget
"
$URL
"
wget
"
$URL
"
elif
[
"
$(
which curl
)
"
!=
""
]
then
curl
"
$URL
"
>
"
$OUTFILE
"
fi
if
[
-e
"
$OUTFILE
"
]
if
[
-e
"
$OUTFILE
"
]
then
then
...
@@ -33,6 +26,28 @@ function libmagic
...
@@ -33,6 +26,28 @@ function libmagic
fi
fi
}
}
function
pyqtgraph
{
SITE
=
"http://www.pyqtgraph.org/downloads/"
VERSION
=
"0.9.8"
OUTFILE
=
"pyqtgraph-
$VERSION
.tar.gz"
URL
=
"
$SITE$OUTFILE
"
echo
"Downloading '
$URL
'..."
wget
"
$URL
"
if
[
-e
"
$OUTFILE
"
]
then
echo
"Installing pyqtgraph..."
tar
-zxvf
"
$OUTFILE
"
cd
"pyqtgraph-
$VERSION
"
&&
$SUDO
python ./setup.py install
&&
cd
..
$SUDO
rm
-rf
"pyqtgraph-
$VERSION
"
else
echo
"ERROR: Failed to download '
$URL
'!"
echo
"pyqtgraph not installed."
fi
}
function
debian
function
debian
{
{
# The appropriate unrar package goes under different names in Debian vs Ubuntu
# The appropriate unrar package goes under different names in Debian vs Ubuntu
...
@@ -44,27 +59,15 @@ function debian
...
@@ -44,27 +59,15 @@ function debian
fi
fi
# Install binwalk/fmk pre-requisites and extraction tools
# Install binwalk/fmk pre-requisites and extraction tools
$SUDO
apt-get
-y
install git build-essential mtd-utils zlib1g-dev liblzma-dev ncompress gzip bzip2
tar
arj p7zip p7zip-full openjdk-6-jdk python-matplotlib
$SUDO
apt-get
-y
install git build-essential mtd-utils zlib1g-dev liblzma-dev ncompress gzip bzip2
tar
arj p7zip p7zip-full openjdk-6-jdk
$SUDO
apt-get
-y
install python-qt4 python-qt4-gl python-numpy python-scipy
}
}
function
redhat
function
redhat
{
{
$SUDO
yum groupinstall
-y
"Development Tools"
$SUDO
yum groupinstall
-y
"Development Tools"
$SUDO
yum install
-y
git mtd-utils unrar zlib1g-dev liblzma-dev xz-devel compress gzip bzip2
tar
arj p7zip p7zip-full openjdk-6-jdk python-matplotlib
$SUDO
yum install
-y
git mtd-utils unrar zlib1g-dev liblzma-dev xz-devel compress gzip bzip2
tar
arj p7zip p7zip-full openjdk-6-jdk
}
$SUDO
yum install
-y
python-qt4 python-qt4-gl python-numpy python-scipy
function
darwin
{
if
[
"
$(
which easy_install
)
"
==
""
]
then
curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py |
$SUDO
python
fi
if
[
"
$(
which easy_install
)
"
!=
""
]
then
easy_install
-m
numpy
easy_install
-m
matplotlib
fi
}
}
if
[
"
$1
"
==
""
]
||
[
"
$1
"
==
"--sumount"
]
if
[
"
$1
"
==
""
]
||
[
"
$1
"
==
"--sumount"
]
...
@@ -111,17 +114,13 @@ case $DISTRO in
...
@@ -111,17 +114,13 @@ case $DISTRO in
centos
)
centos
)
redhat
redhat
;;
;;
darwin
)
darwin
;;
*
)
*
)
echo
""
echo
""
echo
"This system is not recognized by easy install! You may need to install dependent packages manually."
echo
"This system is not recognized by easy install! You may need to install dependent packages manually."
echo
""
echo
""
echo
"If your system is a derivative of Debian
, RedHat, or OSX
, you can try manually specifying your system type on the command line:"
echo
"If your system is a derivative of Debian
or RedHat
, you can try manually specifying your system type on the command line:"
echo
""
echo
""
echo
-e
"
\t
$0
[debian | redhat
| darwin
] [--sumount]"
echo
-e
"
\t
$0
[debian | redhat] [--sumount]"
echo
""
echo
""
exit
1
exit
1
esac
esac
...
@@ -132,19 +131,22 @@ then
...
@@ -132,19 +131,22 @@ then
libmagic
libmagic
fi
fi
# FMK doesn't support OSX.
if
[
"
$(
python
-c
'import pyqtgraph; print (pyqtgraph.__file__)'
2>/dev/null
)
"
==
""
]
if
[
"
$DISTRO
"
!=
"darwin"
]
then
echo
"pyqtgraph not installed."
pyqtgraph
fi
# Get and build the firmware mod kit
$SUDO
rm
-rf
/opt/firmware-mod-kit/
$SUDO
mkdir
-p
/opt/firmware-mod-kit
$SUDO
chmod a+rwx /opt/firmware-mod-kit
git clone https://code.google.com/p/firmware-mod-kit /opt/firmware-mod-kit/
cd
/opt/firmware-mod-kit/src
./configure
&&
$SUDO
make
if
[
"
$1
"
==
"--sumount"
]
||
[
"
$2
"
==
"--sumount"
]
then
then
# Get and build the firmware mod kit
$SUDO
rm
-rf
/opt/firmware-mod-kit/
$SUDO
mkdir
-p
/opt/firmware-mod-kit
$SUDO
chmod a+rwx /opt/firmware-mod-kit
git clone https://code.google.com/p/firmware-mod-kit /opt/firmware-mod-kit/
cd
/opt/firmware-mod-kit/src
./configure
&&
$SUDO
make
if
[
"
$1
"
==
"--sumount"
]
||
[
"
$2
"
==
"--sumount"
]
then
# The following will allow you - and others - to mount/unmount file systems without root permissions.
# The following will allow you - and others - to mount/unmount file systems without root permissions.
# This may be problematic, especially on a multi-user system, so think about it first.
# This may be problematic, especially on a multi-user system, so think about it first.
$SUDO
chown root ./mountcp/mountsu
$SUDO
chown root ./mountcp/mountsu
...
@@ -158,9 +160,8 @@ then
...
@@ -158,9 +160,8 @@ then
$SUDO
chown root ./jffs2/sunjffs2
$SUDO
chown root ./jffs2/sunjffs2
$SUDO
chmod u+s ./jffs2/sunjffs2
$SUDO
chmod u+s ./jffs2/sunjffs2
$SUDO
chmod o-w ./jffs2/sunjffs2
$SUDO
chmod o-w ./jffs2/sunjffs2
fi
cd
-
fi
fi
cd
-
# Install binwalk
# Install binwalk
$SUDO
python setup.py install
$SUDO
python setup.py install
...
...
src/setup.py
View file @
fcf8a435
...
@@ -61,13 +61,10 @@ except Exception as e:
...
@@ -61,13 +61,10 @@ except Exception as e:
warning
(
msg
)
warning
(
msg
)
try
:
try
:
import
matplotlib
import
pyqtgraph
matplotlib
.
use
(
'Agg'
)
import
matplotlib.pyplot
import
numpy
except
Exception
as
e
:
except
Exception
as
e
:
msg
=
[
"Pre-requisite check warning: "
+
str
(
e
),
msg
=
[
"Pre-requisite check warning: "
+
str
(
e
),
"To take advantage of this tool's
entropy plotting capabilities, please install the python-matplotlib
module."
,
"To take advantage of this tool's
graphing capabilities, please install the pyqtgraph
module."
,
]
]
warning
(
msg
,
prompt
=
True
)
warning
(
msg
,
prompt
=
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment