Skip to content

Commit 4b1d1d5

Browse files
authored
Merge pull request #99 from airbus-seclab/release
v2.9.11
2 parents 7f7e529 + d878ff1 commit 4b1d1d5

File tree

300 files changed

+13168
-9758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+13168
-9758
lines changed

.github/workflows/codeql.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/ruff.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Ruff
2+
on: [push, pull_request]
3+
jobs:
4+
ruff:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v4
8+
- uses: chartboost/ruff-action@v1
9+
with:
10+
args: 'check --config pyproject.toml'

.readthedocs.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@ version: 2
99
build:
1010
os: ubuntu-22.04
1111
tools:
12-
python: "3.10"
12+
python: "3.12"
1313

1414
# Build documentation in the docs/ directory with Sphinx
1515
sphinx:
1616
configuration: doc/conf.py
1717

18+
formats:
19+
- pdf
20+
- epub
21+
1822
# We recommend specifying your dependencies to enable reproducible builds:
1923
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
2024
python:
2125
install:
26+
- method: pip
2227
- requirements: requirements.txt
28+
- requirements: doc/requirements.txt

README.rst

Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=====
2-
Amoco
2+
amoco
33
=====
44

55
.. image:: http://readthedocs.org/projects/amoco/badge/?version=latest
@@ -9,17 +9,15 @@ Amoco
99
+-----------+--------------------------------------------------+
1010
| Status: | Under Development |
1111
+-----------+--------------------------------------------------+
12-
| Location: | https://github.com/bdcht/amoco |
13-
+-----------+--------------------------------------------------+
1412
| Version: | 2.9 (pre-3.0) |
1513
+-----------+--------------------------------------------------+
16-
| Doc: | http://amoco.readthedocs.io/en/latest/index.html |
14+
| Doc: | http://amoco.readthedocs.io/en/latest/index.html |
1715
+-----------+--------------------------------------------------+
1816

1917
Description
2018
===========
2119

22-
Amoco is a python (>=3.8) package dedicated to symbolic analysis of binaries.
20+
Amoco is a python package dedicated to symbolic analysis of binaries.
2321

2422
It features:
2523

@@ -51,8 +49,8 @@ merged from develop branch or to be more thoroughly implemented.
5149
User documentation and API can be found at
5250
`http://amoco.readthedocs.io/en/latest/index.html`
5351

54-
.. image:: https://github.com/bdcht/amoco/blob/release/doc/gui_load.png
55-
:width: 800
52+
.. image:: doc/amo_emu_inherit.png
53+
:width: 100%
5654

5755
Todo
5856
====
@@ -87,6 +85,19 @@ Please see `LICENSE`_.
8785
Changelog
8886
=========
8987

88+
- `v2.9.11`_
89+
90+
* change default ui term engine from pygments to rich
91+
* add EmuData orm object to save the emulator state
92+
* add save/restore commands in emul ui
93+
* implement callstack logic
94+
* add callstack frame in emul ui
95+
* add debug command in emul ui
96+
* add StructView class for structs pretty printing
97+
* fix x86 mmu_cache logic (flush & misses)
98+
* change default action from codeql to ruff
99+
* refactor code based on ruff checks
100+
90101
- `v2.9.10`_
91102

92103
* x86: add support for real mode execution
@@ -98,7 +109,7 @@ Changelog
98109
* add tracepoint method in emul class
99110
* add support for PE resources
100111
* improve amoco app load/emul commands
101-
* add set,display,nexti,until in emul ui.
112+
* add set,display,nexti,until in emul ui
102113

103114
- `v2.9.9`_
104115

