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
30e2686d
Commit
30e2686d
authored
Dec 02, 2013
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated MathExpression to handle all exceptions.
parent
a7de4a1f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
common.py
src/binwalk/common.py
+4
-2
binwalk
src/binwalk/magic/binwalk
+0
-0
archives
src/magic/archives
+1
-1
No files found.
src/binwalk/common.py
View file @
30e2686d
...
...
@@ -111,11 +111,13 @@ class MathExpression(object):
def
__init__
(
self
,
expression
):
self
.
expression
=
expression
self
.
value
=
None
if
expression
:
try
:
self
.
value
=
self
.
evaluate
(
self
.
expression
)
except
TypeError
:
self
.
value
=
None
except
:
pass
def
evaluate
(
self
,
expr
):
return
self
.
_eval
(
ast
.
parse
(
expr
)
.
body
[
0
]
.
value
)
...
...
src/binwalk/magic/binwalk
View file @
30e2686d
No preview for this file type
src/magic/archives
View file @
30e2686d
...
...
@@ -137,7 +137,7 @@
#>>110 string !TRAILER!!! invalid
>110 string x file name: "%s",
>94 string x file name length: "0x%.8s",
>54 string x file size: "0x%.8s"
,
>54 string x file size: "0x%.8s"
>54 string x {jump-to-offset:0x%.8s+110+
>94 string x \b0x%.8s}
...
...
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