detect_rep/ASM2VEC_base_scripts/asm2vec/zz.py

8 lines
304 B
Python
Raw Permalink Normal View History

2023-04-05 10:04:49 +08:00
import re#导入包
a="dword ptr [ecx + 0x528], 0x562b0248"
b="ecx, dword ptr [eax + 4]"
c="ecx, dword ptr [r*14 + 4]"
d="4"
print(re.findall(pattern=r'\b0x[0-9a-fA-F]+\b', string=a))
print(re.findall(pattern=r'\b[0-9a-fA-F]+\b', string=c))
print(re.search(pattern=r'\b[0-9a-fA-F]+\b', string=d).group())