mirror of
https://github.com/mandiant/capa.git
synced 2025-12-18 10:19:15 -08:00
Merged Changes from PR #1591
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
from typing import Tuple, Iterator, cast
|
from typing import Tuple, Iterator
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import dnfile
|
import dnfile
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
# 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.
|
# 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.
|
# See the License for the specific language governing permissions and limitations under the License.
|
||||||
import os
|
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
# 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.
|
# 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.
|
# See the License for the specific language governing permissions and limitations under the License.
|
||||||
import os
|
|
||||||
import copy
|
import copy
|
||||||
import logging
|
import logging
|
||||||
import itertools
|
import itertools
|
||||||
|
|||||||
@@ -576,7 +576,7 @@ def get_extractor(
|
|||||||
return capa.features.extractors.viv.extractor.VivisectFeatureExtractor(vw, path, os_)
|
return capa.features.extractors.viv.extractor.VivisectFeatureExtractor(vw, path, os_)
|
||||||
|
|
||||||
|
|
||||||
def get_file_extractors(sample: str, format_: str) -> List[FeatureExtractor]:
|
def get_file_extractors(sample: Path, format_: str) -> List[FeatureExtractor]:
|
||||||
file_extractors: List[FeatureExtractor] = list()
|
file_extractors: List[FeatureExtractor] = list()
|
||||||
|
|
||||||
if format_ == FORMAT_PE:
|
if format_ == FORMAT_PE:
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ Unless required by applicable law or agreed to in writing, software distributed
|
|||||||
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
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.
|
See the License for the specific language governing permissions and limitations under the License.
|
||||||
"""
|
"""
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
import argparse
|
import argparse
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
import collections
|
import collections
|
||||||
from typing import Any, Dict
|
from typing import Any, Set, Dict
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import capa.main
|
import capa.main
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import string
|
|||||||
import difflib
|
import difflib
|
||||||
import hashlib
|
import hashlib
|
||||||
import logging
|
import logging
|
||||||
import pathlib
|
|
||||||
import argparse
|
import argparse
|
||||||
import itertools
|
import itertools
|
||||||
import posixpath
|
import posixpath
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# 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.
|
# See the License for the specific language governing permissions and limitations under the License.
|
||||||
|
|
||||||
import os
|
|
||||||
import binascii
|
import binascii
|
||||||
import contextlib
|
import contextlib
|
||||||
import collections
|
import collections
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# 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.
|
# See the License for the specific language governing permissions and limitations under the License.
|
||||||
|
|
||||||
import os
|
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
import capa.rules
|
import capa.rules
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# 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.
|
# See the License for the specific language governing permissions and limitations under the License.
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|||||||
Reference in New Issue
Block a user