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
6ea3bc61
Commit
6ea3bc61
authored
Jan 18, 2015
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed file open bug when attempting to scan a large number of files at once.
parent
1d50eaae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
binvis.py
src/binwalk/modules/binvis.py
+1
-1
general.py
src/binwalk/modules/general.py
+10
-6
No files found.
src/binwalk/modules/binvis.py
View file @
6ea3bc61
...
...
@@ -74,7 +74,7 @@ class Plotter(Module):
self
.
window
.
opts
[
'distance'
]
=
self
.
VIEW_DISTANCE
if
len
(
self
.
config
.
target_files
)
==
1
:
self
.
window
.
setWindowTitle
(
self
.
config
.
target_files
[
0
]
.
name
)
self
.
window
.
setWindowTitle
(
self
.
config
.
target_files
[
0
])
def
_print
(
self
,
message
):
'''
...
...
src/binwalk/modules/general.py
View file @
6ea3bc61
...
...
@@ -123,8 +123,9 @@ class General(Module):
sys
.
exit
(
0
)
def
reset
(
self
):
for
fp
in
self
.
target_files
:
fp
.
reset
()
pass
#for fp in self.target_files:
# fp.reset()
def
__del__
(
self
):
self
.
_cleanup
()
...
...
@@ -133,9 +134,10 @@ class General(Module):
self
.
_cleanup
()
def
_cleanup
(
self
):
if
hasattr
(
self
,
'target_files'
):
for
fp
in
self
.
target_files
:
fp
.
close
()
pass
#if hasattr(self, 'target_files'):
# for fp in self.target_files:
# fp.close()
def
_set_verbosity
(
self
):
'''
...
...
@@ -171,7 +173,9 @@ class General(Module):
if
not
self
.
subclass
==
io
.
FileIO
or
not
os
.
path
.
isdir
(
tfile
):
# Make sure we can open the target files
try
:
self
.
target_files
.
append
(
self
.
open_file
(
tfile
))
fp
=
self
.
open_file
(
tfile
)
fp
.
close
()
self
.
target_files
.
append
(
tfile
)
except
KeyboardInterrupt
as
e
:
raise
e
except
Exception
as
e
:
...
...
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