@@ -408,35 +419,36 @@ Changelog
408419
.. _ply: http://www.dabeaz.com/ply/
409420
.. _sqlalchemy: http://www.sqlalchemy.org
410421
.. _QDarkStyleSheet: https://github.com/ColinDuquesnoy/QDarkStyleSheet
411-
.. _LICENSE: https://github.com/bdcht/amoco/blob/release/LICENSE
412-
.. _v2.9.10: https://github.com/bdcht/amoco/releases/tag/v2.9.10
413-
.. _v2.9.9: https://github.com/bdcht/amoco/releases/tag/v2.9.9
414-
.. _v2.9.8: https://github.com/bdcht/amoco/releases/tag/v2.9.8
415-
.. _v2.9.7: https://github.com/bdcht/amoco/releases/tag/v2.9.7
416-
.. _v2.9.6: https://github.com/bdcht/amoco/releases/tag/v2.9.6
417-
.. _v2.9.5: https://github.com/bdcht/amoco/releases/tag/v2.9.5
418-
.. _v2.9.4: https://github.com/bdcht/amoco/releases/tag/v2.9.4
419-
.. _v2.9.3: https://github.com/bdcht/amoco/releases/tag/v2.9.3
420-
.. _v2.9.2: https://github.com/bdcht/amoco/releases/tag/v2.9.2
421-
.. _v2.9.1: https://github.com/bdcht/amoco/releases/tag/v2.9.1
422-
.. _v2.9.0: https://github.com/bdcht/amoco/releases/tag/v2.9.0
423-
.. _v2.6.3: https://github.com/bdcht/amoco/releases/tag/v2.6.3
424-
.. _v2.6.2: https://github.com/bdcht/amoco/releases/tag/v2.6.2
425-
.. _v2.6.1: https://github.com/bdcht/amoco/releases/tag/v2.6.1
426-
.. _v2.6.0: https://github.com/bdcht/amoco/releases/tag/v2.6.0
427-
.. _v2.5.3: https://github.com/bdcht/amoco/releases/tag/v2.5.3
428-
.. _v2.5.2: https://github.com/bdcht/amoco/releases/tag/v2.5.2
429-
.. _v2.5.1: https://github.com/bdcht/amoco/releases/tag/v2.5.1
430-
.. _v2.5.0: https://github.com/bdcht/amoco/releases/tag/v2.5.0
431-
.. _v2.4.6: https://github.com/bdcht/amoco/releases/tag/v2.4.6
432-
.. _v2.4.5: https://github.com/bdcht/amoco/releases/tag/v2.4.5
433-
.. _v2.4.4: https://github.com/bdcht/amoco/releases/tag/v2.4.4
434-
.. _v2.4.3: https://github.com/bdcht/amoco/releases/tag/v2.4.3
435-
.. _v2.4.2: https://github.com/bdcht/amoco/releases/tag/v2.4.2
436-
.. _v2.4.1: https://github.com/bdcht/amoco/releases/tag/v2.4.1
437-
.. _v2.4.0: https://github.com/bdcht/amoco/releases/tag/v2.4.0
438-
.. _v2.3.5: https://github.com/bdcht/amoco/releases/tag/v2.3.5
439-
.. _v2.3.4: https://github.com/bdcht/amoco/releases/tag/v2.3.4
440-
.. _v2.3.3: https://github.com/bdcht/amoco/releases/tag/v2.3.3
441-
.. _v2.3.2: https://github.com/bdcht/amoco/releases/tag/v2.3.2
442-
.. _v2.3.1: https://github.com/bdcht/amoco/releases/tag/v2.3.1
422+
.. _LICENSE: /../../release/LICENSE
423+
.. _v2.9.11: /../../releases/tag/v2.9.11
424+
.. _v2.9.10: /../../releases/tag/v2.9.10
425+
.. _v2.9.9: /../../releases/tag/v2.9.9
426+
.. _v2.9.8: /../../releases/tag/v2.9.8
427+
.. _v2.9.7: /../../releases/tag/v2.9.7
428+
.. _v2.9.6: /../../releases/tag/v2.9.6
429+
.. _v2.9.5: /../../releases/tag/v2.9.5
430+
.. _v2.9.4: /../../releases/tag/v2.9.4
431+
.. _v2.9.3: /../../releases/tag/v2.9.3
432+
.. _v2.9.2: /../../releases/tag/v2.9.2
433+
.. _v2.9.1: /../../releases/tag/v2.9.1
434+
.. _v2.9.0: /../../releases/tag/v2.9.0
435+
.. _v2.6.3: /../../releases/tag/v2.6.3
436+
.. _v2.6.2: /../../releases/tag/v2.6.2
437+
.. _v2.6.1: /../../releases/tag/v2.6.1
438+
.. _v2.6.0: /../../releases/tag/v2.6.0
439+
.. _v2.5.3: /../../releases/tag/v2.5.3
440+
.. _v2.5.2: /../../releases/tag/v2.5.2
441+
.. _v2.5.1: /../../releases/tag/v2.5.1
442+
.. _v2.5.0: /../../releases/tag/v2.5.0
443+
.. _v2.4.6: /../../releases/tag/v2.4.6
444+
.. _v2.4.5: /../../releases/tag/v2.4.5
445+
.. _v2.4.4: /../../releases/tag/v2.4.4
446+
.. _v2.4.3: /../../releases/tag/v2.4.3
447+
.. _v2.4.2: /../../releases/tag/v2.4.2
448+
.. _v2.4.1: /../../releases/tag/v2.4.1
449+
.. _v2.4.0: /../../releases/tag/v2.4.0
450+
.. _v2.3.5: /../../releases/tag/v2.3.5
451+
.. _v2.3.4: /../../releases/tag/v2.3.4
452+
.. _v2.3.3: /../../releases/tag/v2.3.3
453+
.. _v2.3.2: /../../releases/tag/v2.3.2
454+
.. _v2.3.1: /../../releases/tag/v2.3.1

