mirror of
https://github.com/mandiant/capa.git
synced 2025-12-23 07:28:34 -08:00
type: capa.features.extractors.viv.helpers
This commit is contained in:
@@ -5,10 +5,13 @@
|
|||||||
# 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.
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from vivisect import VivWorkspace
|
||||||
from vivisect.const import XR_TO, REF_CODE
|
from vivisect.const import XR_TO, REF_CODE
|
||||||
|
|
||||||
|
|
||||||
def get_coderef_from(vw, va):
|
def get_coderef_from(vw: VivWorkspace, va: int) -> Optional[int]:
|
||||||
"""
|
"""
|
||||||
return first code `tova` whose origin is the specified va
|
return first code `tova` whose origin is the specified va
|
||||||
return None if no code reference is found
|
return None if no code reference is found
|
||||||
|
|||||||
Reference in New Issue
Block a user