mirror of
https://github.com/mandiant/capa.git
synced 2026-02-04 19:12:01 -08:00
fix ruff
This commit is contained in:
@@ -5,7 +5,7 @@ from capa.helpers import assert_never
|
||||
from capa.features.insn import API, Number
|
||||
from capa.features.common import String, Feature
|
||||
from capa.features.address import Address
|
||||
from capa.features.extractors.vmray.models import Analysis, FunctionCall
|
||||
from capa.features.extractors.vmray.models import Analysis
|
||||
from capa.features.extractors.base_extractor import CallHandle, ThreadHandle, ProcessHandle
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -99,7 +99,7 @@ class VMRayExtractor(DynamicFeatureExtractor):
|
||||
flog_xml = zipfile.read("logs/flog.xml", pwd=b"infected")
|
||||
flog = Analysis.from_xml(flog_xml)
|
||||
|
||||
# debug(flog)
|
||||
debug(flog.processes[1])
|
||||
pprint(flog.processes[0])
|
||||
|
||||
return cls(VMRayAnalysis(sv2, flog))
|
||||
@@ -108,5 +108,6 @@ class VMRayExtractor(DynamicFeatureExtractor):
|
||||
if __name__ == "__main__":
|
||||
# TODO(mr): for testing, removeme
|
||||
import sys
|
||||
|
||||
input_path = Path(sys.argv[1])
|
||||
VMRayExtractor.from_zipfile(input_path)
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
# 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.
|
||||
|
||||
from typing import Any, Dict, List, Union, Literal, Optional
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
from pydantic import Field, BaseModel
|
||||
from pydantic import BaseModel
|
||||
from pydantic_xml import BaseXmlModel, attr, element
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user