amoco/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .main import *
1+
from .main import * # noqa: F403

amoco/arch/arm/cpu_armv7.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,34 @@
44
# Copyright (C) 2006-2014 Axel Tillequin ([email protected])
55
# published under GPLv2 license
66

7-
from amoco.arch.arm.v7.asm import *
8-
9-
# expose "microarchitecture" (instructions semantics)
10-
uarch = dict(filter(lambda kv: kv[0].startswith("i_"), locals().items()))
11-
12-
from amoco.arch.core import instruction, disassembler
13-
14-
instruction_armv7 = type("instruction_armv7", (instruction,), {})
15-
instruction_armv7.set_uarch(uarch)
7+
from amoco.arch.arm.v7 import env
8+
from amoco.arch.arm.v7 import asm
9+
from amoco.arch.core import instruction, disassembler, CPU
1610

1711
# define disassembler:
1812
from amoco.arch.arm.v7 import spec_armv7
1913
from amoco.arch.arm.v7 import spec_thumb
2014

2115
from amoco.arch.arm.v7.formats import ARM_V7_full
2216

17+
instruction_armv7 = type("instruction_armv7", (instruction,), {})
2318
instruction_armv7.set_formatter(ARM_V7_full)
2419

2520

26-
mode = lambda: internals["isetstate"]
27-
endian = lambda: 1 if internals["ibigend"] == 0 else -1
21+
def mode(**kargs):
22+
return env.internals["isetstate"]
23+
24+
25+
def endian(**kargs):
26+
return 1 if env.internals["ibigend"] == 0 else -1
27+
2828

2929
disassemble = disassembler([spec_armv7, spec_thumb], instruction_armv7, mode, endian)
3030

3131

32-
def PC(state=None):
33-
return pc_
32+
class CPU_ARMv7(CPU):
33+
def get_data_endian(self):
34+
return 1 if env.internals["endianstate"] == 0 else -1
3435

3536

36-
def get_data_endian():
37-
return 1 if internals["endianstate"] == 0 else -1
37+
cpu = CPU_ARMv7(env, asm, disassemble, env.pc_)

amoco/arch/arm/cpu_armv8.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,28 @@
44
# Copyright (C) 2006-2014 Axel Tillequin ([email protected])
55
# published under GPLv2 license
66

7-
from amoco.arch.arm.v8.asm64 import *
8-
9-
# expose "microarchitecture" (instructions semantics)
10-
uarch = dict(filter(lambda kv: kv[0].startswith("i_"), locals().items()))
11-
12-
from amoco.arch.core import instruction, disassembler
13-
14-
instruction_armv8 = type("instruction_armv8", (instruction,), {})
15-
instruction_armv8.set_uarch(uarch)
7+
from amoco.arch.arm.v8 import env64 as env
8+
from amoco.arch.arm.v8 import asm64
9+
from amoco.arch.core import instruction, disassembler, CPU
1610

1711
# define disassembler:
1812
from amoco.arch.arm.v8 import spec_armv8
1913
from amoco.arch.arm.v8.formats import ARM_V8_full
2014

15+
instruction_armv8 = type("instruction_armv8", (instruction,), {})
2116
instruction_armv8.set_formatter(ARM_V8_full)
2217

23-
endian = lambda: 1 if internals["ibigend"] == 0 else -1
18+
19+
def endian():
20+
return 1 if env.internals["ibigend"] == 0 else -1
21+
2422

2523
disassemble = disassembler([spec_armv8], endian=endian, iclass=instruction_armv8)
2624

2725

28-
def PC(state=None):
29-
return pc
26+
class CPU_ARMv8(CPU):
27+
def get_data_endian(self):
28+
return 1 if env.internals["endianstate"] == 0 else -1
3029

3130

32-
def get_data_endian():
33-
return 1 if internals["endianstate"] == 0 else -1
31+
cpu = CPU_ARMv8(env, asm64, disassemble, env.pc)

0 commit comments

Comments
 (0)