diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-01-31 20:50:15 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-01-31 20:50:15 (GMT) |
commit | c6bfb7dd499f2aa1d4fb4f39dc3f49cb8801fed2 (patch) | |
tree | 748784ea34f532396bc5ff7a12bf792c6dd1e14c /tests/format | |
parent | 3d4d97da355c0dd90b1e623f452da22894f8cd71 (diff) |
Improved loop detection.
Diffstat (limited to 'tests/format')
-rw-r--r-- | tests/format/flat.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/format/flat.py b/tests/format/flat.py index 4ab5aa2..6924e42 100644 --- a/tests/format/flat.py +++ b/tests/format/flat.py @@ -8,7 +8,9 @@ from chrysacase import ChrysalideTestCase from pychrysalide.analysis import LoadedBinary from pychrysalide.analysis.contents import MemoryContent +from pychrysalide.arch import vmpa from pychrysalide.format import FlatFormat +from pychrysalide.glibext import BinPortion class TestFlatFormat(ChrysalideTestCase): @@ -25,6 +27,13 @@ class TestFlatFormat(ChrysalideTestCase): fmt = FlatFormat(cnt) fmt.set_machine('armv7') + base = vmpa(0, 0) + + p = BinPortion(BinPortion.BPC_CODE, base, cnt.size) + p.rights = BinPortion.PAC_READ | BinPortion.PAC_EXEC + + fmt.register_user_portion(p) + binary = LoadedBinary(fmt) binary.analyze_and_wait() |