-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from CySHell/Non-Rtti_constructors
Non rtti constructors
- Loading branch information
Showing
26 changed files
with
233 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
from dataclasses import dataclass, field | ||
|
||
# {ClassName: ClassyClass} | ||
global_classes: dict = dict() | ||
|
||
|
||
def GenerateClassNameFromVtableAddr(vTable_addr: int) -> str: | ||
return f"class_{hex(vTable_addr)}_vfTable" | ||
|
||
|
||
@dataclass | ||
class ClassyClass: | ||
|
||
def __init__(self): | ||
self.name: str = '' | ||
self.size: int = 0 | ||
def __init__(self, name: str, vfTable_addr: int, constructors: list[int] = None, | ||
inherited_classes: list = None, vfTable_functions: list[int] = None, size: int = 0, | ||
namespace="", fields=None): | ||
|
||
self.name: str = name | ||
self.vfTable_addr: int = vfTable_addr | ||
self.constructors: list[int] = constructors if constructors else list() | ||
self.namespace: str = namespace | ||
self.size: int = size | ||
# fields - {offset: (<binaryninja.types>, <Field name>, Optional(Address in executable pointed to))} | ||
self.fields: dict = dict() | ||
self.fields: dict = fields if fields else dict() | ||
# list[ClassyClass] | ||
self.inherited_classes: list = inherited_classes if inherited_classes else list() | ||
# vfTable - A list of all function addresses in the table | ||
self.vfTable: list[int] = list() | ||
self.constructors: list[int] = list() | ||
self.inherited_classes: list[ClassyClass] = list() | ||
self.namespace: str = '' | ||
self.vfTable_functions: list[int] = vfTable_functions if vfTable_functions else list() | ||
|
||
global_classes.update({self.name: self}) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.