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
a78d78c4
Commit
a78d78c4
authored
Jul 28, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress hashlib exception logging in the bundled IDA python interpreter
parent
c2a11ad3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
common.py
src/binwalk/core/common.py
+1
-1
idb.py
src/binwalk/core/idb.py
+11
-0
module.py
src/binwalk/core/module.py
+1
-1
No files found.
src/binwalk/core/common.py
View file @
a78d78c4
...
@@ -5,7 +5,7 @@ import os
...
@@ -5,7 +5,7 @@ import os
import
re
import
re
import
sys
import
sys
import
ast
import
ast
import
hashlib
#
import hashlib
import
operator
as
op
import
operator
as
op
import
binwalk.core.idb
import
binwalk.core.idb
from
binwalk.core.compat
import
*
from
binwalk.core.compat
import
*
...
...
src/binwalk/core/idb.py
View file @
a78d78c4
...
@@ -2,11 +2,22 @@
...
@@ -2,11 +2,22 @@
import
io
import
io
import
os
import
os
import
logging
class
ShutUpHashlib
(
logging
.
Filter
):
'''
This is used to suppress hashlib exception messages
if using the Python interpreter bundled with IDA.
'''
def
filter
(
self
,
record
):
return
not
record
.
getMessage
()
.
startswith
(
"code for hash"
)
try
:
try
:
import
idc
import
idc
import
idaapi
import
idaapi
LOADED_IN_IDA
=
True
LOADED_IN_IDA
=
True
logger
=
logging
.
getLogger
()
logger
.
addFilter
(
ShutUpHashlib
())
except
ImportError
:
except
ImportError
:
LOADED_IN_IDA
=
False
LOADED_IN_IDA
=
False
...
...
src/binwalk/core/module.py
View file @
a78d78c4
...
@@ -690,7 +690,7 @@ class Modules(object):
...
@@ -690,7 +690,7 @@ class Modules(object):
if
hasattr
(
binwalk
.
modules
,
dependency
.
name
):
if
hasattr
(
binwalk
.
modules
,
dependency
.
name
):
dependency
.
module
=
getattr
(
binwalk
.
modules
,
dependency
.
name
)
dependency
.
module
=
getattr
(
binwalk
.
modules
,
dependency
.
name
)
else
:
else
:
raise
ModuleException
(
"
%
s depends on
%
s which was not found in binwalk.modules.__init__.py
\n
"
%
(
str
(
module
),
dependency
.
name
))
continue
# CJH
raise ModuleException("%s depends on %s which was not found in binwalk.modules.__init__.py\n" % (str(module), dependency.name))
# No recursive dependencies, thanks
# No recursive dependencies, thanks
if
dependency
.
module
==
module
:
if
dependency
.
module
==
module
:
...
...
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