Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yara-python
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
yara-python
Commits
8ee070b0
Commit
8ee070b0
authored
Jul 30, 2018
by
Victor M. Alvarez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add argument for enabling "macho" module.
parent
b3612f8c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
setup.py
setup.py
+13
-0
No files found.
setup.py
View file @
8ee070b0
...
...
@@ -37,6 +37,7 @@ OPTIONS = [
(
'enable-magic'
,
None
,
'enable "magic" module'
),
(
'enable-dotnet'
,
None
,
'enable "dotnet" module'
),
(
'enable-dex'
,
None
,
'enable "dex" module'
),
(
'enable-macho'
,
None
,
'enable "macho" module'
),
(
'enable-profiling'
,
None
,
'enable profiling features'
)]
...
...
@@ -46,6 +47,7 @@ BOOLEAN_OPTIONS = [
'enable-magic'
,
'enable-dotnet'
,
'enable-dex'
,
'enable-macho'
,
'enable-profiling'
]
...
...
@@ -99,6 +101,7 @@ class BuildCommand(build):
self
.
enable_cuckoo
=
None
self
.
enable_dotnet
=
None
self
.
enable_dex
=
None
self
.
enable_macho
=
None
self
.
enable_profiling
=
None
def
finalize_options
(
self
):
...
...
@@ -120,6 +123,7 @@ class BuildExtCommand(build_ext):
self
.
enable_cuckoo
=
None
self
.
enable_dotnet
=
None
self
.
enable_dex
=
None
self
.
enable_macho
=
None
self
.
enable_profiling
=
None
def
finalize_options
(
self
):
...
...
@@ -135,6 +139,7 @@ class BuildExtCommand(build_ext):
(
'enable_cuckoo'
,
'enable_cuckoo'
),
(
'enable_dotnet'
,
'enable_dotnet'
),
(
'enable_dex'
,
'enable_dex'
),
(
'enable_macho'
,
'enable_macho'
),
(
'enable_profiling'
,
'enable_profiling'
))
if
self
.
enable_magic
and
self
.
dynamic_linking
:
...
...
@@ -149,6 +154,9 @@ class BuildExtCommand(build_ext):
if
self
.
enable_dex
and
self
.
dynamic_linking
:
raise
distutils
.
errors
.
DistutilsOptionError
(
'--enable-dex can''t be used with --dynamic-linking'
)
if
self
.
enable_macho
and
self
.
dynamic_linking
:
raise
distutils
.
errors
.
DistutilsOptionError
(
'--enable-macho can''t be used with --dynamic-linking'
)
def
run
(
self
):
"""Execute the build command."""
...
...
@@ -249,6 +257,11 @@ class BuildExtCommand(build_ext):
else
:
exclusions
.
append
(
'yara/libyara/modules/dex.c'
)
if
self
.
enable_macho
:
module
.
define_macros
.
append
((
'MACHO_MODULE'
,
'1'
))
else
:
exclusions
.
append
(
'yara/libyara/modules/macho.c'
)
exclusions
=
[
os
.
path
.
normpath
(
x
)
for
x
in
exclusions
]
for
directory
,
_
,
files
in
os
.
walk
(
'yara/libyara/'
):
...
...
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