diff options
| author | Camille Mougey <commial@gmail.com> | 2019-03-07 14:37:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-07 14:37:07 +0100 |
| commit | 4c2320b46250a8d6f8774e1218544b72a154cd8e (patch) | |
| tree | b67e7b072439f84109bd39dad8ed7f3f135224f8 /example/jitter/arm_sc.py | |
| parent | eab809932871f91d6f4aa770fc321af9e156e0f5 (diff) | |
| parent | 26c1075723a02984da6d3bc7423c5c0c43082dc3 (diff) | |
| download | miasm-4c2320b46250a8d6f8774e1218544b72a154cd8e.tar.gz miasm-4c2320b46250a8d6f8774e1218544b72a154cd8e.zip | |
Merge pull request #990 from serpilliere/support_python2_python3
Support python2 python3
Diffstat (limited to 'example/jitter/arm_sc.py')
| -rwxr-xr-x | example/jitter/arm_sc.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/example/jitter/arm_sc.py b/example/jitter/arm_sc.py index 7720ad68..9ff770ff 100755 --- a/example/jitter/arm_sc.py +++ b/example/jitter/arm_sc.py @@ -1,8 +1,9 @@ #! /usr/bin/env python2 #-*- coding:utf-8 -*- -from miasm2.analysis.sandbox import Sandbox_Linux_armb_str -from miasm2.analysis.sandbox import Sandbox_Linux_arml_str -from elfesteem.strpatchwork import StrPatchwork +from miasm.core.utils import int_to_byte +from miasm.analysis.sandbox import Sandbox_Linux_armb_str +from miasm.analysis.sandbox import Sandbox_Linux_arml_str +from miasm.loader.strpatchwork import StrPatchwork from pdb import pm @@ -35,8 +36,8 @@ stop = sb.jitter.cpu.R1 s = sb.jitter.vm.get_mem(start, stop-start) s = StrPatchwork(s) for i, c in enumerate(s): - s[i] = chr(ord(c)^0x11) -s = str(s) -assert(s == "test string\x00") + s[i] = int_to_byte(ord(c)^0x11) +s = bytes(s) +assert(s == b"test string\x00") |