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
c9cec992
Commit
c9cec992
authored
Nov 11, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added comments to core/settings.py
parent
bbead88e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
settings.py
src/binwalk/core/settings.py
+10
-1
No files found.
src/binwalk/core/settings.py
View file @
c9cec992
...
...
@@ -29,7 +29,6 @@ class Settings:
PLUGINS
=
"plugins"
EXTRACT_FILE
=
"extract.conf"
BINARCH_MAGIC_FILE
=
"binarch"
BINCAST_MAGIC_FILE
=
"bincast"
def
__init__
(
self
):
'''
...
...
@@ -54,6 +53,14 @@ class Settings:
plugins
=
self
.
_system_path
(
self
.
BINWALK_PLUGINS_DIR
))
def
_magic_signature_files
(
self
,
system_only
=
False
,
user_only
=
False
):
'''
Find all user/system magic signature files.
@system_only - If True, only the system magic file directory will be searched.
@user_only - If True, only the user magic file directory will be searched.
Returns a list of user/system magic signature files.
'''
files
=
[]
user_binarch
=
self
.
_user_path
(
self
.
BINWALK_MAGIC_DIR
,
self
.
BINARCH_MAGIC_FILE
)
system_binarch
=
self
.
_system_path
(
self
.
BINWALK_MAGIC_DIR
,
self
.
BINARCH_MAGIC_FILE
)
...
...
@@ -65,6 +72,8 @@ class Settings:
system_dir
=
os
.
path
.
join
(
self
.
system_dir
,
self
.
BINWALK_MAGIC_DIR
)
files
+=
[
os
.
path
.
join
(
system_dir
,
x
)
for
x
in
os
.
listdir
(
system_dir
)]
# Don't include binarch signatures in the default list of signature files.
# It is specifically loaded when -A is specified on the command line.
if
user_binarch
in
files
:
files
.
remove
(
user_binarch
)
if
system_binarch
in
files
:
...
...
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