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
9eb51e30
Commit
9eb51e30
authored
Nov 21, 2013
by
heffnercj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed python2.6 file open bugs; fixed OSX library file extension bug.
parent
d087d583
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
22 additions
and
9 deletions
+22
-9
Makefile.in
src/C/Makefile.in
+1
-0
Makefile
src/C/compress/Makefile
+1
-1
configure
src/C/configure
+5
-0
configure.ac
src/C/configure.ac
+3
-0
Makefile
src/C/miniz/Makefile
+1
-1
armopcodes.py
src/binwalk/plugins/armopcodes.py
+2
-1
compressd.py
src/binwalk/plugins/compressd.py
+2
-1
deflate.py
src/binwalk/plugins/deflate.py
+1
-1
zlib.py
src/binwalk/plugins/zlib.py
+4
-3
prettyprint.py
src/binwalk/prettyprint.py
+2
-1
No files found.
src/C/Makefile.in
View file @
9eb51e30
export
CC
=
@CC@
export
CC
=
@CC@
export
CFLAGS
=
@CFLAGS@
export
CFLAGS
=
@CFLAGS@
export
SONAME
=
@SONAME@
export
SONAME
=
@SONAME@
export
SOEXT
=
@SOEXT@
export
prefix
=
@prefix@
export
prefix
=
@prefix@
export
exec_prefix
=
@exec_prefix@
export
exec_prefix
=
@exec_prefix@
export
LIBDIR
=
@libdir@
export
LIBDIR
=
@libdir@
...
...
src/C/compress/Makefile
View file @
9eb51e30
LIBNAME
=
libcompress42.
so
LIBNAME
=
libcompress42.
$(SOEXT)
all
:
clean $(LIBNAME)
all
:
clean $(LIBNAME)
...
...
src/C/configure
View file @
9eb51e30
...
@@ -600,6 +600,7 @@ ac_includes_default="\
...
@@ -600,6 +600,7 @@ ac_includes_default="\
ac_subst_vars
=
'LTLIBOBJS
ac_subst_vars
=
'LTLIBOBJS
INSTALL_OPTIONS
INSTALL_OPTIONS
SOEXT
SONAME
SONAME
LIBOBJS
LIBOBJS
EGREP
EGREP
...
@@ -3278,14 +3279,18 @@ CFLAGS="-Wall -fPIC $CFLAGS"
...
@@ -3278,14 +3279,18 @@ CFLAGS="-Wall -fPIC $CFLAGS"
if
test
"
$(
uname
)
"
==
"Darwin"
if
test
"
$(
uname
)
"
==
"Darwin"
then
then
SONAME
=
"-install_name"
SONAME
=
"-install_name"
SOEXT
=
"dylib"
INSTALL_OPTIONS
=
"-m644"
INSTALL_OPTIONS
=
"-m644"
else
else
SONAME
=
"-soname"
SONAME
=
"-soname"
SOEXT
=
"so"
INSTALL_OPTIONS
=
"-D -m644"
INSTALL_OPTIONS
=
"-D -m644"
fi
fi
SONAME
=
$SONAME
SONAME
=
$SONAME
SOEXT
=
$SOEXT
INSTALL_OPTIONS
=
$INSTALL_OPTIONS
INSTALL_OPTIONS
=
$INSTALL_OPTIONS
ac_config_files
=
"
$ac_config_files
Makefile"
ac_config_files
=
"
$ac_config_files
Makefile"
...
...
src/C/configure.ac
View file @
9eb51e30
...
@@ -12,13 +12,16 @@ CFLAGS="-Wall -fPIC $CFLAGS"
...
@@ -12,13 +12,16 @@ CFLAGS="-Wall -fPIC $CFLAGS"
if test "$(uname)" == "Darwin"
if test "$(uname)" == "Darwin"
then
then
SONAME="-install_name"
SONAME="-install_name"
SOEXT="dylib"
INSTALL_OPTIONS="-m644"
INSTALL_OPTIONS="-m644"
else
else
SONAME="-soname"
SONAME="-soname"
SOEXT="so"
INSTALL_OPTIONS="-D -m644"
INSTALL_OPTIONS="-D -m644"
fi
fi
AC_SUBST(SONAME, $SONAME)
AC_SUBST(SONAME, $SONAME)
AC_SUBST(SOEXT, $SOEXT)
AC_SUBST(INSTALL_OPTIONS, $INSTALL_OPTIONS)
AC_SUBST(INSTALL_OPTIONS, $INSTALL_OPTIONS)
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
AC_OUTPUT
src/C/miniz/Makefile
View file @
9eb51e30
LIBNAME
=
libtinfl.
so
LIBNAME
=
libtinfl.
$(SOEXT)
all
:
clean $(LIBNAME)
all
:
clean $(LIBNAME)
...
...
src/binwalk/plugins/armopcodes.py
View file @
9eb51e30
from
binwalk.common
import
*
from
binwalk.plugins
import
*
from
binwalk.plugins
import
*
class
Plugin
:
class
Plugin
:
...
@@ -18,7 +19,7 @@ class Plugin:
...
@@ -18,7 +19,7 @@ class Plugin:
def
pre_scan
(
self
,
fd
):
def
pre_scan
(
self
,
fd
):
if
self
.
enabled
:
if
self
.
enabled
:
self
.
fd
=
open
(
fd
.
name
,
'rb
'
)
self
.
fd
=
BlockFile
(
fd
.
name
,
'r
'
)
def
callback
(
self
,
results
):
def
callback
(
self
,
results
):
if
self
.
fd
:
if
self
.
fd
:
...
...
src/binwalk/plugins/compressd.py
View file @
9eb51e30
import
ctypes
import
ctypes
import
ctypes.util
import
ctypes.util
from
binwalk.common
import
*
from
binwalk.plugins
import
*
from
binwalk.plugins
import
*
class
Plugin
:
class
Plugin
:
...
@@ -28,7 +29,7 @@ class Plugin:
...
@@ -28,7 +29,7 @@ class Plugin:
def
pre_scan
(
self
,
fd
):
def
pre_scan
(
self
,
fd
):
try
:
try
:
if
self
.
comp
:
if
self
.
comp
:
self
.
fd
=
open
(
fd
.
name
,
'rb
'
)
self
.
fd
=
BlockFile
(
fd
.
name
,
'r
'
)
except
:
except
:
pass
pass
...
...
src/binwalk/plugins/deflate.py
View file @
9eb51e30
...
@@ -13,7 +13,7 @@ class Plugin:
...
@@ -13,7 +13,7 @@ class Plugin:
ENABLED
=
False
ENABLED
=
False
SIZE
=
33
*
1024
SIZE
=
33
*
1024
# To prevent many false positives, only show data that decompressed to a reasonable size
# To prevent many false positives, only show data that decompressed to a reasonable size
MIN_DECOMP_SIZE
=
16
*
1024
MIN_DECOMP_SIZE
=
32
*
1024
DESCRIPTION
=
"Deflate compressed data stream"
DESCRIPTION
=
"Deflate compressed data stream"
def
__init__
(
self
,
binwalk
):
def
__init__
(
self
,
binwalk
):
...
...
src/binwalk/plugins/zlib.py
View file @
9eb51e30
import
ctypes
import
ctypes
import
ctypes.util
import
ctypes.util
from
binwalk.plugins
import
*
from
binwalk.plugins
import
*
from
binwalk.common
import
BlockFile
class
Plugin
:
class
Plugin
:
'''
'''
...
@@ -15,14 +16,14 @@ class Plugin:
...
@@ -15,14 +16,14 @@ class Plugin:
self
.
tinfl
=
None
self
.
tinfl
=
None
if
binwalk
.
scan_type
==
binwalk
.
BINWALK
:
if
binwalk
.
scan_type
==
binwalk
.
BINWALK
:
# Add the zlib file to the list of magic files
binwalk
.
magic_files
.
append
(
binwalk
.
config
.
find_magic_file
(
'zlib'
))
# Load libtinfl.so
# Load libtinfl.so
self
.
tinfl
=
ctypes
.
cdll
.
LoadLibrary
(
ctypes
.
util
.
find_library
(
'tinfl'
))
self
.
tinfl
=
ctypes
.
cdll
.
LoadLibrary
(
ctypes
.
util
.
find_library
(
'tinfl'
))
# Add the zlib file to the list of magic files
binwalk
.
magic_files
.
append
(
binwalk
.
config
.
find_magic_file
(
'zlib'
))
def
pre_scan
(
self
,
fd
):
def
pre_scan
(
self
,
fd
):
if
self
.
tinfl
:
if
self
.
tinfl
:
self
.
fd
=
open
(
fd
.
name
,
'rb
'
)
self
.
fd
=
BlockFile
(
fd
.
name
,
'r
'
)
def
callback
(
self
,
result
):
def
callback
(
self
,
result
):
...
...
src/binwalk/prettyprint.py
View file @
9eb51e30
...
@@ -4,6 +4,7 @@ import hashlib
...
@@ -4,6 +4,7 @@ import hashlib
import
csv
as
pycsv
import
csv
as
pycsv
from
datetime
import
datetime
from
datetime
import
datetime
from
binwalk.compat
import
*
from
binwalk.compat
import
*
from
binwalk.common
import
BlockFile
class
PrettyPrint
:
class
PrettyPrint
:
'''
'''
...
@@ -133,7 +134,7 @@ class PrettyPrint:
...
@@ -133,7 +134,7 @@ class PrettyPrint:
'''
'''
md5
=
hashlib
.
md5
()
md5
=
hashlib
.
md5
()
with
open
(
file_name
,
'rb
'
)
as
f
:
with
BlockFile
(
file_name
,
'r
'
)
as
f
:
for
chunk
in
iter
(
lambda
:
f
.
read
(
128
*
md5
.
block_size
),
b
''
):
for
chunk
in
iter
(
lambda
:
f
.
read
(
128
*
md5
.
block_size
),
b
''
):
md5
.
update
(
chunk
)
md5
.
update
(
chunk
)
...
...
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