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
ee3cc403
Commit
ee3cc403
authored
Feb 01, 2016
by
Craig Heffner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added openjdk back to deps.sh
parent
da92fa6b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
43 deletions
+1
-43
deps.sh
deps.sh
+1
-1
magic.py
src/binwalk/core/magic.py
+0
-42
No files found.
deps.sh
View file @
ee3cc403
...
...
@@ -4,7 +4,7 @@ set -o nounset
REQUIRED_UTILS
=
"wget tar python"
APTCMD
=
"apt-get"
YUMCMD
=
"yum"
APT_CANDIDATES
=
"git build-essential libqt4-opengl mtd-utils gzip bzip2 tar arj lhasa p7zip p7zip-full cabextract cramfsprogs cramfsswap squashfs-tools zlib1g-dev liblzma-dev liblzo2-dev sleuthkit"
APT_CANDIDATES
=
"git build-essential libqt4-opengl mtd-utils gzip bzip2 tar arj lhasa p7zip p7zip-full cabextract cramfsprogs cramfsswap squashfs-tools zlib1g-dev liblzma-dev liblzo2-dev sleuthkit
openjdk-7-jdk
"
PYTHON2_APT_CANDIDATES
=
"python-lzo python-lzma python-pip python-opengl python-qt4 python-qt4-gl python-numpy python-scipy"
PYTHON3_APT_CANDIDATES
=
"python3-pip python3-opengl python3-pyqt4 python3-pyqt4.qtopengl python3-numpy python3-scipy"
PYTHON3_YUM_CANDIDATES
=
""
...
...
src/binwalk/core/magic.py
View file @
ee3cc403
...
...
@@ -143,12 +143,6 @@ class SignatureLine(object):
self
.
condition
=
'='
self
.
value
=
parts
[
2
]
# If a GUID was specified, convert it to a string and treat the
# signature as a string from here on out.
if
self
.
type
==
'guid'
:
self
.
value
=
self
.
_guid2str
(
self
.
value
)
self
.
type
=
'string'
# If this is a wildcard value, explicitly set self.value to None
if
self
.
value
==
'x'
:
self
.
value
=
None
...
...
@@ -262,42 +256,6 @@ class SignatureLine(object):
else
:
self
.
format
=
""
def
_guid2str
(
self
,
guid
):
'''
Converts a GUID formatted string to a raw byte string in the appropriate endianess.
'''
string
=
""
# Loop through each hyphen separated section of the GUID string
# e.g., "7A9354D9-0468-444A-81CE0BF617D890D" => ['7A9354D9', '0468', '444A', '81CE0BF617D890D']
guid_parts
=
guid
.
split
(
'-'
)
for
n
in
range
(
0
,
len
(
guid_parts
)):
guid_part
=
guid_parts
[
n
]
# Parse out each 2 byte value from the guid_part string,
# e.g., "0A1034" => ["0A", "10", "34"]
guid_bytes
=
[
guid_part
[
i
:
i
+
2
]
for
i
in
range
(
0
,
len
(
guid_part
),
2
)]
# If guid is stored little endian, flip the byte order of all parts
# except for the last eight bytes:
#
# typedef struct {
# unsigned long Data1;
# unsigned short Data2;
# unsigned short Data3;
# byte Data4[8];
# } GUID;
if
self
.
endianess
==
'<'
and
n
!=
(
len
(
guid_parts
)
-
1
):
guid_bytes
=
[
x
for
x
in
reversed
(
guid_bytes
)]
# Convert each ASCII hex byte to a character and append it to self.value
for
guid_byte
in
guid_bytes
:
string
+=
chr
(
int
(
guid_byte
,
16
))
#import binascii
#print ("Converted '%s' => '%s'" % (guid, binascii.hexlify(binwalk.core.compat.str2bytes(string))))
return
string
class
Signature
(
object
):
'''
Class to hold signature data and generate signature regular expressions.
...
...
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