mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
vmray: add stubs for file imports
This commit is contained in:
@@ -45,3 +45,7 @@ class VMRayAnalysis:
|
||||
if pe.exports:
|
||||
for export in pe.exports:
|
||||
self.exports[export.address] = export.api.name
|
||||
|
||||
def _compute_imports(self):
|
||||
# TODO (meh)
|
||||
...
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
import logging
|
||||
from typing import Tuple, Iterator
|
||||
|
||||
@@ -22,6 +21,11 @@ def extract_export_names(analysis: VMRayAnalysis) -> Iterator[Tuple[Feature, Add
|
||||
yield Export(name), AbsoluteVirtualAddress(addr)
|
||||
|
||||
|
||||
def extract_import_names(analysis: VMRayAnalysis) -> Iterator[Tuple[Feature, Address]]:
|
||||
# TODO (meh)
|
||||
yield from []
|
||||
|
||||
|
||||
def extract_features(analysis: VMRayAnalysis) -> Iterator[Tuple[Feature, Address]]:
|
||||
for handler in FILE_HANDLERS:
|
||||
for feature, addr in handler(analysis):
|
||||
@@ -29,7 +33,7 @@ def extract_features(analysis: VMRayAnalysis) -> Iterator[Tuple[Feature, Address
|
||||
|
||||
|
||||
FILE_HANDLERS = (
|
||||
# extract_import_names,
|
||||
extract_import_names,
|
||||
extract_export_names,
|
||||
# extract_section_names,
|
||||
# extract_file_strings,
|
||||
|
||||
Reference in New Issue
Block a user