blob: 47c9028281fd8a79f110bb5808b66f29c55a1e8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Eprouve quelques mécanismes de construction côté Python.
import pychrysalide
from pychrysalide.analysis.contents import FileContent
from pychrysalide.format.elf import ElfFormat
cnt = FileContent("non_existing_binary")
print(cnt)
print(cnt == None)
try:
fmt = ElfFormat(cnt)
except TypeError as e:
fmt = None
print(fmt)
print(fmt == None)
|