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
21acfece
Commit
21acfece
authored
Jul 29, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed duplicate container class
parent
9ff6aaa6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
settings.py
src/binwalk/core/settings.py
+3
-9
No files found.
src/binwalk/core/settings.py
View file @
21acfece
...
...
@@ -4,12 +4,6 @@ import os
import
binwalk.core.common
as
common
from
binwalk.core.compat
import
*
class
Container
(
object
):
def
__init__
(
self
,
**
kwargs
):
for
(
k
,
v
)
in
iterator
(
kwargs
):
setattr
(
self
,
k
,
v
)
class
Settings
:
'''
Binwalk settings class, used for accessing user and system file paths and general configuration settings.
...
...
@@ -23,7 +17,7 @@ class Settings:
o PLUGINS - Path to the plugins directory.
'''
# Release version
VERSION
=
"2.
0
.0"
VERSION
=
"2.
1
.0"
# Sub directories
BINWALK_USER_DIR
=
".binwalk"
...
...
@@ -49,7 +43,7 @@ class Settings:
self
.
system_dir
=
common
.
get_module_path
()
# Build the paths to all user-specific files
self
.
user
=
Container
(
binwalk
=
self
.
_user_path
(
self
.
BINWALK_MAGIC_DIR
,
self
.
BINWALK_MAGIC_FILE
),
self
.
user
=
common
.
Generic
Container
(
binwalk
=
self
.
_user_path
(
self
.
BINWALK_MAGIC_DIR
,
self
.
BINWALK_MAGIC_FILE
),
binarch
=
self
.
_user_path
(
self
.
BINWALK_MAGIC_DIR
,
self
.
BINARCH_MAGIC_FILE
),
bincast
=
self
.
_user_path
(
self
.
BINWALK_MAGIC_DIR
,
self
.
BINCAST_MAGIC_FILE
),
extract
=
self
.
_user_path
(
self
.
BINWALK_CONFIG_DIR
,
self
.
EXTRACT_FILE
),
...
...
@@ -57,7 +51,7 @@ class Settings:
# Build the paths to all system-wide files
self
.
system
=
Container
(
binwalk
=
self
.
_system_path
(
self
.
BINWALK_MAGIC_DIR
,
self
.
BINWALK_MAGIC_FILE
),
self
.
system
=
common
.
Generic
Container
(
binwalk
=
self
.
_system_path
(
self
.
BINWALK_MAGIC_DIR
,
self
.
BINWALK_MAGIC_FILE
),
binarch
=
self
.
_system_path
(
self
.
BINWALK_MAGIC_DIR
,
self
.
BINARCH_MAGIC_FILE
),
bincast
=
self
.
_system_path
(
self
.
BINWALK_MAGIC_DIR
,
self
.
BINCAST_MAGIC_FILE
),
extract
=
self
.
_system_path
(
self
.
BINWALK_CONFIG_DIR
,
self
.
EXTRACT_FILE
),
...
...
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