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
596489cc
Commit
596489cc
authored
Nov 23, 2015
by
Craig Heffner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated status server output, currently only works with signature scans; added MPFS validation.
parent
7852904f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
module.py
src/binwalk/core/module.py
+6
-3
statuserver.py
src/binwalk/core/statuserver.py
+6
-4
filesystems
src/binwalk/magic/filesystems
+3
-0
No files found.
src/binwalk/core/module.py
View file @
596489cc
...
...
@@ -379,7 +379,7 @@ class Module(object):
# Reset all dependencies prior to continuing with another file.
# This is particularly important for the extractor module, which must be reset
# in order to reset it
'
s base output directory path for each file, and the
# in order to reset its base output directory path for each file, and the
# list of pending files.
self
.
reset_dependencies
()
...
...
@@ -407,10 +407,12 @@ class Module(object):
if
fp
is
not
None
:
self
.
current_target_file_name
=
fp
.
path
print
"self.status.fp =
%
s"
%
fp
.
path
self
.
status
.
fp
=
fp
else
:
self
.
current_target_file_name
=
None
self
.
status
.
fp
=
fp
print
"self.status.fp = None"
self
.
status
.
fp
=
None
self
.
previous_next_file_fp
=
fp
...
...
@@ -462,6 +464,7 @@ class Module(object):
if
r
.
offset
and
r
.
file
and
self
.
AUTO_UPDATE_STATUS
:
self
.
status
.
total
=
r
.
file
.
length
self
.
status
.
completed
=
r
.
offset
self
.
status
.
fp
=
r
.
file
if
r
.
display
:
display_args
=
self
.
_build_display_args
(
r
)
...
...
@@ -609,7 +612,7 @@ class Modules(object):
self
.
arguments
=
[]
self
.
executed_modules
=
{}
self
.
default_dependency_modules
=
{}
self
.
status
=
Status
(
completed
=
0
,
total
=
0
,
f
ile
=
None
)
self
.
status
=
Status
(
completed
=
0
,
total
=
0
,
f
p
=
None
)
self
.
status_server_started
=
False
self
.
status_service
=
None
...
...
src/binwalk/core/statuserver.py
View file @
596489cc
# Provides scan status information via a TCP socket service.
import
sys
import
time
import
threading
import
SocketServer
...
...
@@ -7,7 +8,7 @@ import SocketServer
class
StatusRequestHandler
(
SocketServer
.
BaseRequestHandler
):
def
handle
(
self
):
message_format
=
'Binwalk scan progress:
%3
d
%%
Currently at byte
%
d of
%
d total bytes in file
%
s'
message_format
=
"
%
s
%3
d
%%
[
%
d /
%
d ]"
last_status_message_len
=
0
status_message
=
''
...
...
@@ -20,16 +21,17 @@ class StatusRequestHandler(SocketServer.BaseRequestHandler):
self
.
request
.
send
(
'
\b
'
*
last_status_message_len
)
percentage
=
((
float
(
self
.
server
.
binwalk
.
status
.
completed
)
/
float
(
self
.
server
.
binwalk
.
status
.
total
))
*
100
)
status_message
=
message_format
%
(
percentage
,
status_message
=
message_format
%
(
self
.
server
.
binwalk
.
status
.
fp
.
path
,
percentage
,
self
.
server
.
binwalk
.
status
.
completed
,
self
.
server
.
binwalk
.
status
.
total
,
self
.
server
.
binwalk
.
status
.
fp
.
path
)
self
.
server
.
binwalk
.
status
.
total
)
last_status_message_len
=
len
(
status_message
)
self
.
request
.
send
(
status_message
)
except
KeyboardInterrupt
as
e
:
raise
e
except
Exception
as
e
:
#sys.stderr.write(str(e) + "\n")
pass
return
...
...
src/binwalk/magic/filesystems
100755 → 100644
View file @
596489cc
...
...
@@ -68,8 +68,11 @@
# MPFS file system
0 string MPFS MPFS filesystem, Microchop,
>4 byte <0 {invalid}
>5 byte <0 {invalid}
>4 byte x version %d.
>5 byte x \b%d,
>6 leshort <0 {invalid}
>6 leshort x %d file entries
# cramfs filesystem - russell@coker.com.au
...
...
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