smda 2.4.0__tar.gz → 2.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {smda-2.4.0/smda.egg-info → smda-2.4.2}/PKG-INFO +18 -2
- {smda-2.4.0 → smda-2.4.2}/README.md +2 -0
- {smda-2.4.0 → smda-2.4.2}/setup.py +1 -1
- {smda-2.4.0 → smda-2.4.2}/smda/SmdaConfig.py +1 -1
- {smda-2.4.0 → smda-2.4.2}/smda/utility/PeFileLoader.py +11 -13
- {smda-2.4.0 → smda-2.4.2/smda.egg-info}/PKG-INFO +18 -2
- {smda-2.4.0 → smda-2.4.2}/smda.egg-info/SOURCES.txt +1 -5
- smda-2.4.2/tests/testPeFileLoader.py +24 -0
- {smda-2.4.0 → smda-2.4.2}/LICENSE +0 -0
- {smda-2.4.0 → smda-2.4.2}/pyproject.toml +0 -0
- {smda-2.4.0 → smda-2.4.2}/setup.cfg +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/Disassembler.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/DisassemblyResult.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/DisassemblyStatistics.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/__init__.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/cil/CilDisassembler.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/cil/CilInstructionEscaper.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/cil/FunctionAnalysisState.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/cil/__init__.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/BasicBlock.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/BinaryInfo.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/BlockLocator.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/CodeXref.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/DominatorTree.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/SmdaBasicBlock.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/SmdaFunction.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/SmdaInstruction.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/SmdaReport.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/TailcallAnalyzer.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/Tarjan.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/__init__.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/labelprovider/AbstractLabelProvider.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/labelprovider/CilSymbolProvider.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/labelprovider/DelphiKbSymbolProvider.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/labelprovider/DelphiReSymProvider.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/labelprovider/ElfApiResolver.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/labelprovider/ElfSymbolProvider.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/labelprovider/GoLabelProvider.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/labelprovider/OrdinalHelper.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/labelprovider/PdbSymbolProvider.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/labelprovider/PeSymbolProvider.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/labelprovider/WinApiResolver.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/common/labelprovider/__init__.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/ida/BackendInterface.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/ida/IdaExporter.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/ida/IdaInterface.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/ida/__init__.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/intel/BitnessAnalyzer.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/intel/FunctionAnalysisState.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/intel/FunctionCandidate.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/intel/FunctionCandidateManager.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/intel/IndirectCallAnalyzer.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/intel/IntelDisassembler.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/intel/IntelInstructionEscaper.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/intel/JumpTableAnalyzer.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/intel/LanguageAnalyzer.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/intel/MnemonicTfIdf.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/intel/__init__.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/intel/definitions.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/utility/BracketQueue.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/utility/DelphiKbFileLoader.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/utility/ElfFileLoader.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/utility/FileLoader.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/utility/MachoFileLoader.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/utility/MemoryFileLoader.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/utility/PriorityQueue.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/utility/StringExtractor.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda/utility/__init__.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda.egg-info/dependency_links.txt +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda.egg-info/requires.txt +0 -0
- {smda-2.4.0 → smda-2.4.2}/smda.egg-info/top_level.txt +0 -0
- {smda-2.4.0 → smda-2.4.2}/tests/testBracketQueue.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/tests/testEscaper.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/tests/testFileFormatParsers.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/tests/testIntegration.py +0 -0
- {smda-2.4.0 → smda-2.4.2}/tests/testTarjan.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: smda
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.2
|
|
4
4
|
Summary: A recursive disassmbler optimized for CFG recovery from memory dumps. Based on capstone.
|
|
5
5
|
Home-page: https://github.com/danielplohmann/smda
|
|
6
6
|
Author: Daniel Plohmann
|
|
@@ -15,6 +15,20 @@ Classifier: Topic :: Security
|
|
|
15
15
|
Classifier: Topic :: Software Development :: Disassemblers
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
|
+
Requires-Dist: capstone
|
|
19
|
+
Requires-Dist: dncil
|
|
20
|
+
Requires-Dist: dnfile
|
|
21
|
+
Requires-Dist: lief>=0.16.0
|
|
22
|
+
Dynamic: author
|
|
23
|
+
Dynamic: author-email
|
|
24
|
+
Dynamic: classifier
|
|
25
|
+
Dynamic: description
|
|
26
|
+
Dynamic: description-content-type
|
|
27
|
+
Dynamic: home-page
|
|
28
|
+
Dynamic: license
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
Dynamic: requires-dist
|
|
31
|
+
Dynamic: summary
|
|
18
32
|
|
|
19
33
|
|
|
20
34
|
# SMDA
|
|
@@ -119,6 +133,8 @@ make test
|
|
|
119
133
|
```
|
|
120
134
|
|
|
121
135
|
## Version History
|
|
136
|
+
* 2025-11-28: v2.4.2 - Fix for a bug when extracting and merging code areas from section tables. (THX: @r0ny123)
|
|
137
|
+
* 2025-11-28: v2.4.1 - Modernized packaging by also building a wheel. (THX: @dimbleby)
|
|
122
138
|
* 2025-11-21: v2.4.0 - Integration of DelphiReSym by @WenzWenzWenz for Delphi VMT parsing, thanks to @r0ny123 for adapting it!!
|
|
123
139
|
* 2025-10-21: v2.3.1 - Fixed lief error for section/segment flags in ELF files crashing file loading. Now properly parsing and providing symbol info for PEs in their own xmetadata section.
|
|
124
140
|
* 2025-10-21: v2.3.0 - Major code refactor and cleanup, with many thanks to the contribution @r0ny123!!
|
|
@@ -101,6 +101,8 @@ make test
|
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
## Version History
|
|
104
|
+
* 2025-11-28: v2.4.2 - Fix for a bug when extracting and merging code areas from section tables. (THX: @r0ny123)
|
|
105
|
+
* 2025-11-28: v2.4.1 - Modernized packaging by also building a wheel. (THX: @dimbleby)
|
|
104
106
|
* 2025-11-21: v2.4.0 - Integration of DelphiReSym by @WenzWenzWenz for Delphi VMT parsing, thanks to @r0ny123 for adapting it!!
|
|
105
107
|
* 2025-10-21: v2.3.1 - Fixed lief error for section/segment flags in ELF files crashing file loading. Now properly parsing and providing symbol info for PEs in their own xmetadata section.
|
|
106
108
|
* 2025-10-21: v2.3.0 - Major code refactor and cleanup, with many thanks to the contribution @r0ny123!!
|
|
@@ -12,7 +12,7 @@ requirements.append("lief>=0.16.0")
|
|
|
12
12
|
setup(
|
|
13
13
|
name="smda",
|
|
14
14
|
# note to self: always change this in config as well.
|
|
15
|
-
version="2.4.
|
|
15
|
+
version="2.4.2",
|
|
16
16
|
description="A recursive disassmbler optimized for CFG recovery from memory dumps. Based on capstone.",
|
|
17
17
|
long_description_content_type="text/markdown",
|
|
18
18
|
long_description=long_description,
|
|
@@ -4,7 +4,7 @@ import os
|
|
|
4
4
|
|
|
5
5
|
class SmdaConfig:
|
|
6
6
|
# note to self: always change this in setup.py as well!
|
|
7
|
-
VERSION = "2.4.
|
|
7
|
+
VERSION = "2.4.2"
|
|
8
8
|
ESCAPER_DOWNWARD_COMPATIBILITY = "1.13.16"
|
|
9
9
|
CONFIG_FILE_PATH = str(os.path.abspath(__file__))
|
|
10
10
|
PROJECT_ROOT = str(os.path.abspath(os.sep.join([CONFIG_FILE_PATH, "..", ".."])))
|
|
@@ -160,17 +160,15 @@ class PeFileLoader:
|
|
|
160
160
|
|
|
161
161
|
@staticmethod
|
|
162
162
|
def mergeCodeAreas(code_areas):
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
163
|
+
if not code_areas:
|
|
164
|
+
return []
|
|
165
|
+
sorted_areas = sorted(code_areas)
|
|
166
|
+
result = [sorted_areas[0]]
|
|
167
|
+
for i in range(1, len(sorted_areas)):
|
|
168
|
+
last_area = result[-1]
|
|
169
|
+
current_area = sorted_areas[i]
|
|
170
|
+
if last_area[1] == current_area[0]:
|
|
171
|
+
result[-1] = [last_area[0], current_area[1]]
|
|
172
172
|
else:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
)
|
|
176
|
-
return merged_code_areas
|
|
173
|
+
result.append(current_area)
|
|
174
|
+
return result
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: smda
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.2
|
|
4
4
|
Summary: A recursive disassmbler optimized for CFG recovery from memory dumps. Based on capstone.
|
|
5
5
|
Home-page: https://github.com/danielplohmann/smda
|
|
6
6
|
Author: Daniel Plohmann
|
|
@@ -15,6 +15,20 @@ Classifier: Topic :: Security
|
|
|
15
15
|
Classifier: Topic :: Software Development :: Disassemblers
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
|
+
Requires-Dist: capstone
|
|
19
|
+
Requires-Dist: dncil
|
|
20
|
+
Requires-Dist: dnfile
|
|
21
|
+
Requires-Dist: lief>=0.16.0
|
|
22
|
+
Dynamic: author
|
|
23
|
+
Dynamic: author-email
|
|
24
|
+
Dynamic: classifier
|
|
25
|
+
Dynamic: description
|
|
26
|
+
Dynamic: description-content-type
|
|
27
|
+
Dynamic: home-page
|
|
28
|
+
Dynamic: license
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
Dynamic: requires-dist
|
|
31
|
+
Dynamic: summary
|
|
18
32
|
|
|
19
33
|
|
|
20
34
|
# SMDA
|
|
@@ -119,6 +133,8 @@ make test
|
|
|
119
133
|
```
|
|
120
134
|
|
|
121
135
|
## Version History
|
|
136
|
+
* 2025-11-28: v2.4.2 - Fix for a bug when extracting and merging code areas from section tables. (THX: @r0ny123)
|
|
137
|
+
* 2025-11-28: v2.4.1 - Modernized packaging by also building a wheel. (THX: @dimbleby)
|
|
122
138
|
* 2025-11-21: v2.4.0 - Integration of DelphiReSym by @WenzWenzWenz for Delphi VMT parsing, thanks to @r0ny123 for adapting it!!
|
|
123
139
|
* 2025-10-21: v2.3.1 - Fixed lief error for section/segment flags in ELF files crashing file loading. Now properly parsing and providing symbol info for PEs in their own xmetadata section.
|
|
124
140
|
* 2025-10-21: v2.3.0 - Major code refactor and cleanup, with many thanks to the contribution @r0ny123!!
|
|
@@ -2,11 +2,6 @@ LICENSE
|
|
|
2
2
|
README.md
|
|
3
3
|
pyproject.toml
|
|
4
4
|
setup.py
|
|
5
|
-
./smda/Disassembler.py
|
|
6
|
-
./smda/DisassemblyResult.py
|
|
7
|
-
./smda/DisassemblyStatistics.py
|
|
8
|
-
./smda/SmdaConfig.py
|
|
9
|
-
./smda/__init__.py
|
|
10
5
|
smda/Disassembler.py
|
|
11
6
|
smda/DisassemblyResult.py
|
|
12
7
|
smda/DisassemblyStatistics.py
|
|
@@ -75,4 +70,5 @@ tests/testBracketQueue.py
|
|
|
75
70
|
tests/testEscaper.py
|
|
76
71
|
tests/testFileFormatParsers.py
|
|
77
72
|
tests/testIntegration.py
|
|
73
|
+
tests/testPeFileLoader.py
|
|
78
74
|
tests/testTarjan.py
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
|
|
3
|
+
from smda.utility.PeFileLoader import PeFileLoader
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class PeFileLoaderTestSuite(unittest.TestCase):
|
|
7
|
+
def test_mergeCodeAreas(self):
|
|
8
|
+
test_cases = [
|
|
9
|
+
("Overlapping intervals", [[1, 5], [3, 7], [8, 12]], [[1, 5], [3, 7], [8, 12]]),
|
|
10
|
+
("Contiguous intervals", [[1, 5], [5, 10], [10, 15]], [[1, 15]]),
|
|
11
|
+
("Unsorted contiguous intervals", [[10, 15], [1, 5], [5, 10]], [[1, 15]]),
|
|
12
|
+
("Separated intervals", [[1, 5], [6, 10], [11, 15]], [[1, 5], [6, 10], [11, 15]]),
|
|
13
|
+
("Empty list", [], []),
|
|
14
|
+
("Single interval", [[1, 5]], [[1, 5]]),
|
|
15
|
+
("Mixed intervals", [[1, 5], [5, 10], [11, 15], [15, 20]], [[1, 10], [11, 20]]),
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
for name, intervals, expected in test_cases:
|
|
19
|
+
with self.subTest(msg=name):
|
|
20
|
+
self.assertEqual(PeFileLoader.mergeCodeAreas(intervals), expected)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
if __name__ == "__main__":
|
|
24
|
+
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|