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
4ddad90a
Commit
4ddad90a
authored
Nov 21, 2013
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated easy_install
parent
f662d442
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
5 deletions
+18
-5
compressd.py
src/binwalk/plugins/compressd.py
+1
-0
deflate.py
src/binwalk/plugins/deflate.py
+2
-0
zlib.py
src/binwalk/plugins/zlib.py
+1
-0
easy_install.sh
src/easy_install.sh
+14
-5
No files found.
src/binwalk/plugins/compressd.py
View file @
4ddad90a
...
...
@@ -18,6 +18,7 @@ class Plugin:
if
binwalk
.
scan_type
==
binwalk
.
BINWALK
:
self
.
comp
=
ctypes
.
cdll
.
LoadLibrary
(
ctypes
.
util
.
find_library
(
"compress42"
))
if
self
.
comp
:
binwalk
.
magic_files
.
append
(
binwalk
.
config
.
find_magic_file
(
'compressd'
))
def
__del__
(
self
):
...
...
src/binwalk/plugins/deflate.py
View file @
4ddad90a
...
...
@@ -22,11 +22,13 @@ class Plugin:
# The tinfl library is built and installed with binwalk
self
.
tinfl
=
ctypes
.
cdll
.
LoadLibrary
(
ctypes
.
util
.
find_library
(
"tinfl"
))
if
self
.
tinfl
:
# Add an extraction rule
if
self
.
binwalk
.
extractor
.
enabled
:
self
.
binwalk
.
extractor
.
add_rule
(
regex
=
'^
%
s'
%
self
.
DESCRIPTION
.
lower
(),
extension
=
"deflate"
,
cmd
=
self
.
_extractor
)
def
pre_scan
(
self
,
fp
):
if
self
.
tinfl
:
# Make sure we'll be getting enough data for a good decompression test
if
fp
.
MAX_TRAILING_SIZE
<
self
.
SIZE
:
fp
.
MAX_TRAILING_SIZE
=
self
.
SIZE
...
...
src/binwalk/plugins/zlib.py
View file @
4ddad90a
...
...
@@ -18,6 +18,7 @@ class Plugin:
if
binwalk
.
scan_type
==
binwalk
.
BINWALK
:
# Load libtinfl.so
self
.
tinfl
=
ctypes
.
cdll
.
LoadLibrary
(
ctypes
.
util
.
find_library
(
'tinfl'
))
if
self
.
tinfl
:
# Add the zlib file to the list of magic files
binwalk
.
magic_files
.
append
(
binwalk
.
config
.
find_magic_file
(
'zlib'
))
...
...
src/easy_install.sh
View file @
4ddad90a
...
...
@@ -4,7 +4,7 @@
function
libmagic
{
SITE
=
"ftp://ftp.astron.com/pub/file/"
VERSION
=
"5.1
4
"
VERSION
=
"5.1
1
"
OUTFILE
=
"file-
$VERSION
.tar.gz"
URL
=
"
$SITE$OUTFILE
"
...
...
@@ -52,7 +52,16 @@ function redhat
function
darwin
{
sudo
port install git-core arj p7zip py-matplotlib
if
[
"
$(
which easy_install
)
"
==
""
]
then
curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | python
fi
if
[
"
$(
which easy_install
)
"
!=
""
]
then
easy_install
-m
numpy
easy_install
-m
matplotlib
fi
}
if
[
"
$1
"
==
""
]
||
[
"
$1
"
==
"--sumount"
]
...
...
@@ -107,16 +116,16 @@ case $DISTRO in
echo
""
echo
"This system is not recognized by easy install! You may need to install dependent packages manually."
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, RedHat
,
or OSX, you can try manually specifying your system type on the command line:"
echo
""
echo
-e
"
\t
$0
[debian | redhat | darwin] [--sumount]"
echo
""
exit
1
esac
if
[
"
$(
python
-c
'import magic;
magic.MAGIC_NO_CHECK_TEXT'
2>/dev/null
)
"
!=
0
]
if
[
"
$(
python
-c
'import magic;
print (magic.MAGIC_NO_CHECK_TEXT)'
2>/dev/null
)
"
==
""
]
then
echo
"python-magic not installed or wrong version."
echo
"python-magic not installed
,
or wrong version."
libmagic
fi
...
...
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