cle
9.3.4
9.3.3
9.3.2
9.3.1
9.3.0
9.2.99
9.2.98
9.2.97
9.2.96
9.2.95
9.2.94
9.2.93
9.2.92
9.2.91
9.2.90
9.2.9
9.2.89
9.2.88
9.2.87
9.2.86
9.2.85
9.2.84
9.2.83
9.2.82
9.2.81
9.2.80
9.2.8
9.2.79
9.2.78
9.2.77
9.2.76
9.2.75
9.2.74
9.2.73
9.2.72
9.2.71
9.2.70
9.2.7
9.2.69
9.2.68
9.2.67
9.2.66
9.2.65
9.2.64
9.2.63
9.2.62
9.2.61
9.2.60
9.2.6
9.2.59
9.2.58
9.2.57
9.2.56
9.2.55
9.2.54
9.2.53
9.2.52
9.2.51
9.2.50
9.2.5
9.2.49
9.2.48
9.2.47
9.2.46
9.2.45
9.2.44
9.2.43
9.2.42
9.2.41
9.2.40
9.2.4
9.2.39
9.2.38
9.2.37
9.2.36
9.2.35
9.2.34
9.2.33
9.2.32
9.2.31
9.2.30
9.2.3
9.2.29
9.2.28
9.2.27
9.2.26
9.2.25
9.2.24
9.2.23
9.2.223
9.2.222
9.2.221
9.2.22
9.2.217
9.2.215
9.2.214
9.2.213
9.2.212
9.2.211
9.2.21
9.2.209
9.2.208
9.2.207
9.2.205
9.2.204
9.2.203
9.2.202
9.2.201
9.2.20
9.2.2
9.2.199
9.2.198
9.2.197
9.2.196
9.2.195
9.2.194
9.2.193
9.2.192
9.2.191
9.2.190
9.2.19
9.2.189
9.2.188
9.2.187
9.2.186
9.2.185
9.2.184
9.2.183
9.2.182
9.2.181
9.2.180
9.2.18
9.2.179
9.2.178
9.2.177
9.2.176
9.2.175
9.2.174
9.2.173
9.2.172
9.2.171
9.2.170
9.2.17
9.2.169
9.2.168
9.2.167
9.2.166
9.2.165
9.2.164
9.2.163
9.2.162
9.2.161
9.2.160
9.2.16
9.2.159
9.2.158
9.2.157
9.2.156
9.2.154
9.2.153
9.2.152
9.2.150
9.2.15
9.2.149
9.2.148
9.2.147
9.2.146
9.2.145
9.2.144
9.2.143
9.2.142
9.2.141
9.2.140
9.2.14
9.2.139
9.2.138
9.2.137
9.2.136
9.2.135
9.2.134
9.2.133
9.2.132
9.2.131
9.2.130
9.2.13
9.2.129
9.2.128
9.2.127
9.2.126
9.2.125
9.2.124
9.2.123
9.2.122
9.2.121
9.2.120
9.2.12
9.2.119
9.2.118
9.2.117
9.2.116
9.2.115
9.2.114
9.2.113
9.2.112
9.2.111
9.2.110
9.2.11
9.2.109
9.2.108
9.2.107
9.2.106
9.2.105
9.2.104
9.2.103
9.2.102
9.2.101
9.2.100
9.2.10
9.2.1
9.1.12332
9.1.11752
9.1.11611
9.1.11508
9.1.10913
9.0.9947
9.0.9792
9.0.9684
9.0.9572
9.0.9506
9.0.9438
9.0.9355
9.0.9297
9.0.9166
9.0.9031
9.0.8761
9.0.8021
9.0.7912
9.0.7833
9.0.7491
9.0.7293
9.0.6885
9.0.6852
9.0.6790
9.0.6642
9.0.6588
9.0.6488
9.0.6421
9.0.6281
9.0.6136
9.0.5903
9.0.5811
9.0.5739
9.0.5610
9.0.5450
9.0.5405
9.0.5376
9.0.5327
9.0.5326
9.0.5171
9.0.5034
9.0.5002
9.0.4940
9.0.4885
9.0.4663
9.0.4495
9.0.4446
9.0.4378
9.0.10730
9.0.10689
9.0.10651
9.0.10576
9.0.10534
9.0.10409
9.0.10339
9.0.10281
9.0.10159
9.0.10072
9.0.10055
9.0.10010
10.0.5
10.0.4
10.0.3
10.0.2
10.0.1
10.0.0
9.3.4
9.3.3
9.3.2
9.3.1
9.3.0
9.2.99
9.2.98
9.2.97
9.2.96
9.2.95
9.2.94
9.2.93
9.2.92
9.2.91
9.2.90
9.2.9
9.2.89
9.2.88
9.2.87
9.2.86
9.2.85
9.2.84
9.2.83
9.2.82
9.2.81
9.2.80
9.2.8
9.2.79
9.2.78
9.2.77
9.2.76
9.2.75
9.2.74
9.2.73
9.2.72
9.2.71
9.2.70
9.2.7
9.2.69
9.2.68
9.2.67
9.2.66
9.2.65
9.2.64
9.2.63
9.2.62
9.2.61
9.2.60
9.2.6
9.2.59
9.2.58
9.2.57
9.2.56
9.2.55
9.2.54
9.2.53
9.2.52
9.2.51
9.2.50
9.2.5
9.2.49
9.2.48
9.2.47
9.2.46
9.2.45
9.2.44
9.2.43
9.2.42
9.2.41
9.2.40
9.2.4
9.2.39
9.2.38
9.2.37
9.2.36
9.2.35
9.2.34
9.2.33
9.2.32
9.2.31
9.2.30
9.2.3
9.2.29
9.2.28
9.2.27
9.2.26
9.2.25
9.2.24
9.2.23
9.2.223
9.2.222
9.2.221
9.2.22
9.2.217
9.2.215
9.2.214
9.2.213
9.2.212
9.2.211
9.2.21
9.2.209
9.2.208
9.2.207
9.2.205
9.2.204
9.2.203
9.2.202
9.2.201
9.2.20
9.2.2
9.2.199
9.2.198
9.2.197
9.2.196
9.2.195
9.2.194
9.2.193
9.2.192
9.2.191
9.2.190
9.2.19
9.2.189
9.2.188
9.2.187
9.2.186
9.2.185
9.2.184
9.2.183
9.2.182
9.2.181
9.2.180
9.2.18
9.2.179
9.2.178
9.2.177
9.2.176
9.2.175
9.2.174
9.2.173
9.2.172
9.2.171
9.2.170
9.2.17
9.2.169
9.2.168
9.2.167
9.2.166
9.2.165
9.2.162
9.2.161
9.2.160
9.2.16
9.2.159
9.2.158
9.2.157
9.2.156
9.2.154
9.2.153
9.2.152
9.2.150
9.2.15
9.2.149
9.2.148
9.2.147
9.2.146
9.2.145
9.2.144
9.2.143
9.2.142
9.2.141
9.2.140
9.2.14
9.2.139
9.2.138
9.2.137
9.2.136
9.2.135
9.2.134
9.2.133
9.2.132
9.2.131
9.2.130
9.2.13
9.2.129
9.2.128
9.2.127
9.2.126
9.2.125
9.2.124
9.2.123
9.2.122
9.2.121
9.2.120
9.2.12
9.2.119
9.2.118
9.2.117
9.2.116
9.2.115
9.2.114
9.2.113
9.2.112
9.2.111
9.2.110
9.2.11
9.2.109
9.2.108
9.2.107
9.2.106
9.2.105
9.2.104
9.2.103
9.2.102
9.2.101
9.2.100
9.2.10
9.2.1
9.1.12332
9.1.11752
9.1.11611
9.1.11508
9.1.10913
9.0.9947
9.0.9792
9.0.9684
9.0.9572
9.0.9506
9.0.9438
9.0.9355
9.0.9297
9.0.9166
9.0.9031
9.0.8761
9.0.8021
9.0.7912
9.0.7833
9.0.7491
9.0.7293
9.0.6885
9.0.6852
9.0.6790
9.0.6642
9.0.6588
9.0.6488
9.0.6421
9.0.6281
9.0.6136
9.0.5903
9.0.5811
9.0.5739
9.0.5610
9.0.5450
9.0.5405
9.0.5376
9.0.5327
9.0.5326
9.0.5171
9.0.5034
9.0.5002
9.0.4940
9.0.4885
9.0.4663
9.0.4495
9.0.4446
9.0.4378
9.0.10730
9.0.10689
9.0.10651
9.0.10576
9.0.10534
9.0.10409
9.0.10339
9.0.10281
9.0.10159
9.0.10072
9.0.10055
9.0.10010
8.20.7.6
8.20.7.27
8.20.6.8
8.20.6.1
8.20.5.27
8.20.1.7
8.19.7.25
8.19.4.5
8.19.2.4
8.19.10.30
8.19.10.29
8.18.10.5
8.18.10.25
7.8.9.26
7.8.8.1
7.8.7.1
7.8.6.16
7.8.2.21
7.7.9.8.post1
7.7.9.8
7.7.9.21
7.7.9.14
7.7.12.16
6.7.7.27
6.7.6.9
6.7.4.12
6.7.3.26
6.7.1.31
6.7.1.13.post2
6.7.1.13
5.6.8.22
5.6.12.3
5.6.10.5
4.6.6.28
4.6.5.27
4.6.4.28
4.6.3.28
4.6.3.15
4.6.2.25
4.6.1.6
4.6.1.4
4.6.1.30
4.6.1.27
4.5.9.9b
4.5.9.9
4.5.9.29
4.5.9.22
4.5.9.14
4.5.9.13
4.5.12.28
4.5.12.12
4.5.11.23
4.5.10.15
4.5.10.14
10.0.5
10.0.4
10.0.3
10.0.2
10.0.1
10.0.0
1.00
1.0
توضیحات
CLE Loads Everything (at least, many binary formats!) and provides a pythonic interface to analyze what they are and what they would look like in memory.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cle-9.3.4 |
| نام | cle |
| نسخه کتابخانه | 9.3.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/cle/ |
| مجوز | - |
# CLE
[](https://pypi.python.org/pypi/cle/)
[](https://pypi.python.org/pypi/cle/)
[](https://pypistats.org/packages/cle)
[](https://github.com/angr/cle/blob/master/LICENSE)
CLE loads binaries and their associated libraries, resolves imports and
provides an abstraction of process memory the same way as if it was loader by
the OS's loader.
## Project Links
Project repository: https://github.com/angr/cle
Documentation: https://api.angr.io/projects/cle/en/latest/
## Installation
```sh
pip install cle
```
## Usage example
```python
>>> import cle
>>> ld = cle.Loader("/bin/ls")
>>> hex(ld.main_object.entry)
'0x4048d0'
>>> ld.shared_objects
{'ld-linux-x86-64.so.2': <ELF Object ld-2.21.so, maps [0x5000000:0x522312f]>,
'libacl.so.1': <ELF Object libacl.so.1.1.0, maps [0x2000000:0x220829f]>,
'libattr.so.1': <ELF Object libattr.so.1.1.0, maps [0x4000000:0x4204177]>,
'libc.so.6': <ELF Object libc-2.21.so, maps [0x3000000:0x33a1a0f]>,
'libcap.so.2': <ELF Object libcap.so.2.24, maps [0x1000000:0x1203c37]>}
>>> ld.addr_belongs_to_object(0x5000000)
<ELF Object ld-2.21.so, maps [0x5000000:0x522312f]>
>>> libc_main_reloc = ld.main_object.imports['__libc_start_main']
>>> hex(libc_main_reloc.addr) # Address of GOT entry for libc_start_main
'0x61c1c0'
>>> import pyvex
>>> some_text_data = ld.memory.load(ld.main_object.entry, 0x100)
>>> irsb = pyvex.lift(some_text_data, ld.main_object.entry, ld.main_object.arch)
>>> irsb.pp()
IRSB {
t0:Ity_I32 t1:Ity_I32 t2:Ity_I32 t3:Ity_I64 t4:Ity_I64 t5:Ity_I64 t6:Ity_I32 t7:Ity_I64 t8:Ity_I32 t9:Ity_I64 t10:Ity_I64 t11:Ity_I64 t12:Ity_I64 t13:Ity_I64 t14:Ity_I64
15 | ------ IMark(0x4048d0, 2, 0) ------
16 | t5 = 32Uto64(0x00000000)
17 | PUT(rbp) = t5
18 | t7 = GET:I64(rbp)
19 | t6 = 64to32(t7)
20 | t2 = t6
21 | t9 = GET:I64(rbp)
22 | t8 = 64to32(t9)
23 | t1 = t8
24 | t0 = Xor32(t2,t1)
25 | PUT(cc_op) = 0x0000000000000013
26 | t10 = 32Uto64(t0)
27 | PUT(cc_dep1) = t10
28 | PUT(cc_dep2) = 0x0000000000000000
29 | t11 = 32Uto64(t0)
30 | PUT(rbp) = t11
31 | PUT(rip) = 0x00000000004048d2
32 | ------ IMark(0x4048d2, 3, 0) ------
33 | t12 = GET:I64(rdx)
34 | PUT(r9) = t12
35 | PUT(rip) = 0x00000000004048d5
36 | ------ IMark(0x4048d5, 1, 0) ------
37 | t4 = GET:I64(rsp)
38 | t3 = LDle:I64(t4)
39 | t13 = Add64(t4,0x0000000000000008)
40 | PUT(rsp) = t13
41 | PUT(rsi) = t3
42 | PUT(rip) = 0x00000000004048d6
43 | t14 = GET:I64(rip)
NEXT: PUT(rip) = t14; Ijk_Boring
}
```
## Valid options
For a full listing and description of the options that can be provided to the
loader and the methods it provides, please examine the docstrings in
`cle/loader.py`. If anything is unclear or poorly documented (there is much)
please complain through whatever channel you feel appropriate.
## Loading Backends
CLE's loader is implemented in the Loader class.
There are several backends that can be used to load a single file:
- ELF, as its name says, loads ELF binaries. ELF files loaded this way are
statically parsed using PyElfTools.
- PE is a backend to load Microsoft's Portable Executable format,
effectively Windows binaries. It uses the (optional) `pefile` module.
- Mach-O is a backend to load, you guessed it, Mach-O binaries. Support is
limited for this backend.
- Blob is a backend to load unknown data. It requires that you specify
the architecture it would be run on, in the form of a class from
ArchInfo.
Which backend you use can be specified as an argument to Loader. If left
unspecified, the loader will pick a reasonable default.
## Finding shared libraries
- If the `auto_load_libs` option is set to False, the Loader will not
automatically load libraries requested by loaded objects. Otherwise...
- The loader determines which shared objects are needed when loading
binaries, and searches for them in the following order:
- in the current working directory
- in folders specified in the `ld_path` option
- in the same folder as the main binary
- in the system (in the corresponding library path for the architecture
of the binary, e.g., /usr/arm-linux-gnueabi/lib for ARM, note that
you need to install cross libraries for this, e.g.,
libc6-powerpc-cross on Debian - needs emdebian repos)
- in the system, but with mismatched version numbers from what is specified
as a dependency, if the `ignore_import_version_numbers` option is True
- If no binary is found with the correct architecture, the loader raises an
exception if `except_missing_libs` option is True. Otherwise it simply
leaves the dependencies unresolved.
نیازمندی
| مقدار | نام |
|---|---|
| - | archinfo==10.0.5 |
| - | arpy==1.1.1 |
| - | cart |
| - | minidump>=0.0.10 |
| - | pefile==2024.8.26 |
| - | pyelftools>=0.29 |
| - | pyvex==10.0.5 |
| - | pyxbe~=1.0.3 |
| ys_platfor | pyxdia~=0.1; |
| - | sortedcontainers>=2.0 |
| ys_platfor | uefi-firmware~=1.16; |
| xtr | pypcode>=1.1; |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.12 | Python |
نحوه نصب
نصب پکیج whl cle-9.3.4:
pip install cle.whl
نصب پکیج tar.gz cle-9.3.4:
pip install cle.tar.gz