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-depend
binwalk
Commits
491d06e4
Commit
491d06e4
authored
Oct 02, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed firmware-mod-kit dependencies
parent
b24fe1c7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
10 deletions
+27
-10
extract.conf
src/binwalk/config/extract.conf
+6
-6
__init__.py
src/binwalk/modules/__init__.py
+1
-1
compression.py
src/binwalk/modules/compression.py
+2
-2
cpio.py
src/binwalk/plugins/cpio.py
+18
-0
archives
src/magic/archives
+0
-1
No files found.
src/binwalk/config/extract.conf
View file @
491d06e4
...
...
@@ -25,20 +25,20 @@
^
squashfs
filesystem
:
squashfs
:
sasquatch
'%e'
^
squashfs
filesystem
:
squashfs
:
unsquashfs
'%e'
^
cramfs
filesystem
:
cramfs
:
mkdir
cramfs
-
root
&&
mount
-
t
cramfs
'%e'
cramfs
-
root
^
ext2
filesystem
:
ext2
:
mkdir
ext2
-
root
&&
mount
-
t
ext2
'%e'
ext2
-
root
^
romfs
filesystem
:
romfs
:
mkdir
romfs
-
root
&&
mount
-
t
romfs
'%e'
romfs
-
root
# These assume the firmware-mod-kit is installed to /opt/firmware-mod-kit.
# If not, change the file paths appropriately.
^
jffs2
filesystem
:
jffs2
:/
opt
/
firmware
-
mod
-
kit
/
src
/
jffs2
/
unjffs2
'%e'
^
ascii
cpio
archive
:
cpio
:/
opt
/
firmware
-
mod
-
kit
/
uncpio
.
sh
'%e'
#
^jffs2 filesystem:jffs2:/opt/firmware-mod-kit/src/jffs2/unjffs2 '%e'
#
^ascii cpio archive:cpio:/opt/firmware-mod-kit/uncpio.sh '%e'
#^squashfs filesystem:squashfs:/opt/firmware-mod-kit/unsquashfs_all.sh '%e'
#^cramfs filesystem:cramfs:/opt/firmware-mod-kit/uncramfs_all.sh '%e'
#^bff volume entry:bff:/opt/firmware-mod-kit/src/bff/bffxtractor.py '%e'
#^wdk file system:wdk:/opt/firmware-mod-kit/src/firmware-tools/unwdk.py '%e'
#^zlib compressed data:zlib:/opt/firmware-mod-kit/src/firmware-tools/unzlib.py '%e'
^
cramfs
filesystem
:
cramfs
:
mkdir
cramfs
-
root
&&
mount
-
t
cramfs
'%e'
cramfs
-
root
^
ext2
filesystem
:
ext2
:
mkdir
ext2
-
root
&&
mount
-
t
ext2
'%e'
ext2
-
root
^
romfs
filesystem
:
romfs
:
mkdir
romfs
-
root
&&
mount
-
t
romfs
'%e'
romfs
-
root
# These will only be run if the above file paths don't exist / don't work.
#^squashfs filesystem:squashfs:/opt/firmware-mod-kit/trunk/unsquashfs_all.sh '%e'
#^jffs2 filesystem:jffs2:/opt/firmware-mod-kit/trunk/src/jffs2/unjffs2 '%e' # requires root
...
...
src/binwalk/modules/__init__.py
View file @
491d06e4
...
...
@@ -5,7 +5,7 @@ from binwalk.modules.hexdiff import HexDiff
from
binwalk.modules.general
import
General
from
binwalk.modules.extractor
import
Extractor
from
binwalk.modules.entropy
import
Entropy
from
binwalk.modules.heuristics
import
HeuristicCompressionAnalyzer
#
from binwalk.modules.heuristics import HeuristicCompressionAnalyzer
from
binwalk.modules.compression
import
RawCompression
try
:
from
binwalk.modules.disasm
import
Disasm
...
...
src/binwalk/modules/compression.py
View file @
491d06e4
...
...
@@ -30,9 +30,9 @@ class Deflate(object):
# Add an extraction rule
if
self
.
module
.
extractor
.
enabled
:
self
.
module
.
extractor
.
add_rule
(
regex
=
'^
%
s'
%
self
.
DESCRIPTION
.
lower
(),
extension
=
"deflate"
,
cmd
=
self
.
_
extractor
)
self
.
module
.
extractor
.
add_rule
(
regex
=
'^
%
s'
%
self
.
DESCRIPTION
.
lower
(),
extension
=
"deflate"
,
cmd
=
self
.
extractor
)
def
_
extractor
(
self
,
file_name
):
def
extractor
(
self
,
file_name
):
out_file
=
os
.
path
.
splitext
(
file_name
)[
0
]
self
.
tinfl
.
inflate_raw_file
(
file_name
,
out_file
)
...
...
src/binwalk/plugins/cpio.py
View file @
491d06e4
...
...
@@ -4,9 +4,27 @@ class CPIOPlugin(binwalk.core.plugin.Plugin):
'''
Ensures that ASCII CPIO archive entries only get extracted once.
'''
# CPIO_OUT_DIR = "cpio-root"
MODULES
=
[
'Signature'
]
# def init(self):
# if self.module.extractor.enabled:
# self.module.extractor.add_rule(regex="^ascii cpio archive",
# extension="cpio",
# cmd=self.extractor)
# def extractor(self, fname):
# out_dir = os.path.join(os.path.split(fname)[0], self.CPIO_OUT_DIR)
# try:
# os.mkdir(out_dir)
# except OSError:
# return
# # Lazy.
# os.system("cd '%s' && cpio -d -i --no-absolute-filenames < '%s' 2>&1 1>/dev/null" % (out_dir, fname))
def
pre_scan
(
self
):
# Be sure to re-set this at the beginning of every scan
self
.
found_archive
=
False
...
...
src/magic/archives
View file @
491d06e4
...
...
@@ -175,7 +175,6 @@
>54 string x {jump-to-offset:0x%.8s+110+
>94 string x \b0x%.8s}
# HP Printer Job Language
# The header found on Win95 HP plot files is the "Silliest Thing possible"
# (TM)
...
...
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