repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
angr/angr
angr/analyses/decompiler/clinic.py
Clinic._track_stack_pointers
def _track_stack_pointers(self): """ For each instruction, track its stack pointer offset and stack base pointer offset. :return: None """ regs = {self.project.arch.sp_offset} if hasattr(self.project.arch, 'bp_offset') and self.project.arch.bp_offset is not None: ...
python
def _track_stack_pointers(self): """ For each instruction, track its stack pointer offset and stack base pointer offset. :return: None """ regs = {self.project.arch.sp_offset} if hasattr(self.project.arch, 'bp_offset') and self.project.arch.bp_offset is not None: ...
[ "def", "_track_stack_pointers", "(", "self", ")", ":", "regs", "=", "{", "self", ".", "project", ".", "arch", ".", "sp_offset", "}", "if", "hasattr", "(", "self", ".", "project", ".", "arch", ",", "'bp_offset'", ")", "and", "self", ".", "project", ".",...
For each instruction, track its stack pointer offset and stack base pointer offset. :return: None
[ "For", "each", "instruction", "track", "its", "stack", "pointer", "offset", "and", "stack", "base", "pointer", "offset", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/decompiler/clinic.py#L107-L120
train
For each instruction track its stack pointer offset and stack base pointer offset.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/decompiler/clinic.py
Clinic._convert
def _convert(self, block_node): """ Convert a VEX block to an AIL block. :param block_node: A BlockNode instance. :return: An converted AIL block. :rtype: ailment.Block """ if not type(block_node) is BlockNode: return block_no...
python
def _convert(self, block_node): """ Convert a VEX block to an AIL block. :param block_node: A BlockNode instance. :return: An converted AIL block. :rtype: ailment.Block """ if not type(block_node) is BlockNode: return block_no...
[ "def", "_convert", "(", "self", ",", "block_node", ")", ":", "if", "not", "type", "(", "block_node", ")", "is", "BlockNode", ":", "return", "block_node", "block", "=", "self", ".", "project", ".", "factory", ".", "block", "(", "block_node", ".", "addr", ...
Convert a VEX block to an AIL block. :param block_node: A BlockNode instance. :return: An converted AIL block. :rtype: ailment.Block
[ "Convert", "a", "VEX", "block", "to", "an", "AIL", "block", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/decompiler/clinic.py#L134-L149
train
Convert a VEX block to an AIL block.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/decompiler/clinic.py
Clinic._simplify_blocks
def _simplify_blocks(self, stack_pointer_tracker=None): """ Simplify all blocks in self._blocks. :param stack_pointer_tracker: The RegisterDeltaTracker analysis instance. :return: None """ # First of all, let's simplify blocks one by one ...
python
def _simplify_blocks(self, stack_pointer_tracker=None): """ Simplify all blocks in self._blocks. :param stack_pointer_tracker: The RegisterDeltaTracker analysis instance. :return: None """ # First of all, let's simplify blocks one by one ...
[ "def", "_simplify_blocks", "(", "self", ",", "stack_pointer_tracker", "=", "None", ")", ":", "# First of all, let's simplify blocks one by one", "for", "key", "in", "self", ".", "_blocks", ":", "ail_block", "=", "self", ".", "_blocks", "[", "key", "]", "simplified...
Simplify all blocks in self._blocks. :param stack_pointer_tracker: The RegisterDeltaTracker analysis instance. :return: None
[ "Simplify", "all", "blocks", "in", "self", ".", "_blocks", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/decompiler/clinic.py#L151-L167
train
Simplify all blocks in the function graph.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/decompiler/clinic.py
Clinic._simplify_block
def _simplify_block(self, ail_block, stack_pointer_tracker=None): """ Simplify a single AIL block. :param ailment.Block ail_block: The AIL block to simplify. :param stack_pointer_tracker: The RegisterDeltaTracker analysis instance. :return: A simplified ...
python
def _simplify_block(self, ail_block, stack_pointer_tracker=None): """ Simplify a single AIL block. :param ailment.Block ail_block: The AIL block to simplify. :param stack_pointer_tracker: The RegisterDeltaTracker analysis instance. :return: A simplified ...
[ "def", "_simplify_block", "(", "self", ",", "ail_block", ",", "stack_pointer_tracker", "=", "None", ")", ":", "simp", "=", "self", ".", "project", ".", "analyses", ".", "AILBlockSimplifier", "(", "ail_block", ",", "stack_pointer_tracker", "=", "stack_pointer_track...
Simplify a single AIL block. :param ailment.Block ail_block: The AIL block to simplify. :param stack_pointer_tracker: The RegisterDeltaTracker analysis instance. :return: A simplified AIL block.
[ "Simplify", "a", "single", "AIL", "block", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/decompiler/clinic.py#L169-L179
train
Simplify a single AIL block.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/decompiler/clinic.py
Clinic._simplify_function
def _simplify_function(self): """ Simplify the entire function. :return: None """ # Computing reaching definitions rd = self.project.analyses.ReachingDefinitions(func=self.function, func_graph=self.graph, observe_all=True) simp = self.project.analyses.AILSim...
python
def _simplify_function(self): """ Simplify the entire function. :return: None """ # Computing reaching definitions rd = self.project.analyses.ReachingDefinitions(func=self.function, func_graph=self.graph, observe_all=True) simp = self.project.analyses.AILSim...
[ "def", "_simplify_function", "(", "self", ")", ":", "# Computing reaching definitions", "rd", "=", "self", ".", "project", ".", "analyses", ".", "ReachingDefinitions", "(", "func", "=", "self", ".", "function", ",", "func_graph", "=", "self", ".", "graph", ","...
Simplify the entire function. :return: None
[ "Simplify", "the", "entire", "function", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/decompiler/clinic.py#L181-L198
train
Simplify the entire function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/decompiler/clinic.py
Clinic._make_callsites
def _make_callsites(self, stack_pointer_tracker=None): """ Simplify all function call statements. :return: None """ # Computing reaching definitions rd = self.project.analyses.ReachingDefinitions(func=self.function, func_graph=self.graph, observe_all=True) f...
python
def _make_callsites(self, stack_pointer_tracker=None): """ Simplify all function call statements. :return: None """ # Computing reaching definitions rd = self.project.analyses.ReachingDefinitions(func=self.function, func_graph=self.graph, observe_all=True) f...
[ "def", "_make_callsites", "(", "self", ",", "stack_pointer_tracker", "=", "None", ")", ":", "# Computing reaching definitions", "rd", "=", "self", ".", "project", ".", "analyses", ".", "ReachingDefinitions", "(", "func", "=", "self", ".", "function", ",", "func_...
Simplify all function call statements. :return: None
[ "Simplify", "all", "function", "call", "statements", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/decompiler/clinic.py#L213-L231
train
Simplify all function call statements.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/decompiler/clinic.py
Clinic._link_variables_on_block
def _link_variables_on_block(self, block, kb): """ Link atoms (AIL expressions) in the given block to corresponding variables identified previously. :param ailment.Block block: The AIL block to work on. :return: None """ variable_manager = kb.variable...
python
def _link_variables_on_block(self, block, kb): """ Link atoms (AIL expressions) in the given block to corresponding variables identified previously. :param ailment.Block block: The AIL block to work on. :return: None """ variable_manager = kb.variable...
[ "def", "_link_variables_on_block", "(", "self", ",", "block", ",", "kb", ")", ":", "variable_manager", "=", "kb", ".", "variables", "[", "self", ".", "function", ".", "addr", "]", "for", "stmt_idx", ",", "stmt", "in", "enumerate", "(", "block", ".", "sta...
Link atoms (AIL expressions) in the given block to corresponding variables identified previously. :param ailment.Block block: The AIL block to work on. :return: None
[ "Link", "atoms", "(", "AIL", "expressions", ")", "in", "the", "given", "block", "to", "corresponding", "variables", "identified", "previously", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/decompiler/clinic.py#L244-L273
train
Link atoms in the given block to corresponding variables identified previously.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/decompiler/clinic.py
Clinic._link_variables_on_expr
def _link_variables_on_expr(self, variable_manager, block, stmt_idx, stmt, expr): """ Link atoms (AIL expressions) in the given expression to corresponding variables identified previously. :param variable_manager: Variable manager of the function. :param ailment.Block block: AIL bloc...
python
def _link_variables_on_expr(self, variable_manager, block, stmt_idx, stmt, expr): """ Link atoms (AIL expressions) in the given expression to corresponding variables identified previously. :param variable_manager: Variable manager of the function. :param ailment.Block block: AIL bloc...
[ "def", "_link_variables_on_expr", "(", "self", ",", "variable_manager", ",", "block", ",", "stmt_idx", ",", "stmt", ",", "expr", ")", ":", "if", "type", "(", "expr", ")", "is", "ailment", ".", "Expr", ".", "Register", ":", "# find a register variable", "reg_...
Link atoms (AIL expressions) in the given expression to corresponding variables identified previously. :param variable_manager: Variable manager of the function. :param ailment.Block block: AIL block. :param int stmt_idx: ID of the statement. :param stmt: The AI...
[ "Link", "atoms", "(", "AIL", "expressions", ")", "in", "the", "given", "expression", "to", "corresponding", "variables", "identified", "previously", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/decompiler/clinic.py#L275-L337
train
Link atoms in the given expression to corresponding variables identified previously.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/state_plugins/javavm_classloader.py
SimJavaVmClassloader.get_class
def get_class(self, class_name, init_class=False, step_func=None): """ Get a class descriptor for the class. :param str class_name: Name of class. :param bool init_class: Whether the class initializer <clinit> should be executed. :param func step...
python
def get_class(self, class_name, init_class=False, step_func=None): """ Get a class descriptor for the class. :param str class_name: Name of class. :param bool init_class: Whether the class initializer <clinit> should be executed. :param func step...
[ "def", "get_class", "(", "self", ",", "class_name", ",", "init_class", "=", "False", ",", "step_func", "=", "None", ")", ":", "# try to get the soot class object from CLE", "java_binary", "=", "self", ".", "state", ".", "javavm_registers", ".", "load", "(", "'ip...
Get a class descriptor for the class. :param str class_name: Name of class. :param bool init_class: Whether the class initializer <clinit> should be executed. :param func step_func: Callback function executed at every step of the simulation manager during ...
[ "Get", "a", "class", "descriptor", "for", "the", "class", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/javavm_classloader.py#L23-L41
train
Get a class descriptor for the class.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/state_plugins/javavm_classloader.py
SimJavaVmClassloader.get_superclass
def get_superclass(self, class_): """ Get the superclass of the class. """ if not class_.is_loaded or class_.superclass_name is None: return None return self.get_class(class_.superclass_name)
python
def get_superclass(self, class_): """ Get the superclass of the class. """ if not class_.is_loaded or class_.superclass_name is None: return None return self.get_class(class_.superclass_name)
[ "def", "get_superclass", "(", "self", ",", "class_", ")", ":", "if", "not", "class_", ".", "is_loaded", "or", "class_", ".", "superclass_name", "is", "None", ":", "return", "None", "return", "self", ".", "get_class", "(", "class_", ".", "superclass_name", ...
Get the superclass of the class.
[ "Get", "the", "superclass", "of", "the", "class", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/javavm_classloader.py#L43-L49
train
Get the superclass of the class.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/state_plugins/javavm_classloader.py
SimJavaVmClassloader.get_class_hierarchy
def get_class_hierarchy(self, base_class): """ Walks up the class hierarchy and returns a list of all classes between base class (inclusive) and java.lang.Object (exclusive). """ classes = [base_class] while classes[-1] is not None and classes[-1] != "java.lang.Object": ...
python
def get_class_hierarchy(self, base_class): """ Walks up the class hierarchy and returns a list of all classes between base class (inclusive) and java.lang.Object (exclusive). """ classes = [base_class] while classes[-1] is not None and classes[-1] != "java.lang.Object": ...
[ "def", "get_class_hierarchy", "(", "self", ",", "base_class", ")", ":", "classes", "=", "[", "base_class", "]", "while", "classes", "[", "-", "1", "]", "is", "not", "None", "and", "classes", "[", "-", "1", "]", "!=", "\"java.lang.Object\"", ":", "classes...
Walks up the class hierarchy and returns a list of all classes between base class (inclusive) and java.lang.Object (exclusive).
[ "Walks", "up", "the", "class", "hierarchy", "and", "returns", "a", "list", "of", "all", "classes", "between", "base", "class", "(", "inclusive", ")", "and", "java", ".", "lang", ".", "Object", "(", "exclusive", ")", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/javavm_classloader.py#L51-L59
train
Walks up the class hierarchy and returns a list of all classes between base_class and java. lang. Object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/state_plugins/javavm_classloader.py
SimJavaVmClassloader.init_class
def init_class(self, class_, step_func=None): """ This method simulates the loading of a class by the JVM, during which parts of the class (e.g. static fields) are initialized. For this, we run the class initializer method <clinit> (if available) and update the state accordingly....
python
def init_class(self, class_, step_func=None): """ This method simulates the loading of a class by the JVM, during which parts of the class (e.g. static fields) are initialized. For this, we run the class initializer method <clinit> (if available) and update the state accordingly....
[ "def", "init_class", "(", "self", ",", "class_", ",", "step_func", "=", "None", ")", ":", "if", "self", ".", "is_class_initialized", "(", "class_", ")", ":", "l", ".", "debug", "(", "\"Class %r already initialized.\"", ",", "class_", ")", "return", "l", "....
This method simulates the loading of a class by the JVM, during which parts of the class (e.g. static fields) are initialized. For this, we run the class initializer method <clinit> (if available) and update the state accordingly. Note: Initialization is skipped, if the class has alread...
[ "This", "method", "simulates", "the", "loading", "of", "a", "class", "by", "the", "JVM", "during", "which", "parts", "of", "the", "class", "(", "e", ".", "g", ".", "static", "fields", ")", "are", "initialized", ".", "For", "this", "we", "run", "the", ...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/javavm_classloader.py#L68-L106
train
Initializes the class.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/blade.py
Blade._get_irsb
def _get_irsb(self, v): """ Get the IRSB object from an address, a SimRun, or a CFGNode. :param v: Can be one of the following: an address, or a CFGNode. :return: The IRSB instance. :rtype: pyvex.IRSB """ if isinstance(v, CFGNode): v = v.addr ...
python
def _get_irsb(self, v): """ Get the IRSB object from an address, a SimRun, or a CFGNode. :param v: Can be one of the following: an address, or a CFGNode. :return: The IRSB instance. :rtype: pyvex.IRSB """ if isinstance(v, CFGNode): v = v.addr ...
[ "def", "_get_irsb", "(", "self", ",", "v", ")", ":", "if", "isinstance", "(", "v", ",", "CFGNode", ")", ":", "v", "=", "v", ".", "addr", "if", "type", "(", "v", ")", "is", "int", ":", "# Generate an IRSB from self._project", "if", "v", "in", "self", ...
Get the IRSB object from an address, a SimRun, or a CFGNode. :param v: Can be one of the following: an address, or a CFGNode. :return: The IRSB instance. :rtype: pyvex.IRSB
[ "Get", "the", "IRSB", "object", "from", "an", "address", "a", "SimRun", "or", "a", "CFGNode", ".", ":", "param", "v", ":", "Can", "be", "one", "of", "the", "following", ":", "an", "address", "or", "a", "CFGNode", ".", ":", "return", ":", "The", "IR...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/blade.py#L133-L158
train
Get the IRSB object from an address a SimRun or a CFGNode.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/blade.py
Blade._get_addr
def _get_addr(self, v): """ Get address of the basic block or CFG node specified by v. :param v: Can be one of the following: a CFGNode, or an address. :return: The address. :rtype: int """ if isinstance(v, CFGNode): return v.addr elif type(v)...
python
def _get_addr(self, v): """ Get address of the basic block or CFG node specified by v. :param v: Can be one of the following: a CFGNode, or an address. :return: The address. :rtype: int """ if isinstance(v, CFGNode): return v.addr elif type(v)...
[ "def", "_get_addr", "(", "self", ",", "v", ")", ":", "if", "isinstance", "(", "v", ",", "CFGNode", ")", ":", "return", "v", ".", "addr", "elif", "type", "(", "v", ")", "is", "int", ":", "return", "v", "else", ":", "raise", "AngrBladeError", "(", ...
Get address of the basic block or CFG node specified by v. :param v: Can be one of the following: a CFGNode, or an address. :return: The address. :rtype: int
[ "Get", "address", "of", "the", "basic", "block", "or", "CFG", "node", "specified", "by", "v", ".", ":", "param", "v", ":", "Can", "be", "one", "of", "the", "following", ":", "a", "CFGNode", "or", "an", "address", ".", ":", "return", ":", "The", "ad...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/blade.py#L171-L184
train
Get the address of the basic block or CFG node specified by v.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/blade.py
Blade._backward_slice
def _backward_slice(self): """ Backward slicing. We support the following IRStmts: # WrTmp # Put We support the following IRExprs: # Get # RdTmp # Const :return: """ temps = set() regs = set() # Retrieve...
python
def _backward_slice(self): """ Backward slicing. We support the following IRStmts: # WrTmp # Put We support the following IRExprs: # Get # RdTmp # Const :return: """ temps = set() regs = set() # Retrieve...
[ "def", "_backward_slice", "(", "self", ")", ":", "temps", "=", "set", "(", ")", "regs", "=", "set", "(", ")", "# Retrieve the target: are we slicing from a register(IRStmt.Put), or a temp(IRStmt.WrTmp)?", "try", ":", "stmts", "=", "self", ".", "_get_irsb", "(", "sel...
Backward slicing. We support the following IRStmts: # WrTmp # Put We support the following IRExprs: # Get # RdTmp # Const :return:
[ "Backward", "slicing", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/blade.py#L200-L287
train
This method is used to forward slicing the current entry point.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/engines/vex/ccall.py
pc_calculate_condition_simple
def pc_calculate_condition_simple(state, cond, cc_op, cc_dep1, cc_dep2, cc_ndep, platform=None): """ A simplified version of pc_calculate_condition(). Please refer to the documentation of Simplified CCalls above. Limitation: symbolic flags are not supported for now. """ if state.solver.symbolic(co...
python
def pc_calculate_condition_simple(state, cond, cc_op, cc_dep1, cc_dep2, cc_ndep, platform=None): """ A simplified version of pc_calculate_condition(). Please refer to the documentation of Simplified CCalls above. Limitation: symbolic flags are not supported for now. """ if state.solver.symbolic(co...
[ "def", "pc_calculate_condition_simple", "(", "state", ",", "cond", ",", "cc_op", ",", "cc_dep1", ",", "cc_dep2", ",", "cc_ndep", ",", "platform", "=", "None", ")", ":", "if", "state", ".", "solver", ".", "symbolic", "(", "cond", ")", ":", "raise", "SimEr...
A simplified version of pc_calculate_condition(). Please refer to the documentation of Simplified CCalls above. Limitation: symbolic flags are not supported for now.
[ "A", "simplified", "version", "of", "pc_calculate_condition", "()", ".", "Please", "refer", "to", "the", "documentation", "of", "Simplified", "CCalls", "above", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/vex/ccall.py#L729-L778
train
Simple version of the function pc_calculate_condition.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/engines/vex/ccall.py
_concat_flags
def _concat_flags(nbits, flags_vec): """ Concatenate different flag BVs to a single BV. Currently used for ARM, X86 and AMD64. :param nbits : platform size in bits. :param flags_vec: vector of flag BVs and their offset in the resulting BV. :type nbits : int :type flags_vec : list ...
python
def _concat_flags(nbits, flags_vec): """ Concatenate different flag BVs to a single BV. Currently used for ARM, X86 and AMD64. :param nbits : platform size in bits. :param flags_vec: vector of flag BVs and their offset in the resulting BV. :type nbits : int :type flags_vec : list ...
[ "def", "_concat_flags", "(", "nbits", ",", "flags_vec", ")", ":", "result", "=", "claripy", ".", "BVV", "(", "0", ",", "0", ")", "for", "offset", ",", "bit", "in", "flags_vec", ":", "current_position", "=", "nbits", "-", "1", "-", "result", ".", "len...
Concatenate different flag BVs to a single BV. Currently used for ARM, X86 and AMD64. :param nbits : platform size in bits. :param flags_vec: vector of flag BVs and their offset in the resulting BV. :type nbits : int :type flags_vec : list :return : the resulting flag BV. :r...
[ "Concatenate", "different", "flag", "BVs", "to", "a", "single", "BV", ".", "Currently", "used", "for", "ARM", "X86", "and", "AMD64", ".", ":", "param", "nbits", ":", "platform", "size", "in", "bits", ".", ":", "param", "flags_vec", ":", "vector", "of", ...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/vex/ccall.py#L1718-L1737
train
Concatenate different flag BVs to a single BV. Currently used for ARM X86 and AMD64.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/decompiler/region_simplifier.py
RegionSimplifier._simplify
def _simplify(self): """ RegionSimplifier performs the following simplifications: - Remove redundant Gotos - Remove redundant If/If-else statements """ r = self.region r = self._simplify_gotos(r) r = self._simplify_ifs(r) self.result = r
python
def _simplify(self): """ RegionSimplifier performs the following simplifications: - Remove redundant Gotos - Remove redundant If/If-else statements """ r = self.region r = self._simplify_gotos(r) r = self._simplify_ifs(r) self.result = r
[ "def", "_simplify", "(", "self", ")", ":", "r", "=", "self", ".", "region", "r", "=", "self", ".", "_simplify_gotos", "(", "r", ")", "r", "=", "self", ".", "_simplify_ifs", "(", "r", ")", "self", ".", "result", "=", "r" ]
RegionSimplifier performs the following simplifications: - Remove redundant Gotos - Remove redundant If/If-else statements
[ "RegionSimplifier", "performs", "the", "following", "simplifications", ":", "-", "Remove", "redundant", "Gotos", "-", "Remove", "redundant", "If", "/", "If", "-", "else", "statements" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/decompiler/region_simplifier.py#L38-L49
train
Simplify the set of entries in the region.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/serializable.py
Serializable.parse
def parse(cls, s, **kwargs): """ Parse a bytes object and create a class object. :param bytes s: A bytes object. :return: A class object. :rtype: cls """ pb2_obj = cls._get_cmsg() pb2_obj.ParseFromString(s) return cls.parse_from_c...
python
def parse(cls, s, **kwargs): """ Parse a bytes object and create a class object. :param bytes s: A bytes object. :return: A class object. :rtype: cls """ pb2_obj = cls._get_cmsg() pb2_obj.ParseFromString(s) return cls.parse_from_c...
[ "def", "parse", "(", "cls", ",", "s", ",", "*", "*", "kwargs", ")", ":", "pb2_obj", "=", "cls", ".", "_get_cmsg", "(", ")", "pb2_obj", ".", "ParseFromString", "(", "s", ")", "return", "cls", ".", "parse_from_cmessage", "(", "pb2_obj", ",", "*", "*", ...
Parse a bytes object and create a class object. :param bytes s: A bytes object. :return: A class object. :rtype: cls
[ "Parse", "a", "bytes", "object", "and", "create", "a", "class", "object", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/serializable.py#L52-L64
train
Parse a bytes object and create a class object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/state_plugins/javavm_memory.py
SimJavaVmMemory.store_array_elements
def store_array_elements(self, array, start_idx, data): """ Stores either a single element or a range of elements in the array. :param array: Reference to the array. :param start_idx: Starting index for the store. :param data: Either a single value or a list of values. ...
python
def store_array_elements(self, array, start_idx, data): """ Stores either a single element or a range of elements in the array. :param array: Reference to the array. :param start_idx: Starting index for the store. :param data: Either a single value or a list of values. ...
[ "def", "store_array_elements", "(", "self", ",", "array", ",", "start_idx", ",", "data", ")", ":", "# we process data as a list of elements", "# => if there is only a single element, wrap it in a list", "data", "=", "data", "if", "isinstance", "(", "data", ",", "list", ...
Stores either a single element or a range of elements in the array. :param array: Reference to the array. :param start_idx: Starting index for the store. :param data: Either a single value or a list of values.
[ "Stores", "either", "a", "single", "element", "or", "a", "range", "of", "elements", "in", "the", "array", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/javavm_memory.py#L133-L180
train
Stores the elements of the array in the memory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/state_plugins/javavm_memory.py
SimJavaVmMemory.load_array_elements
def load_array_elements(self, array, start_idx, no_of_elements): """ Loads either a single element or a range of elements from the array. :param array: Reference to the array. :param start_idx: Starting index for the load. :param no_of_elements: Number of elemen...
python
def load_array_elements(self, array, start_idx, no_of_elements): """ Loads either a single element or a range of elements from the array. :param array: Reference to the array. :param start_idx: Starting index for the load. :param no_of_elements: Number of elemen...
[ "def", "load_array_elements", "(", "self", ",", "array", ",", "start_idx", ",", "no_of_elements", ")", ":", "# concretize start index", "concrete_start_idxes", "=", "self", ".", "concretize_load_idx", "(", "start_idx", ")", "if", "len", "(", "concrete_start_idxes", ...
Loads either a single element or a range of elements from the array. :param array: Reference to the array. :param start_idx: Starting index for the load. :param no_of_elements: Number of elements to load.
[ "Loads", "either", "a", "single", "element", "or", "a", "range", "of", "elements", "from", "the", "array", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/javavm_memory.py#L198-L252
train
Loads a range of elements from the array.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/state_plugins/javavm_memory.py
SimJavaVmMemory._apply_concretization_strategies
def _apply_concretization_strategies(self, idx, strategies, action): # pylint: disable=unused-argument """ Applies concretization strategies on the index, until one of them succeeds. """ for s in strategies: try: idxes = s.concretize(self, idx) ex...
python
def _apply_concretization_strategies(self, idx, strategies, action): # pylint: disable=unused-argument """ Applies concretization strategies on the index, until one of them succeeds. """ for s in strategies: try: idxes = s.concretize(self, idx) ex...
[ "def", "_apply_concretization_strategies", "(", "self", ",", "idx", ",", "strategies", ",", "action", ")", ":", "# pylint: disable=unused-argument", "for", "s", "in", "strategies", ":", "try", ":", "idxes", "=", "s", ".", "concretize", "(", "self", ",", "idx",...
Applies concretization strategies on the index, until one of them succeeds.
[ "Applies", "concretization", "strategies", "on", "the", "index", "until", "one", "of", "them", "succeeds", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/javavm_memory.py#L272-L286
train
Applies concretization strategies on the index until one of them succeeds.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/state_plugins/javavm_memory.py
SimJavaVmMemory.concretize_store_idx
def concretize_store_idx(self, idx, strategies=None): """ Concretizes a store index. :param idx: An expression for the index. :param strategies: A list of concretization strategies (to override the default). :param min_idx: Minimum value for a concretize...
python
def concretize_store_idx(self, idx, strategies=None): """ Concretizes a store index. :param idx: An expression for the index. :param strategies: A list of concretization strategies (to override the default). :param min_idx: Minimum value for a concretize...
[ "def", "concretize_store_idx", "(", "self", ",", "idx", ",", "strategies", "=", "None", ")", ":", "if", "isinstance", "(", "idx", ",", "int", ")", ":", "return", "[", "idx", "]", "elif", "not", "self", ".", "state", ".", "solver", ".", "symbolic", "(...
Concretizes a store index. :param idx: An expression for the index. :param strategies: A list of concretization strategies (to override the default). :param min_idx: Minimum value for a concretized index (inclusive). :param max_idx: Maximum value for a c...
[ "Concretizes", "a", "store", "index", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/javavm_memory.py#L288-L304
train
Concretizes a store index.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/state_plugins/javavm_memory.py
SimJavaVmMemory.concretize_load_idx
def concretize_load_idx(self, idx, strategies=None): """ Concretizes a load index. :param idx: An expression for the index. :param strategies: A list of concretization strategies (to override the default). :param min_idx: Minimum value for a concretized ...
python
def concretize_load_idx(self, idx, strategies=None): """ Concretizes a load index. :param idx: An expression for the index. :param strategies: A list of concretization strategies (to override the default). :param min_idx: Minimum value for a concretized ...
[ "def", "concretize_load_idx", "(", "self", ",", "idx", ",", "strategies", "=", "None", ")", ":", "if", "isinstance", "(", "idx", ",", "int", ")", ":", "return", "[", "idx", "]", "elif", "not", "self", ".", "state", ".", "solver", ".", "symbolic", "("...
Concretizes a load index. :param idx: An expression for the index. :param strategies: A list of concretization strategies (to override the default). :param min_idx: Minimum value for a concretized index (inclusive). :param max_idx: Maximum value for a co...
[ "Concretizes", "a", "load", "index", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/javavm_memory.py#L306-L322
train
Concretizes a load index.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated.copy
def copy(self): """ Make a copy of the CFG. :return: A copy of the CFG instance. :rtype: angr.analyses.CFG """ new_cfg = CFGEmulated.__new__(CFGEmulated) super(CFGEmulated, self).make_copy(new_cfg) new_cfg._indirect_jump_target_limit = self._indirect_jum...
python
def copy(self): """ Make a copy of the CFG. :return: A copy of the CFG instance. :rtype: angr.analyses.CFG """ new_cfg = CFGEmulated.__new__(CFGEmulated) super(CFGEmulated, self).make_copy(new_cfg) new_cfg._indirect_jump_target_limit = self._indirect_jum...
[ "def", "copy", "(", "self", ")", ":", "new_cfg", "=", "CFGEmulated", ".", "__new__", "(", "CFGEmulated", ")", "super", "(", "CFGEmulated", ",", "self", ")", ".", "make_copy", "(", "new_cfg", ")", "new_cfg", ".", "_indirect_jump_target_limit", "=", "self", ...
Make a copy of the CFG. :return: A copy of the CFG instance. :rtype: angr.analyses.CFG
[ "Make", "a", "copy", "of", "the", "CFG", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L309-L335
train
Make a copy of the CFG.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated.resume
def resume(self, starts=None, max_steps=None): """ Resume a paused or terminated control flow graph recovery. :param iterable starts: A collection of new starts to resume from. If `starts` is None, we will resume CFG recovery from where it was paused before. ...
python
def resume(self, starts=None, max_steps=None): """ Resume a paused or terminated control flow graph recovery. :param iterable starts: A collection of new starts to resume from. If `starts` is None, we will resume CFG recovery from where it was paused before. ...
[ "def", "resume", "(", "self", ",", "starts", "=", "None", ",", "max_steps", "=", "None", ")", ":", "self", ".", "_starts", "=", "starts", "self", ".", "_max_steps", "=", "max_steps", "self", ".", "_sanitize_starts", "(", ")", "self", ".", "_analyze", "...
Resume a paused or terminated control flow graph recovery. :param iterable starts: A collection of new starts to resume from. If `starts` is None, we will resume CFG recovery from where it was paused before. :param int max_steps: The maximum number of blocks on the lon...
[ "Resume", "a", "paused", "or", "terminated", "control", "flow", "graph", "recovery", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L337-L353
train
Resume a paused or terminated control flow graph recovery.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated.remove_cycles
def remove_cycles(self): """ Forces graph to become acyclic, removes all loop back edges and edges between overlapped loop headers and their successors. """ # loop detection # only detect loops after potential graph normalization if not self._loop_back_edges: ...
python
def remove_cycles(self): """ Forces graph to become acyclic, removes all loop back edges and edges between overlapped loop headers and their successors. """ # loop detection # only detect loops after potential graph normalization if not self._loop_back_edges: ...
[ "def", "remove_cycles", "(", "self", ")", ":", "# loop detection", "# only detect loops after potential graph normalization", "if", "not", "self", ".", "_loop_back_edges", ":", "l", ".", "debug", "(", "\"Detecting loops...\"", ")", "self", ".", "_detect_loops", "(", "...
Forces graph to become acyclic, removes all loop back edges and edges between overlapped loop headers and their successors.
[ "Forces", "graph", "to", "become", "acyclic", "removes", "all", "loop", "back", "edges", "and", "edges", "between", "overlapped", "loop", "headers", "and", "their", "successors", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L355-L379
train
Removes all cycles from the current graph.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated.unroll_loops
def unroll_loops(self, max_loop_unrolling_times): """ Unroll loops for each function. The resulting CFG may still contain loops due to recursion, function calls, etc. :param int max_loop_unrolling_times: The maximum iterations of unrolling. :return: None """ if not isin...
python
def unroll_loops(self, max_loop_unrolling_times): """ Unroll loops for each function. The resulting CFG may still contain loops due to recursion, function calls, etc. :param int max_loop_unrolling_times: The maximum iterations of unrolling. :return: None """ if not isin...
[ "def", "unroll_loops", "(", "self", ",", "max_loop_unrolling_times", ")", ":", "if", "not", "isinstance", "(", "max_loop_unrolling_times", ",", "int", ")", "or", "max_loop_unrolling_times", "<", "0", ":", "raise", "AngrCFGError", "(", "'Max loop unrolling times must b...
Unroll loops for each function. The resulting CFG may still contain loops due to recursion, function calls, etc. :param int max_loop_unrolling_times: The maximum iterations of unrolling. :return: None
[ "Unroll", "loops", "for", "each", "function", ".", "The", "resulting", "CFG", "may", "still", "contain", "loops", "due", "to", "recursion", "function", "calls", "etc", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L391-L444
train
Unroll loops for each function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated.force_unroll_loops
def force_unroll_loops(self, max_loop_unrolling_times): """ Unroll loops globally. The resulting CFG does not contain any loop, but this method is slow on large graphs. :param int max_loop_unrolling_times: The maximum iterations of unrolling. :return: None """ if not is...
python
def force_unroll_loops(self, max_loop_unrolling_times): """ Unroll loops globally. The resulting CFG does not contain any loop, but this method is slow on large graphs. :param int max_loop_unrolling_times: The maximum iterations of unrolling. :return: None """ if not is...
[ "def", "force_unroll_loops", "(", "self", ",", "max_loop_unrolling_times", ")", ":", "if", "not", "isinstance", "(", "max_loop_unrolling_times", ",", "int", ")", "or", "max_loop_unrolling_times", "<", "0", ":", "raise", "AngrCFGError", "(", "'Max loop unrolling times ...
Unroll loops globally. The resulting CFG does not contain any loop, but this method is slow on large graphs. :param int max_loop_unrolling_times: The maximum iterations of unrolling. :return: None
[ "Unroll", "loops", "globally", ".", "The", "resulting", "CFG", "does", "not", "contain", "any", "loop", "but", "this", "method", "is", "slow", "on", "large", "graphs", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L446-L562
train
Unroll loops globally.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated.immediate_dominators
def immediate_dominators(self, start, target_graph=None): """ Get all immediate dominators of sub graph from given node upwards. :param str start: id of the node to navigate forwards from. :param networkx.classes.digraph.DiGraph target_graph: graph to analyse, default is self.graph. ...
python
def immediate_dominators(self, start, target_graph=None): """ Get all immediate dominators of sub graph from given node upwards. :param str start: id of the node to navigate forwards from. :param networkx.classes.digraph.DiGraph target_graph: graph to analyse, default is self.graph. ...
[ "def", "immediate_dominators", "(", "self", ",", "start", ",", "target_graph", "=", "None", ")", ":", "return", "self", ".", "_immediate_dominators", "(", "start", ",", "target_graph", "=", "target_graph", ",", "reverse_graph", "=", "False", ")" ]
Get all immediate dominators of sub graph from given node upwards. :param str start: id of the node to navigate forwards from. :param networkx.classes.digraph.DiGraph target_graph: graph to analyse, default is self.graph. :return: each node of graph as index values, with element as respective ...
[ "Get", "all", "immediate", "dominators", "of", "sub", "graph", "from", "given", "node", "upwards", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L564-L574
train
Get all immediate dominators of sub graph from given node upwards.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated.immediate_postdominators
def immediate_postdominators(self, end, target_graph=None): """ Get all immediate postdominators of sub graph from given node upwards. :param str start: id of the node to navigate forwards from. :param networkx.classes.digraph.DiGraph target_graph: graph to analyse, default is self.grap...
python
def immediate_postdominators(self, end, target_graph=None): """ Get all immediate postdominators of sub graph from given node upwards. :param str start: id of the node to navigate forwards from. :param networkx.classes.digraph.DiGraph target_graph: graph to analyse, default is self.grap...
[ "def", "immediate_postdominators", "(", "self", ",", "end", ",", "target_graph", "=", "None", ")", ":", "return", "self", ".", "_immediate_dominators", "(", "end", ",", "target_graph", "=", "target_graph", ",", "reverse_graph", "=", "True", ")" ]
Get all immediate postdominators of sub graph from given node upwards. :param str start: id of the node to navigate forwards from. :param networkx.classes.digraph.DiGraph target_graph: graph to analyse, default is self.graph. :return: each node of graph as index values, with element as respect...
[ "Get", "all", "immediate", "postdominators", "of", "sub", "graph", "from", "given", "node", "upwards", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L576-L586
train
Get all immediate postdominators of sub graph from given node upwards.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated.remove_fakerets
def remove_fakerets(self): """ Get rid of fake returns (i.e., Ijk_FakeRet edges) from this CFG :return: None """ fakeret_edges = [ (src, dst) for src, dst, data in self.graph.edges(data=True) if data['jumpkind'] == 'Ijk_FakeRet' ] self.graph.remo...
python
def remove_fakerets(self): """ Get rid of fake returns (i.e., Ijk_FakeRet edges) from this CFG :return: None """ fakeret_edges = [ (src, dst) for src, dst, data in self.graph.edges(data=True) if data['jumpkind'] == 'Ijk_FakeRet' ] self.graph.remo...
[ "def", "remove_fakerets", "(", "self", ")", ":", "fakeret_edges", "=", "[", "(", "src", ",", "dst", ")", "for", "src", ",", "dst", ",", "data", "in", "self", ".", "graph", ".", "edges", "(", "data", "=", "True", ")", "if", "data", "[", "'jumpkind'"...
Get rid of fake returns (i.e., Ijk_FakeRet edges) from this CFG :return: None
[ "Get", "rid", "of", "fake", "returns", "(", "i", ".", "e", ".", "Ijk_FakeRet", "edges", ")", "from", "this", "CFG" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L588-L596
train
Remove fake returns from this CFG
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated.get_topological_order
def get_topological_order(self, cfg_node): """ Get the topological order of a CFG Node. :param cfg_node: A CFGNode instance. :return: An integer representing its order, or None if the CFGNode does not exist in the graph. """ if not self._quasi_topological_order: ...
python
def get_topological_order(self, cfg_node): """ Get the topological order of a CFG Node. :param cfg_node: A CFGNode instance. :return: An integer representing its order, or None if the CFGNode does not exist in the graph. """ if not self._quasi_topological_order: ...
[ "def", "get_topological_order", "(", "self", ",", "cfg_node", ")", ":", "if", "not", "self", ".", "_quasi_topological_order", ":", "self", ".", "_quasi_topological_sort", "(", ")", "return", "self", ".", "_quasi_topological_order", ".", "get", "(", "cfg_node", "...
Get the topological order of a CFG Node. :param cfg_node: A CFGNode instance. :return: An integer representing its order, or None if the CFGNode does not exist in the graph.
[ "Get", "the", "topological", "order", "of", "a", "CFG", "Node", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L598-L609
train
Get the topological order of a CFG Node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated.get_subgraph
def get_subgraph(self, starting_node, block_addresses): """ Get a sub-graph out of a bunch of basic block addresses. :param CFGNode starting_node: The beginning of the subgraph :param iterable block_addresses: A collection of block addresses that should be included in the subgraph if ...
python
def get_subgraph(self, starting_node, block_addresses): """ Get a sub-graph out of a bunch of basic block addresses. :param CFGNode starting_node: The beginning of the subgraph :param iterable block_addresses: A collection of block addresses that should be included in the subgraph if ...
[ "def", "get_subgraph", "(", "self", ",", "starting_node", ",", "block_addresses", ")", ":", "graph", "=", "networkx", ".", "DiGraph", "(", ")", "if", "starting_node", "not", "in", "self", ".", "graph", ":", "raise", "AngrCFGError", "(", "'get_subgraph(): the s...
Get a sub-graph out of a bunch of basic block addresses. :param CFGNode starting_node: The beginning of the subgraph :param iterable block_addresses: A collection of block addresses that should be included in the subgraph if there is a path between `starting_node...
[ "Get", "a", "sub", "-", "graph", "out", "of", "a", "bunch", "of", "basic", "block", "addresses", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L611-L646
train
Get a sub - graph out of a bunch of basic block addresses.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated.get_function_subgraph
def get_function_subgraph(self, start, max_call_depth=None): """ Get a sub-graph of a certain function. :param start: The function start. Currently it should be an integer. :param max_call_depth: Call depth limit. None indicates no limit. :return: A CFG instance which is a sub-g...
python
def get_function_subgraph(self, start, max_call_depth=None): """ Get a sub-graph of a certain function. :param start: The function start. Currently it should be an integer. :param max_call_depth: Call depth limit. None indicates no limit. :return: A CFG instance which is a sub-g...
[ "def", "get_function_subgraph", "(", "self", ",", "start", ",", "max_call_depth", "=", "None", ")", ":", "# FIXME: syscalls are not supported", "# FIXME: start should also take a CFGNode instance", "start_node", "=", "self", ".", "get_any_node", "(", "start", ")", "node_w...
Get a sub-graph of a certain function. :param start: The function start. Currently it should be an integer. :param max_call_depth: Call depth limit. None indicates no limit. :return: A CFG instance which is a sub-graph of self.graph
[ "Get", "a", "sub", "-", "graph", "of", "a", "certain", "function", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L648-L702
train
Get a sub - graph of a certain function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated.deadends
def deadends(self): """ Get all CFGNodes that has an out-degree of 0 :return: A list of CFGNode instances :rtype: list """ if self.graph is None: raise AngrCFGError('CFG hasn\'t been generated yet.') deadends = [i for i in self.graph if self.graph.o...
python
def deadends(self): """ Get all CFGNodes that has an out-degree of 0 :return: A list of CFGNode instances :rtype: list """ if self.graph is None: raise AngrCFGError('CFG hasn\'t been generated yet.') deadends = [i for i in self.graph if self.graph.o...
[ "def", "deadends", "(", "self", ")", ":", "if", "self", ".", "graph", "is", "None", ":", "raise", "AngrCFGError", "(", "'CFG hasn\\'t been generated yet.'", ")", "deadends", "=", "[", "i", "for", "i", "in", "self", ".", "graph", "if", "self", ".", "graph...
Get all CFGNodes that has an out-degree of 0 :return: A list of CFGNode instances :rtype: list
[ "Get", "all", "CFGNodes", "that", "has", "an", "out", "-", "degree", "of", "0" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L756-L768
train
Get all CFGNodes that have an out - degree of 0
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._sanitize_parameters
def _sanitize_parameters(self): """ Perform a sanity check on parameters passed in to CFG.__init__(). An AngrCFGError is raised if any parameter fails the sanity check. :return: None """ # Check additional_edges if isinstance(self._additional_edges, (list, set, ...
python
def _sanitize_parameters(self): """ Perform a sanity check on parameters passed in to CFG.__init__(). An AngrCFGError is raised if any parameter fails the sanity check. :return: None """ # Check additional_edges if isinstance(self._additional_edges, (list, set, ...
[ "def", "_sanitize_parameters", "(", "self", ")", ":", "# Check additional_edges", "if", "isinstance", "(", "self", ".", "_additional_edges", ",", "(", "list", ",", "set", ",", "tuple", ")", ")", ":", "new_dict", "=", "defaultdict", "(", "list", ")", "for", ...
Perform a sanity check on parameters passed in to CFG.__init__(). An AngrCFGError is raised if any parameter fails the sanity check. :return: None
[ "Perform", "a", "sanity", "check", "on", "parameters", "passed", "in", "to", "CFG", ".", "__init__", "()", ".", "An", "AngrCFGError", "is", "raised", "if", "any", "parameter", "fails", "the", "sanity", "check", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L776-L809
train
Sanitize the parameters of the CFG object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._job_sorting_key
def _job_sorting_key(self, job): """ Get the sorting key of a CFGJob instance. :param CFGJob job: the CFGJob object. :return: An integer that determines the order of this job in the queue. :rtype: int """ if self._base_graph is None: # we don't do so...
python
def _job_sorting_key(self, job): """ Get the sorting key of a CFGJob instance. :param CFGJob job: the CFGJob object. :return: An integer that determines the order of this job in the queue. :rtype: int """ if self._base_graph is None: # we don't do so...
[ "def", "_job_sorting_key", "(", "self", ",", "job", ")", ":", "if", "self", ".", "_base_graph", "is", "None", ":", "# we don't do sorting if there is no base_graph", "return", "0", "MAX_JOBS", "=", "1000000", "if", "job", ".", "addr", "not", "in", "self", ".",...
Get the sorting key of a CFGJob instance. :param CFGJob job: the CFGJob object. :return: An integer that determines the order of this job in the queue. :rtype: int
[ "Get", "the", "sorting", "key", "of", "a", "CFGJob", "instance", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L853-L871
train
Get the sorting key of a CFGJob instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._pre_analysis
def _pre_analysis(self): """ Initialization work. Executed prior to the analysis. :return: None """ # Fill up self._starts for item in self._starts: callstack = None if isinstance(item, tuple): # (addr, jumpkind) i...
python
def _pre_analysis(self): """ Initialization work. Executed prior to the analysis. :return: None """ # Fill up self._starts for item in self._starts: callstack = None if isinstance(item, tuple): # (addr, jumpkind) i...
[ "def", "_pre_analysis", "(", "self", ")", ":", "# Fill up self._starts", "for", "item", "in", "self", ".", "_starts", ":", "callstack", "=", "None", "if", "isinstance", "(", "item", ",", "tuple", ")", ":", "# (addr, jumpkind)", "ip", "=", "item", "[", "0",...
Initialization work. Executed prior to the analysis. :return: None
[ "Initialization", "work", ".", "Executed", "prior", "to", "the", "analysis", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L873-L904
train
Initializes work. Executed prior to the analysis.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._job_queue_empty
def _job_queue_empty(self): """ A callback method called when the job queue is empty. :return: None """ self._iteratively_clean_pending_exits() while self._pending_jobs: # We don't have any exits remaining. Let's pop out a pending exit pending_j...
python
def _job_queue_empty(self): """ A callback method called when the job queue is empty. :return: None """ self._iteratively_clean_pending_exits() while self._pending_jobs: # We don't have any exits remaining. Let's pop out a pending exit pending_j...
[ "def", "_job_queue_empty", "(", "self", ")", ":", "self", ".", "_iteratively_clean_pending_exits", "(", ")", "while", "self", ".", "_pending_jobs", ":", "# We don't have any exits remaining. Let's pop out a pending exit", "pending_job", "=", "self", ".", "_get_one_pending_j...
A callback method called when the job queue is empty. :return: None
[ "A", "callback", "method", "called", "when", "the", "job", "queue", "is", "empty", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L917-L934
train
A callback method called when the job queue is empty.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._create_initial_state
def _create_initial_state(self, ip, jumpkind): """ Obtain a SimState object for a specific address Fastpath means the CFG generation will work in an IDA-like way, in which it will not try to execute every single statement in the emulator, but will just do the decoding job. This is much ...
python
def _create_initial_state(self, ip, jumpkind): """ Obtain a SimState object for a specific address Fastpath means the CFG generation will work in an IDA-like way, in which it will not try to execute every single statement in the emulator, but will just do the decoding job. This is much ...
[ "def", "_create_initial_state", "(", "self", ",", "ip", ",", "jumpkind", ")", ":", "jumpkind", "=", "\"Ijk_Boring\"", "if", "jumpkind", "is", "None", "else", "jumpkind", "if", "self", ".", "_initial_state", "is", "None", ":", "state", "=", "self", ".", "pr...
Obtain a SimState object for a specific address Fastpath means the CFG generation will work in an IDA-like way, in which it will not try to execute every single statement in the emulator, but will just do the decoding job. This is much faster than the old way. :param int ip: The instruction po...
[ "Obtain", "a", "SimState", "object", "for", "a", "specific", "address" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L936-L973
train
Create a state object for a specific address and jumpkind.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._get_one_pending_job
def _get_one_pending_job(self): """ Retrieve a pending job. :return: A CFGJob instance or None """ pending_job_key, pending_job = self._pending_jobs.popitem() pending_job_state = pending_job.state pending_job_call_stack = pending_job.call_stack pending_j...
python
def _get_one_pending_job(self): """ Retrieve a pending job. :return: A CFGJob instance or None """ pending_job_key, pending_job = self._pending_jobs.popitem() pending_job_state = pending_job.state pending_job_call_stack = pending_job.call_stack pending_j...
[ "def", "_get_one_pending_job", "(", "self", ")", ":", "pending_job_key", ",", "pending_job", "=", "self", ".", "_pending_jobs", ".", "popitem", "(", ")", "pending_job_state", "=", "pending_job", ".", "state", "pending_job_call_stack", "=", "pending_job", ".", "cal...
Retrieve a pending job. :return: A CFGJob instance or None
[ "Retrieve", "a", "pending", "job", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L975-L1016
train
Retrieve a pending job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._process_hints
def _process_hints(self, analyzed_addrs): """ Process function hints in the binary. :return: None """ # Function hints! # Now let's see how many new functions we can get here... while self._pending_function_hints: f = self._pending_function_hints.pop...
python
def _process_hints(self, analyzed_addrs): """ Process function hints in the binary. :return: None """ # Function hints! # Now let's see how many new functions we can get here... while self._pending_function_hints: f = self._pending_function_hints.pop...
[ "def", "_process_hints", "(", "self", ",", "analyzed_addrs", ")", ":", "# Function hints!", "# Now let's see how many new functions we can get here...", "while", "self", ".", "_pending_function_hints", ":", "f", "=", "self", ".", "_pending_function_hints", ".", "pop", "("...
Process function hints in the binary. :return: None
[ "Process", "function", "hints", "in", "the", "binary", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L1018-L1046
train
Process function hints in the binary.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._post_analysis
def _post_analysis(self): """ Post-CFG-construction. :return: None """ self._make_completed_functions() new_changes = self._iteratively_analyze_function_features() functions_do_not_return = new_changes['functions_do_not_return'] self._update_function_cal...
python
def _post_analysis(self): """ Post-CFG-construction. :return: None """ self._make_completed_functions() new_changes = self._iteratively_analyze_function_features() functions_do_not_return = new_changes['functions_do_not_return'] self._update_function_cal...
[ "def", "_post_analysis", "(", "self", ")", ":", "self", ".", "_make_completed_functions", "(", ")", "new_changes", "=", "self", ".", "_iteratively_analyze_function_features", "(", ")", "functions_do_not_return", "=", "new_changes", "[", "'functions_do_not_return'", "]",...
Post-CFG-construction. :return: None
[ "Post", "-", "CFG", "-", "construction", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L1048-L1068
train
Post - CFG - construction.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._pre_job_handling
def _pre_job_handling(self, job): # pylint:disable=arguments-differ """ Before processing a CFGJob. Right now each block is traced at most once. If it is traced more than once, we will mark it as "should_skip" before tracing it. An AngrForwardAnalysisSkipJob exception is raised ...
python
def _pre_job_handling(self, job): # pylint:disable=arguments-differ """ Before processing a CFGJob. Right now each block is traced at most once. If it is traced more than once, we will mark it as "should_skip" before tracing it. An AngrForwardAnalysisSkipJob exception is raised ...
[ "def", "_pre_job_handling", "(", "self", ",", "job", ")", ":", "# pylint:disable=arguments-differ", "# Extract initial info the CFGJob", "job", ".", "call_stack_suffix", "=", "job", ".", "get_call_stack_suffix", "(", ")", "job", ".", "current_function", "=", "self", "...
Before processing a CFGJob. Right now each block is traced at most once. If it is traced more than once, we will mark it as "should_skip" before tracing it. An AngrForwardAnalysisSkipJob exception is raised in order to skip analyzing the job. :param CFGJob job: The CFG job object. ...
[ "Before", "processing", "a", "CFGJob", ".", "Right", "now", "each", "block", "is", "traced", "at", "most", "once", ".", "If", "it", "is", "traced", "more", "than", "once", "we", "will", "mark", "it", "as", "should_skip", "before", "tracing", "it", ".", ...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L1072-L1248
train
This method is called before processing a CFGJob.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._get_successors
def _get_successors(self, job): """ Get a collection of successors out of the current job. :param CFGJob job: The CFGJob instance. :return: A collection of successors. :rtype: list """ addr = job.addr sim_successors = job.sim_succ...
python
def _get_successors(self, job): """ Get a collection of successors out of the current job. :param CFGJob job: The CFGJob instance. :return: A collection of successors. :rtype: list """ addr = job.addr sim_successors = job.sim_succ...
[ "def", "_get_successors", "(", "self", ",", "job", ")", ":", "addr", "=", "job", ".", "addr", "sim_successors", "=", "job", ".", "sim_successors", "cfg_node", "=", "job", ".", "cfg_node", "input_state", "=", "job", ".", "state", "func_addr", "=", "job", ...
Get a collection of successors out of the current job. :param CFGJob job: The CFGJob instance. :return: A collection of successors. :rtype: list
[ "Get", "a", "collection", "of", "successors", "out", "of", "the", "current", "job", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L1250-L1418
train
Get a collection of successors out of the current job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._post_process_successors
def _post_process_successors(self, input_state, sim_successors, successors): """ Filter the list of successors :param SimState input_state: Input state. :param SimSuccessors sim_successors: The SimSuccessors instance. :param list successors: ...
python
def _post_process_successors(self, input_state, sim_successors, successors): """ Filter the list of successors :param SimState input_state: Input state. :param SimSuccessors sim_successors: The SimSuccessors instance. :param list successors: ...
[ "def", "_post_process_successors", "(", "self", ",", "input_state", ",", "sim_successors", ",", "successors", ")", ":", "if", "sim_successors", ".", "sort", "==", "'IRSB'", "and", "input_state", ".", "thumb", ":", "successors", "=", "self", ".", "_arm_thumb_filt...
Filter the list of successors :param SimState input_state: Input state. :param SimSuccessors sim_successors: The SimSuccessors instance. :param list successors: A list of successors generated after processing the current block. :return: ...
[ "Filter", "the", "list", "of", "successors" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L1441-L1477
train
Post - process the successors after processing the current block.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._post_handle_job_debug
def _post_handle_job_debug(self, job, successors): """ Post job handling: print debugging information regarding the current job. :param CFGJob job: The current CFGJob instance. :param list successors: All successors of the analysis job. :return: None """ si...
python
def _post_handle_job_debug(self, job, successors): """ Post job handling: print debugging information regarding the current job. :param CFGJob job: The current CFGJob instance. :param list successors: All successors of the analysis job. :return: None """ si...
[ "def", "_post_handle_job_debug", "(", "self", ",", "job", ",", "successors", ")", ":", "sim_successors", "=", "job", ".", "sim_successors", "call_stack_suffix", "=", "job", ".", "call_stack_suffix", "extra_info", "=", "job", ".", "extra_info", "successor_status", ...
Post job handling: print debugging information regarding the current job. :param CFGJob job: The current CFGJob instance. :param list successors: All successors of the analysis job. :return: None
[ "Post", "job", "handling", ":", "print", "debugging", "information", "regarding", "the", "current", "job", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L1479-L1520
train
Print debugging information regarding the current CFGJob instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._iteratively_clean_pending_exits
def _iteratively_clean_pending_exits(self): """ Iteratively update the completed functions set, analyze whether each function returns or not, and remove pending exits if the callee function does not return. We do this iteratively so that we come to a fixed point in the end. In most cases...
python
def _iteratively_clean_pending_exits(self): """ Iteratively update the completed functions set, analyze whether each function returns or not, and remove pending exits if the callee function does not return. We do this iteratively so that we come to a fixed point in the end. In most cases...
[ "def", "_iteratively_clean_pending_exits", "(", "self", ")", ":", "while", "True", ":", "# did we finish analyzing any function?", "# fill in self._completed_functions", "self", ".", "_make_completed_functions", "(", ")", "if", "self", ".", "_pending_jobs", ":", "# There ar...
Iteratively update the completed functions set, analyze whether each function returns or not, and remove pending exits if the callee function does not return. We do this iteratively so that we come to a fixed point in the end. In most cases, the number of outer iteration equals to the maximum levels of ...
[ "Iteratively", "update", "the", "completed", "functions", "set", "analyze", "whether", "each", "function", "returns", "or", "not", "and", "remove", "pending", "exits", "if", "the", "callee", "function", "does", "not", "return", ".", "We", "do", "this", "iterat...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L1522-L1557
train
Iterate through the pending exits and remove any pending exits that are not returning.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._clean_pending_exits
def _clean_pending_exits(self): """ Remove those pending exits if: a) they are the return exits of non-returning SimProcedures b) they are the return exits of non-returning syscalls c) they are the return exits of non-returning functions :return: True if any pending exit...
python
def _clean_pending_exits(self): """ Remove those pending exits if: a) they are the return exits of non-returning SimProcedures b) they are the return exits of non-returning syscalls c) they are the return exits of non-returning functions :return: True if any pending exit...
[ "def", "_clean_pending_exits", "(", "self", ")", ":", "pending_exits_to_remove", "=", "[", "]", "for", "block_id", ",", "pe", "in", "self", ".", "_pending_jobs", ".", "items", "(", ")", ":", "if", "pe", ".", "returning_source", "is", "None", ":", "# The or...
Remove those pending exits if: a) they are the return exits of non-returning SimProcedures b) they are the return exits of non-returning syscalls c) they are the return exits of non-returning functions :return: True if any pending exits are removed, False otherwise :rtype: bool
[ "Remove", "those", "pending", "exits", "if", ":", "a", ")", "they", "are", "the", "return", "exits", "of", "non", "-", "returning", "SimProcedures", "b", ")", "they", "are", "the", "return", "exits", "of", "non", "-", "returning", "syscalls", "c", ")", ...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L1559-L1614
train
Remove any pending exit that are not returning.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._handle_successor
def _handle_successor(self, job, successor, successors): """ Returns a new CFGJob instance for further analysis, or None if there is no immediate state to perform the analysis on. :param CFGJob job: The current job. """ state = successor all_successor_states = s...
python
def _handle_successor(self, job, successor, successors): """ Returns a new CFGJob instance for further analysis, or None if there is no immediate state to perform the analysis on. :param CFGJob job: The current job. """ state = successor all_successor_states = s...
[ "def", "_handle_successor", "(", "self", ",", "job", ",", "successor", ",", "successors", ")", ":", "state", "=", "successor", "all_successor_states", "=", "successors", "addr", "=", "job", ".", "addr", "# The PathWrapper instance to return", "pw", "=", "None", ...
Returns a new CFGJob instance for further analysis, or None if there is no immediate state to perform the analysis on. :param CFGJob job: The current job.
[ "Returns", "a", "new", "CFGJob", "instance", "for", "further", "analysis", "or", "None", "if", "there", "is", "no", "immediate", "state", "to", "perform", "the", "analysis", "on", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L1635-L1821
train
Handles the successor and successors of the current job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._handle_job_without_successors
def _handle_job_without_successors(self, job, irsb, insn_addrs): """ A block without successors should still be handled so it can be added to the function graph correctly. :param CFGJob job: The current job that do not have any successor. :param IRSB irsb: The related IRSB. :...
python
def _handle_job_without_successors(self, job, irsb, insn_addrs): """ A block without successors should still be handled so it can be added to the function graph correctly. :param CFGJob job: The current job that do not have any successor. :param IRSB irsb: The related IRSB. :...
[ "def", "_handle_job_without_successors", "(", "self", ",", "job", ",", "irsb", ",", "insn_addrs", ")", ":", "# it's not an empty block", "# handle all conditional exits", "ins_addr", "=", "job", ".", "addr", "for", "stmt_idx", ",", "stmt", "in", "enumerate", "(", ...
A block without successors should still be handled so it can be added to the function graph correctly. :param CFGJob job: The current job that do not have any successor. :param IRSB irsb: The related IRSB. :param insn_addrs: A list of instruction addresses of this IRSB. :return: Non...
[ "A", "block", "without", "successors", "should", "still", "be", "handled", "so", "it", "can", "be", "added", "to", "the", "function", "graph", "correctly", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L1823-L1856
train
Handle a CFGJob that has no successors.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._handle_actions
def _handle_actions(self, state, current_run, func, sp_addr, accessed_registers): """ For a given state and current location of of execution, will update a function by adding the offets of appropriate actions to the stack variable or argument registers for the fnc. :param SimState state...
python
def _handle_actions(self, state, current_run, func, sp_addr, accessed_registers): """ For a given state and current location of of execution, will update a function by adding the offets of appropriate actions to the stack variable or argument registers for the fnc. :param SimState state...
[ "def", "_handle_actions", "(", "self", ",", "state", ",", "current_run", ",", "func", ",", "sp_addr", ",", "accessed_registers", ")", ":", "se", "=", "state", ".", "solver", "if", "func", "is", "not", "None", "and", "sp_addr", "is", "not", "None", ":", ...
For a given state and current location of of execution, will update a function by adding the offets of appropriate actions to the stack variable or argument registers for the fnc. :param SimState state: upcoming state. :param SimSuccessors current_run: possible result states. :param kno...
[ "For", "a", "given", "state", "and", "current", "location", "of", "of", "execution", "will", "update", "a", "function", "by", "adding", "the", "offets", "of", "appropriate", "actions", "to", "the", "stack", "variable", "or", "argument", "registers", "for", "...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L1860-L1900
train
This method handles the actions that are appropriate for the current function and the stack pointer address.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._update_function_transition_graph
def _update_function_transition_graph(self, src_node_key, dst_node_key, jumpkind='Ijk_Boring', ins_addr=None, stmt_idx=None, confirmed=None): """ Update transition graphs of functions in function manager based on information passed in. :param str jumpki...
python
def _update_function_transition_graph(self, src_node_key, dst_node_key, jumpkind='Ijk_Boring', ins_addr=None, stmt_idx=None, confirmed=None): """ Update transition graphs of functions in function manager based on information passed in. :param str jumpki...
[ "def", "_update_function_transition_graph", "(", "self", ",", "src_node_key", ",", "dst_node_key", ",", "jumpkind", "=", "'Ijk_Boring'", ",", "ins_addr", "=", "None", ",", "stmt_idx", "=", "None", ",", "confirmed", "=", "None", ")", ":", "if", "dst_node_key", ...
Update transition graphs of functions in function manager based on information passed in. :param str jumpkind: Jumpkind. :param CFGNode src_node: Source CFGNode :param CFGNode dst_node: Destionation CFGNode :param int ret_addr: The theoretical return address for calls :return: N...
[ "Update", "transition", "graphs", "of", "functions", "in", "function", "manager", "based", "on", "information", "passed", "in", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L1969-L2085
train
Updates the transition graph of functions in function manager based on information passed in.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._update_function_callsites
def _update_function_callsites(self, noreturns): """ Update the callsites of functions (remove return targets) that are calling functions that are just deemed not returning. :param iterable func_addrs: A collection of functions for newly-recovered non-returning functions. :retur...
python
def _update_function_callsites(self, noreturns): """ Update the callsites of functions (remove return targets) that are calling functions that are just deemed not returning. :param iterable func_addrs: A collection of functions for newly-recovered non-returning functions. :retur...
[ "def", "_update_function_callsites", "(", "self", ",", "noreturns", ")", ":", "for", "callee_func", "in", "noreturns", ":", "# consult the callgraph to find callers of each function", "if", "callee_func", ".", "addr", "not", "in", "self", ".", "functions", ".", "callg...
Update the callsites of functions (remove return targets) that are calling functions that are just deemed not returning. :param iterable func_addrs: A collection of functions for newly-recovered non-returning functions. :return: None
[ "Update", "the", "callsites", "of", "functions", "(", "remove", "return", "targets", ")", "that", "are", "calling", "functions", "that", "are", "just", "deemed", "not", "returning", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L2087-L2107
train
Update the callsites of functions that are just deemed not returning.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._filter_insane_successors
def _filter_insane_successors(self, successors): """ Throw away all successors whose target doesn't make sense This method is called after we resolve an indirect jump using an unreliable method (like, not through one of the indirect jump resolvers, but through either pure concrete execu...
python
def _filter_insane_successors(self, successors): """ Throw away all successors whose target doesn't make sense This method is called after we resolve an indirect jump using an unreliable method (like, not through one of the indirect jump resolvers, but through either pure concrete execu...
[ "def", "_filter_insane_successors", "(", "self", ",", "successors", ")", ":", "old_successors", "=", "successors", "[", ":", ":", "]", "successors", "=", "[", "]", "for", "i", ",", "suc", "in", "enumerate", "(", "old_successors", ")", ":", "if", "suc", "...
Throw away all successors whose target doesn't make sense This method is called after we resolve an indirect jump using an unreliable method (like, not through one of the indirect jump resolvers, but through either pure concrete execution or backward slicing) to filter out the obviously incorre...
[ "Throw", "away", "all", "successors", "whose", "target", "doesn", "t", "make", "sense" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L2138-L2172
train
Throw away all successors whose target doesn t make sense
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._remove_non_return_edges
def _remove_non_return_edges(self): """ Remove those return_from_call edges that actually do not return due to calling some not-returning functions. :return: None """ for func in self.kb.functions.values(): graph = func.transition_graph all_return_...
python
def _remove_non_return_edges(self): """ Remove those return_from_call edges that actually do not return due to calling some not-returning functions. :return: None """ for func in self.kb.functions.values(): graph = func.transition_graph all_return_...
[ "def", "_remove_non_return_edges", "(", "self", ")", ":", "for", "func", "in", "self", ".", "kb", ".", "functions", ".", "values", "(", ")", ":", "graph", "=", "func", ".", "transition_graph", "all_return_edges", "=", "[", "(", "u", ",", "v", ")", "for...
Remove those return_from_call edges that actually do not return due to calling some not-returning functions. :return: None
[ "Remove", "those", "return_from_call", "edges", "that", "actually", "do", "not", "return", "due", "to", "calling", "some", "not", "-", "returning", "functions", ".", ":", "return", ":", "None" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L2174-L2203
train
Remove all return_from_call edges that actually do not return due to a call_from_call call.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._convert_indirect_jump_targets_to_states
def _convert_indirect_jump_targets_to_states(job, indirect_jump_targets): """ Convert each concrete indirect jump target into a SimState. :param job: The CFGJob instance. :param indirect_jump_targets: A collection of concrete jump targets resolved from a indirect j...
python
def _convert_indirect_jump_targets_to_states(job, indirect_jump_targets): """ Convert each concrete indirect jump target into a SimState. :param job: The CFGJob instance. :param indirect_jump_targets: A collection of concrete jump targets resolved from a indirect j...
[ "def", "_convert_indirect_jump_targets_to_states", "(", "job", ",", "indirect_jump_targets", ")", ":", "successors", "=", "[", "]", "for", "t", "in", "indirect_jump_targets", ":", "# Insert new successors", "a", "=", "job", ".", "sim_successors", ".", "all_successors"...
Convert each concrete indirect jump target into a SimState. :param job: The CFGJob instance. :param indirect_jump_targets: A collection of concrete jump targets resolved from a indirect jump. :return: A list of SimStates. :rtype: ...
[ "Convert", "each", "concrete", "indirect", "jump", "target", "into", "a", "SimState", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L2214-L2230
train
Converts each concrete indirect jump target into a list of SimStates.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._try_resolving_indirect_jumps
def _try_resolving_indirect_jumps(self, sim_successors, cfg_node, func_addr, successors, exception_info, artifacts): """ Resolve indirect jumps specified by sim_successors.addr. :param SimSuccessors sim_successors: The SimSuccessors instance. :param CFGNode cfg_node: ...
python
def _try_resolving_indirect_jumps(self, sim_successors, cfg_node, func_addr, successors, exception_info, artifacts): """ Resolve indirect jumps specified by sim_successors.addr. :param SimSuccessors sim_successors: The SimSuccessors instance. :param CFGNode cfg_node: ...
[ "def", "_try_resolving_indirect_jumps", "(", "self", ",", "sim_successors", ",", "cfg_node", ",", "func_addr", ",", "successors", ",", "exception_info", ",", "artifacts", ")", ":", "# Try to resolve indirect jumps with advanced backward slicing (if enabled)", "if", "sim_succe...
Resolve indirect jumps specified by sim_successors.addr. :param SimSuccessors sim_successors: The SimSuccessors instance. :param CFGNode cfg_node: The CFGNode instance. :param int func_addr: Current function address. :param list successors: ...
[ "Resolve", "indirect", "jumps", "specified", "by", "sim_successors", ".", "addr", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L2232-L2391
train
Try to resolve indirect jumps.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._backward_slice_indirect
def _backward_slice_indirect(self, cfgnode, sim_successors, current_function_addr): """ Try to resolve an indirect jump by slicing backwards """ # TODO: make this a real indirect jump resolver under the new paradigm irsb = sim_successors.artifacts['irsb'] # shorthand l...
python
def _backward_slice_indirect(self, cfgnode, sim_successors, current_function_addr): """ Try to resolve an indirect jump by slicing backwards """ # TODO: make this a real indirect jump resolver under the new paradigm irsb = sim_successors.artifacts['irsb'] # shorthand l...
[ "def", "_backward_slice_indirect", "(", "self", ",", "cfgnode", ",", "sim_successors", ",", "current_function_addr", ")", ":", "# TODO: make this a real indirect jump resolver under the new paradigm", "irsb", "=", "sim_successors", ".", "artifacts", "[", "'irsb'", "]", "# s...
Try to resolve an indirect jump by slicing backwards
[ "Try", "to", "resolve", "an", "indirect", "jump", "by", "slicing", "backwards" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L2393-L2508
train
Resolve an indirect jump by slicing backwards from the end of the current function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._symbolically_back_traverse
def _symbolically_back_traverse(self, current_block, block_artifacts, cfg_node): """ Symbolically executes from ancestor nodes (2-5 times removed) finding paths of execution through the given CFGNode. :param SimSuccessors current_block: SimSuccessor with address to attempt to navigate t...
python
def _symbolically_back_traverse(self, current_block, block_artifacts, cfg_node): """ Symbolically executes from ancestor nodes (2-5 times removed) finding paths of execution through the given CFGNode. :param SimSuccessors current_block: SimSuccessor with address to attempt to navigate t...
[ "def", "_symbolically_back_traverse", "(", "self", ",", "current_block", ",", "block_artifacts", ",", "cfg_node", ")", ":", "class", "register_protector", ":", "def", "__init__", "(", "self", ",", "reg_offset", ",", "info_collection", ")", ":", "\"\"\"\n ...
Symbolically executes from ancestor nodes (2-5 times removed) finding paths of execution through the given CFGNode. :param SimSuccessors current_block: SimSuccessor with address to attempt to navigate to. :param dict block_artifacts: Container of IRSB data - specifically used for known persist...
[ "Symbolically", "executes", "from", "ancestor", "nodes", "(", "2", "-", "5", "times", "removed", ")", "finding", "paths", "of", "execution", "through", "the", "given", "CFGNode", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L2510-L2639
train
This method is used to find the path of the execution of the given CFGNode in the given block.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._get_symbolic_function_initial_state
def _get_symbolic_function_initial_state(self, function_addr, fastpath_mode_state=None): """ Symbolically execute the first basic block of the specified function, then returns it. We prepares the state using the already existing state in fastpath mode (if avaiable). :param functi...
python
def _get_symbolic_function_initial_state(self, function_addr, fastpath_mode_state=None): """ Symbolically execute the first basic block of the specified function, then returns it. We prepares the state using the already existing state in fastpath mode (if avaiable). :param functi...
[ "def", "_get_symbolic_function_initial_state", "(", "self", ",", "function_addr", ",", "fastpath_mode_state", "=", "None", ")", ":", "if", "function_addr", "is", "None", ":", "return", "None", "if", "function_addr", "in", "self", ".", "_symbolic_function_initial_state...
Symbolically execute the first basic block of the specified function, then returns it. We prepares the state using the already existing state in fastpath mode (if avaiable). :param function_addr: The function address :return: A symbolic state if succeeded, None otherwise
[ "Symbolically", "execute", "the", "first", "basic", "block", "of", "the", "specified", "function", "then", "returns", "it", ".", "We", "prepares", "the", "state", "using", "the", "already", "existing", "state", "in", "fastpath", "mode", "(", "if", "avaiable", ...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L2641-L2696
train
This method returns a symbolic state for the specified function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._search_for_function_hints
def _search_for_function_hints(self, successor_state): """ Scan for constants that might be used as exit targets later, and add them into pending_exits. :param SimState successor_state: A successing state. :return: A list of discovered code addresses. ...
python
def _search_for_function_hints(self, successor_state): """ Scan for constants that might be used as exit targets later, and add them into pending_exits. :param SimState successor_state: A successing state. :return: A list of discovered code addresses. ...
[ "def", "_search_for_function_hints", "(", "self", ",", "successor_state", ")", ":", "function_hints", "=", "[", "]", "for", "action", "in", "successor_state", ".", "history", ".", "recent_actions", ":", "if", "action", ".", "type", "==", "'reg'", "and", "actio...
Scan for constants that might be used as exit targets later, and add them into pending_exits. :param SimState successor_state: A successing state. :return: A list of discovered code addresses. :rtype: list
[ "Scan", "for", "constants", "that", "might", "be", "used", "as", "exit", "targets", "later", "and", "add", "them", "into", "pending_exits", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L2700-L2748
train
Searches for function hints that might be used as exit targets later and adds them into pending_exits.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._get_simsuccessors
def _get_simsuccessors(self, addr, job, current_function_addr=None): """ Create the SimSuccessors instance for a block. :param int addr: Address of the block. :param CFGJob job: The CFG job instance with an input state inside. :param int current_f...
python
def _get_simsuccessors(self, addr, job, current_function_addr=None): """ Create the SimSuccessors instance for a block. :param int addr: Address of the block. :param CFGJob job: The CFG job instance with an input state inside. :param int current_f...
[ "def", "_get_simsuccessors", "(", "self", ",", "addr", ",", "job", ",", "current_function_addr", "=", "None", ")", ":", "exception_info", "=", "None", "state", "=", "job", ".", "state", "saved_state", "=", "job", ".", "state", "# We don't have to make a copy her...
Create the SimSuccessors instance for a block. :param int addr: Address of the block. :param CFGJob job: The CFG job instance with an input state inside. :param int current_function_addr: Address of the current function. :return: ...
[ "Create", "the", "SimSuccessors", "instance", "for", "a", "block", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L2752-L2915
train
Create a SimSuccessors instance for a block.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._create_new_call_stack
def _create_new_call_stack(self, addr, all_jobs, job, exit_target, jumpkind): """ Creates a new call stack, and according to the jumpkind performs appropriate actions. :param int addr: Address to create at. :param Simsuccessors all_jobs: Jobs to get s...
python
def _create_new_call_stack(self, addr, all_jobs, job, exit_target, jumpkind): """ Creates a new call stack, and according to the jumpkind performs appropriate actions. :param int addr: Address to create at. :param Simsuccessors all_jobs: Jobs to get s...
[ "def", "_create_new_call_stack", "(", "self", ",", "addr", ",", "all_jobs", ",", "job", ",", "exit_target", ",", "jumpkind", ")", ":", "if", "self", ".", "_is_call_jumpkind", "(", "jumpkind", ")", ":", "new_call_stack", "=", "job", ".", "call_stack_copy", "(...
Creates a new call stack, and according to the jumpkind performs appropriate actions. :param int addr: Address to create at. :param Simsuccessors all_jobs: Jobs to get stack pointer from or return address. :param CFGJob job: CFGJob to c...
[ "Creates", "a", "new", "call", "stack", "and", "according", "to", "the", "jumpkind", "performs", "appropriate", "actions", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L2917-L3017
train
Creates a new call stack for the given target block.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._create_cfgnode
def _create_cfgnode(self, sim_successors, call_stack, func_addr, block_id=None, depth=None, exception_info=None): """ Create a context-sensitive CFGNode instance for a specific block. :param SimSuccessors sim_successors: The SimSuccessors object. :param CallStack call_stack_suff...
python
def _create_cfgnode(self, sim_successors, call_stack, func_addr, block_id=None, depth=None, exception_info=None): """ Create a context-sensitive CFGNode instance for a specific block. :param SimSuccessors sim_successors: The SimSuccessors object. :param CallStack call_stack_suff...
[ "def", "_create_cfgnode", "(", "self", ",", "sim_successors", ",", "call_stack", ",", "func_addr", ",", "block_id", "=", "None", ",", "depth", "=", "None", ",", "exception_info", "=", "None", ")", ":", "sa", "=", "sim_successors", ".", "artifacts", "# shorth...
Create a context-sensitive CFGNode instance for a specific block. :param SimSuccessors sim_successors: The SimSuccessors object. :param CallStack call_stack_suffix: The call stack. :param int func_addr: Address of the current function. :param Bloc...
[ "Create", "a", "context", "-", "sensitive", "CFGNode", "instance", "for", "a", "specific", "block", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L3019-L3085
train
Create a CFGNode instance for a specific block.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._detect_loops
def _detect_loops(self, loop_callback=None): """ Loop detection. :param func loop_callback: A callback function for each detected loop backedge. :return: None """ loop_finder = self.project.analyses.LoopFinder(kb=self.kb, normalize=False, fail_fast=self._fail_fast) ...
python
def _detect_loops(self, loop_callback=None): """ Loop detection. :param func loop_callback: A callback function for each detected loop backedge. :return: None """ loop_finder = self.project.analyses.LoopFinder(kb=self.kb, normalize=False, fail_fast=self._fail_fast) ...
[ "def", "_detect_loops", "(", "self", ",", "loop_callback", "=", "None", ")", ":", "loop_finder", "=", "self", ".", "project", ".", "analyses", ".", "LoopFinder", "(", "kb", "=", "self", ".", "kb", ",", "normalize", "=", "False", ",", "fail_fast", "=", ...
Loop detection. :param func loop_callback: A callback function for each detected loop backedge. :return: None
[ "Loop", "detection", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L3089-L3108
train
Detect loops in the current model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._immediate_dominators
def _immediate_dominators(self, node, target_graph=None, reverse_graph=False): """ Get all immediate dominators of sub graph from given node upwards. :param str node: id of the node to navigate forwards from. :param networkx.classes.digraph.DiGraph target_graph: graph to analyse, defaul...
python
def _immediate_dominators(self, node, target_graph=None, reverse_graph=False): """ Get all immediate dominators of sub graph from given node upwards. :param str node: id of the node to navigate forwards from. :param networkx.classes.digraph.DiGraph target_graph: graph to analyse, defaul...
[ "def", "_immediate_dominators", "(", "self", ",", "node", ",", "target_graph", "=", "None", ",", "reverse_graph", "=", "False", ")", ":", "if", "target_graph", "is", "None", ":", "target_graph", "=", "self", ".", "graph", "if", "node", "not", "in", "target...
Get all immediate dominators of sub graph from given node upwards. :param str node: id of the node to navigate forwards from. :param networkx.classes.digraph.DiGraph target_graph: graph to analyse, default is self.graph. :param bool reverse_graph: Whether the target graph should be reversed bef...
[ "Get", "all", "immediate", "dominators", "of", "sub", "graph", "from", "given", "node", "upwards", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L3212-L3269
train
Get all immediate dominators of a given node upwards.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._is_indirect_jump
def _is_indirect_jump(_, sim_successors): """ Determine if this SimIRSB has an indirect jump as its exit """ if sim_successors.artifacts['irsb_direct_next']: # It's a direct jump return False default_jumpkind = sim_successors.artifacts['irsb_default_jump...
python
def _is_indirect_jump(_, sim_successors): """ Determine if this SimIRSB has an indirect jump as its exit """ if sim_successors.artifacts['irsb_direct_next']: # It's a direct jump return False default_jumpkind = sim_successors.artifacts['irsb_default_jump...
[ "def", "_is_indirect_jump", "(", "_", ",", "sim_successors", ")", ":", "if", "sim_successors", ".", "artifacts", "[", "'irsb_direct_next'", "]", ":", "# It's a direct jump", "return", "False", "default_jumpkind", "=", "sim_successors", ".", "artifacts", "[", "'irsb_...
Determine if this SimIRSB has an indirect jump as its exit
[ "Determine", "if", "this", "SimIRSB", "has", "an", "indirect", "jump", "as", "its", "exit" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L3276-L3290
train
Determine if this SimIRSB has an indirect jump as its exit
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._is_address_executable
def _is_address_executable(self, address): """ Check if the specific address is in one of the executable ranges. :param int address: The address :return: True if it's in an executable range, False otherwise """ for r in self._executable_address_ranges: if r[...
python
def _is_address_executable(self, address): """ Check if the specific address is in one of the executable ranges. :param int address: The address :return: True if it's in an executable range, False otherwise """ for r in self._executable_address_ranges: if r[...
[ "def", "_is_address_executable", "(", "self", ",", "address", ")", ":", "for", "r", "in", "self", ".", "_executable_address_ranges", ":", "if", "r", "[", "0", "]", "<=", "address", "<", "r", "[", "1", "]", ":", "return", "True", "return", "False" ]
Check if the specific address is in one of the executable ranges. :param int address: The address :return: True if it's in an executable range, False otherwise
[ "Check", "if", "the", "specific", "address", "is", "in", "one", "of", "the", "executable", "ranges", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L3342-L3353
train
Check if the specific address is in one of the executable ranges.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._get_callsites
def _get_callsites(self, function_address): """ Get where a specific function is called. :param function_address: Address of the target function :return: A list of CFGNodes whose exits include a call/jump to the given function """ all_predecessors =...
python
def _get_callsites(self, function_address): """ Get where a specific function is called. :param function_address: Address of the target function :return: A list of CFGNodes whose exits include a call/jump to the given function """ all_predecessors =...
[ "def", "_get_callsites", "(", "self", ",", "function_address", ")", ":", "all_predecessors", "=", "[", "]", "nodes", "=", "self", ".", "get_all_nodes", "(", "function_address", ")", "for", "n", "in", "nodes", ":", "predecessors", "=", "list", "(", "self", ...
Get where a specific function is called. :param function_address: Address of the target function :return: A list of CFGNodes whose exits include a call/jump to the given function
[ "Get", "where", "a", "specific", "function", "is", "called", ".", ":", "param", "function_address", ":", "Address", "of", "the", "target", "function", ":", "return", ":", "A", "list", "of", "CFGNodes", "whose", "exits", "include", "a", "call", "/", "jump",...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L3367-L3381
train
Get the callsites of a specific function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._get_nx_paths
def _get_nx_paths(self, begin, end): """ Get the possible (networkx) simple paths between two nodes or addresses corresponding to nodes. Input: addresses or node instances Return: a list of lists of nodes representing paths. """ if isinstance(begin, int) and isins...
python
def _get_nx_paths(self, begin, end): """ Get the possible (networkx) simple paths between two nodes or addresses corresponding to nodes. Input: addresses or node instances Return: a list of lists of nodes representing paths. """ if isinstance(begin, int) and isins...
[ "def", "_get_nx_paths", "(", "self", ",", "begin", ",", "end", ")", ":", "if", "isinstance", "(", "begin", ",", "int", ")", "and", "isinstance", "(", "end", ",", "int", ")", ":", "n_begin", "=", "self", ".", "get_any_node", "(", "begin", ")", "n_end"...
Get the possible (networkx) simple paths between two nodes or addresses corresponding to nodes. Input: addresses or node instances Return: a list of lists of nodes representing paths.
[ "Get", "the", "possible", "(", "networkx", ")", "simple", "paths", "between", "two", "nodes", "or", "addresses", "corresponding", "to", "nodes", ".", "Input", ":", "addresses", "or", "node", "instances", "Return", ":", "a", "list", "of", "lists", "of", "no...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L3383-L3401
train
Get the possible simple paths between two addresses or node instances.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._quasi_topological_sort
def _quasi_topological_sort(self): """ Perform a quasi-topological sort on an already constructed CFG graph (a networkx DiGraph) :return: None """ # Clear the existing sorting result self._quasi_topological_order = {} ctr = self._graph.number_of_nodes() ...
python
def _quasi_topological_sort(self): """ Perform a quasi-topological sort on an already constructed CFG graph (a networkx DiGraph) :return: None """ # Clear the existing sorting result self._quasi_topological_order = {} ctr = self._graph.number_of_nodes() ...
[ "def", "_quasi_topological_sort", "(", "self", ")", ":", "# Clear the existing sorting result", "self", ".", "_quasi_topological_order", "=", "{", "}", "ctr", "=", "self", ".", "_graph", ".", "number_of_nodes", "(", ")", "for", "ep", "in", "self", ".", "_entry_p...
Perform a quasi-topological sort on an already constructed CFG graph (a networkx DiGraph) :return: None
[ "Perform", "a", "quasi", "-", "topological", "sort", "on", "an", "already", "constructed", "CFG", "graph", "(", "a", "networkx", "DiGraph", ")" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L3403-L3425
train
Perform a quasi - topological sort on an already constructed CFG graph.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_emulated.py
CFGEmulated._reset_state_mode
def _reset_state_mode(self, state, mode): """ Reset the state mode to the given mode, and apply the custom state options specified with this analysis. :param state: The state to work with. :param str mode: The state mode. :return: None """ state.set_m...
python
def _reset_state_mode(self, state, mode): """ Reset the state mode to the given mode, and apply the custom state options specified with this analysis. :param state: The state to work with. :param str mode: The state mode. :return: None """ state.set_m...
[ "def", "_reset_state_mode", "(", "self", ",", "state", ",", "mode", ")", ":", "state", ".", "set_mode", "(", "mode", ")", "state", ".", "options", "|=", "self", ".", "_state_add_options", "state", ".", "options", "=", "state", ".", "options", ".", "diffe...
Reset the state mode to the given mode, and apply the custom state options specified with this analysis. :param state: The state to work with. :param str mode: The state mode. :return: None
[ "Reset", "the", "state", "mode", "to", "the", "given", "mode", "and", "apply", "the", "custom", "state", "options", "specified", "with", "this", "analysis", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_emulated.py#L3427-L3438
train
Reset the state mode to the given mode and apply the custom state options specified with this analysis.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
SymbolManager.label_got
def label_got(self, addr, label): """ Mark a certain label as assigned (to an instruction or a block of data). :param int addr: The address of the label. :param angr.analyses.reassembler.Label label: The label that is just assigned. :return: None ...
python
def label_got(self, addr, label): """ Mark a certain label as assigned (to an instruction or a block of data). :param int addr: The address of the label. :param angr.analyses.reassembler.Label label: The label that is just assigned. :return: None ...
[ "def", "label_got", "(", "self", ",", "addr", ",", "label", ")", ":", "if", "label", "in", "self", ".", "addr_to_label", "[", "addr", "]", ":", "label", ".", "assigned", "=", "True" ]
Mark a certain label as assigned (to an instruction or a block of data). :param int addr: The address of the label. :param angr.analyses.reassembler.Label label: The label that is just assigned. :return: None
[ "Mark", "a", "certain", "label", "as", "assigned", "(", "to", "an", "instruction", "or", "a", "block", "of", "data", ")", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L398-L409
train
Mark a certain label as assigned.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Operand._imm_to_ptr
def _imm_to_ptr(self, imm, operand_type, mnemonic): # pylint:disable=no-self-use,unused-argument """ Try to classify an immediate as a pointer. :param int imm: The immediate to test. :param int operand_type: Operand type of this operand, can either be IMM or MEM. :param str mne...
python
def _imm_to_ptr(self, imm, operand_type, mnemonic): # pylint:disable=no-self-use,unused-argument """ Try to classify an immediate as a pointer. :param int imm: The immediate to test. :param int operand_type: Operand type of this operand, can either be IMM or MEM. :param str mne...
[ "def", "_imm_to_ptr", "(", "self", ",", "imm", ",", "operand_type", ",", "mnemonic", ")", ":", "# pylint:disable=no-self-use,unused-argument", "is_coderef", ",", "is_dataref", "=", "False", ",", "False", "baseaddr", "=", "None", "if", "not", "is_coderef", "and", ...
Try to classify an immediate as a pointer. :param int imm: The immediate to test. :param int operand_type: Operand type of this operand, can either be IMM or MEM. :param str mnemonic: Mnemonic of the instruction that this operand belongs to. :return: A tuple of (is code reference, is da...
[ "Try", "to", "classify", "an", "immediate", "as", "a", "pointer", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L625-L667
train
Classifies an immediate as a pointer.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Procedure.name
def name(self): """ Get function name from the labels of the very first block. :return: Function name if there is any, None otherwise :rtype: string """ if self._name is not None: return self._name if not self.blocks: return None ...
python
def name(self): """ Get function name from the labels of the very first block. :return: Function name if there is any, None otherwise :rtype: string """ if self._name is not None: return self._name if not self.blocks: return None ...
[ "def", "name", "(", "self", ")", ":", "if", "self", ".", "_name", "is", "not", "None", ":", "return", "self", ".", "_name", "if", "not", "self", ".", "blocks", ":", "return", "None", "if", "not", "self", ".", "blocks", "[", "0", "]", ".", "instru...
Get function name from the labels of the very first block. :return: Function name if there is any, None otherwise :rtype: string
[ "Get", "function", "name", "from", "the", "labels", "of", "the", "very", "first", "block", ".", ":", "return", ":", "Function", "name", "if", "there", "is", "any", "None", "otherwise", ":", "rtype", ":", "string" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L967-L991
train
Get the function name from the labels of the very first block.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Procedure.is_plt
def is_plt(self): """ If this function is a PLT entry or not. :return: True if this function is a PLT entry, False otherwise :rtype: bool """ if self.section == ".plt": return True if not self.blocks: return False initial_block =...
python
def is_plt(self): """ If this function is a PLT entry or not. :return: True if this function is a PLT entry, False otherwise :rtype: bool """ if self.section == ".plt": return True if not self.blocks: return False initial_block =...
[ "def", "is_plt", "(", "self", ")", ":", "if", "self", ".", "section", "==", "\".plt\"", ":", "return", "True", "if", "not", "self", ".", "blocks", ":", "return", "False", "initial_block", "=", "next", "(", "(", "b", "for", "b", "in", "self", ".", "...
If this function is a PLT entry or not. :return: True if this function is a PLT entry, False otherwise :rtype: bool
[ "If", "this", "function", "is", "a", "PLT", "entry", "or", "not", ".", ":", "return", ":", "True", "if", "this", "function", "is", "a", "PLT", "entry", "False", "otherwise", ":", "rtype", ":", "bool" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L994-L1022
train
Returns True if this function is a PLT entry False otherwise.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Procedure.assembly
def assembly(self, comments=False, symbolized=True): """ Get the assembly manifest of the procedure. :param comments: :param symbolized: :return: A list of tuples (address, basic block assembly), ordered by basic block addresses :rtype: list """ assembly...
python
def assembly(self, comments=False, symbolized=True): """ Get the assembly manifest of the procedure. :param comments: :param symbolized: :return: A list of tuples (address, basic block assembly), ordered by basic block addresses :rtype: list """ assembly...
[ "def", "assembly", "(", "self", ",", "comments", "=", "False", ",", "symbolized", "=", "True", ")", ":", "assembly", "=", "[", "]", "header", "=", "\"\\t.section\\t{section}\\n\\t.align\\t{alignment}\\n\"", ".", "format", "(", "section", "=", "self", ".", "sec...
Get the assembly manifest of the procedure. :param comments: :param symbolized: :return: A list of tuples (address, basic block assembly), ordered by basic block addresses :rtype: list
[ "Get", "the", "assembly", "manifest", "of", "the", "procedure", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L1043-L1081
train
Get the assembly manifest of the procedure.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Procedure.instruction_addresses
def instruction_addresses(self): """ Get all instruction addresses in the binary. :return: A list of sorted instruction addresses. :rtype: list """ addrs = [ ] for b in sorted(self.blocks, key=lambda x: x.addr): # type: BasicBlock addrs.extend(b.ins...
python
def instruction_addresses(self): """ Get all instruction addresses in the binary. :return: A list of sorted instruction addresses. :rtype: list """ addrs = [ ] for b in sorted(self.blocks, key=lambda x: x.addr): # type: BasicBlock addrs.extend(b.ins...
[ "def", "instruction_addresses", "(", "self", ")", ":", "addrs", "=", "[", "]", "for", "b", "in", "sorted", "(", "self", ".", "blocks", ",", "key", "=", "lambda", "x", ":", "x", ".", "addr", ")", ":", "# type: BasicBlock", "addrs", ".", "extend", "(",...
Get all instruction addresses in the binary. :return: A list of sorted instruction addresses. :rtype: list
[ "Get", "all", "instruction", "addresses", "in", "the", "binary", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L1083-L1095
train
Get all instruction addresses in the binary.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Procedure._output_function_label
def _output_function_label(self): """ Determines if we want to output the function label in assembly. We output the function label only when the original instruction does not output the function label. :return: True if we should output the function label, False otherwise. :rtype...
python
def _output_function_label(self): """ Determines if we want to output the function label in assembly. We output the function label only when the original instruction does not output the function label. :return: True if we should output the function label, False otherwise. :rtype...
[ "def", "_output_function_label", "(", "self", ")", ":", "if", "self", ".", "asm_code", ":", "return", "True", "if", "not", "self", ".", "blocks", ":", "return", "True", "the_block", "=", "next", "(", "(", "b", "for", "b", "in", "self", ".", "blocks", ...
Determines if we want to output the function label in assembly. We output the function label only when the original instruction does not output the function label. :return: True if we should output the function label, False otherwise. :rtype: bool
[ "Determines", "if", "we", "want", "to", "output", "the", "function", "label", "in", "assembly", ".", "We", "output", "the", "function", "label", "only", "when", "the", "original", "instruction", "does", "not", "output", "the", "function", "label", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L1117-L1138
train
Determines if we should output the function label in assembly.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Data.shrink
def shrink(self, new_size): """ Reduce the size of this block :param int new_size: The new size :return: None """ self.size = new_size if self.sort == 'string': self.null_terminated = False # string without the null byte terminator self._...
python
def shrink(self, new_size): """ Reduce the size of this block :param int new_size: The new size :return: None """ self.size = new_size if self.sort == 'string': self.null_terminated = False # string without the null byte terminator self._...
[ "def", "shrink", "(", "self", ",", "new_size", ")", ":", "self", ".", "size", "=", "new_size", "if", "self", ".", "sort", "==", "'string'", ":", "self", ".", "null_terminated", "=", "False", "# string without the null byte terminator", "self", ".", "_content",...
Reduce the size of this block :param int new_size: The new size :return: None
[ "Reduce", "the", "size", "of", "this", "block" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L1196-L1221
train
Reduces the size of the block of data.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Data.desymbolize
def desymbolize(self): """ We believe this was a pointer and symbolized it before. Now we want to desymbolize it. The following actions are performed: - Reload content from memory - Mark the sort as 'unknown' :return: None """ self.sort = 'unknown' ...
python
def desymbolize(self): """ We believe this was a pointer and symbolized it before. Now we want to desymbolize it. The following actions are performed: - Reload content from memory - Mark the sort as 'unknown' :return: None """ self.sort = 'unknown' ...
[ "def", "desymbolize", "(", "self", ")", ":", "self", ".", "sort", "=", "'unknown'", "content", "=", "self", ".", "binary", ".", "fast_memory_load", "(", "self", ".", "addr", ",", "self", ".", "size", ",", "bytes", ")", "self", ".", "content", "=", "[...
We believe this was a pointer and symbolized it before. Now we want to desymbolize it. The following actions are performed: - Reload content from memory - Mark the sort as 'unknown' :return: None
[ "We", "believe", "this", "was", "a", "pointer", "and", "symbolized", "it", "before", ".", "Now", "we", "want", "to", "desymbolize", "it", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L1223-L1236
train
This method is used to desymbolize the current object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler.main_executable_region_limbos_contain
def main_executable_region_limbos_contain(self, addr): """ Sometimes there exists a pointer that points to a few bytes before the beginning of a section, or a few bytes after the beginning of the section. We take care of that here. :param int addr: The address to check. :return:...
python
def main_executable_region_limbos_contain(self, addr): """ Sometimes there exists a pointer that points to a few bytes before the beginning of a section, or a few bytes after the beginning of the section. We take care of that here. :param int addr: The address to check. :return:...
[ "def", "main_executable_region_limbos_contain", "(", "self", ",", "addr", ")", ":", "TOLERANCE", "=", "64", "closest_region", "=", "None", "least_limbo", "=", "None", "for", "start", ",", "end", "in", "self", ".", "main_executable_regions", ":", "if", "start", ...
Sometimes there exists a pointer that points to a few bytes before the beginning of a section, or a few bytes after the beginning of the section. We take care of that here. :param int addr: The address to check. :return: A 2-tuple of (bool, the closest base address) :rtype: tuple
[ "Sometimes", "there", "exists", "a", "pointer", "that", "points", "to", "a", "few", "bytes", "before", "the", "beginning", "of", "a", "section", "or", "a", "few", "bytes", "after", "the", "beginning", "of", "the", "section", ".", "We", "take", "care", "o...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L1821-L1848
train
Returns the base address of the least - limbo region that contains the given address.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler.main_nonexecutable_region_limbos_contain
def main_nonexecutable_region_limbos_contain(self, addr, tolerance_before=64, tolerance_after=64): """ Sometimes there exists a pointer that points to a few bytes before the beginning of a section, or a few bytes after the beginning of the section. We take care of that here. :param int ...
python
def main_nonexecutable_region_limbos_contain(self, addr, tolerance_before=64, tolerance_after=64): """ Sometimes there exists a pointer that points to a few bytes before the beginning of a section, or a few bytes after the beginning of the section. We take care of that here. :param int ...
[ "def", "main_nonexecutable_region_limbos_contain", "(", "self", ",", "addr", ",", "tolerance_before", "=", "64", ",", "tolerance_after", "=", "64", ")", ":", "closest_region", "=", "None", "least_limbo", "=", "None", "for", "start", ",", "end", "in", "self", "...
Sometimes there exists a pointer that points to a few bytes before the beginning of a section, or a few bytes after the beginning of the section. We take care of that here. :param int addr: The address to check. :return: A 2-tuple of (bool, the closest base address) :rtype: tuple
[ "Sometimes", "there", "exists", "a", "pointer", "that", "points", "to", "a", "few", "bytes", "before", "the", "beginning", "of", "a", "section", "or", "a", "few", "bytes", "after", "the", "beginning", "of", "the", "section", ".", "We", "take", "care", "o...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L1862-L1887
train
Returns True if the address is within the least - limbo of the main nonexecutable region.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler.add_label
def add_label(self, name, addr): """ Add a new label to the symbol manager. :param str name: Name of the label. :param int addr: Address of the label. :return: None """ # set the label self._symbolization_needed = True self.symbol_manager.new_la...
python
def add_label(self, name, addr): """ Add a new label to the symbol manager. :param str name: Name of the label. :param int addr: Address of the label. :return: None """ # set the label self._symbolization_needed = True self.symbol_manager.new_la...
[ "def", "add_label", "(", "self", ",", "name", ",", "addr", ")", ":", "# set the label", "self", ".", "_symbolization_needed", "=", "True", "self", ".", "symbol_manager", ".", "new_label", "(", "addr", ",", "name", "=", "name", ",", "force", "=", "True", ...
Add a new label to the symbol manager. :param str name: Name of the label. :param int addr: Address of the label. :return: None
[ "Add", "a", "new", "label", "to", "the", "symbol", "manager", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L1950-L1962
train
Add a new label to the symbol manager.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler.insert_asm
def insert_asm(self, addr, asm_code, before_label=False): """ Insert some assembly code at the specific address. There must be an instruction starting at that address. :param int addr: Address of insertion :param str asm_code: The assembly code to insert :return: None ""...
python
def insert_asm(self, addr, asm_code, before_label=False): """ Insert some assembly code at the specific address. There must be an instruction starting at that address. :param int addr: Address of insertion :param str asm_code: The assembly code to insert :return: None ""...
[ "def", "insert_asm", "(", "self", ",", "addr", ",", "asm_code", ",", "before_label", "=", "False", ")", ":", "if", "before_label", ":", "self", ".", "_inserted_asm_before_label", "[", "addr", "]", ".", "append", "(", "asm_code", ")", "else", ":", "self", ...
Insert some assembly code at the specific address. There must be an instruction starting at that address. :param int addr: Address of insertion :param str asm_code: The assembly code to insert :return: None
[ "Insert", "some", "assembly", "code", "at", "the", "specific", "address", ".", "There", "must", "be", "an", "instruction", "starting", "at", "that", "address", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L1964-L1976
train
Inserts some assembly code at the specific address.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler.append_procedure
def append_procedure(self, name, asm_code): """ Add a new procedure with specific name and assembly code. :param str name: The name of the new procedure. :param str asm_code: The assembly code of the procedure :return: None """ proc = Procedure(self, name=name, ...
python
def append_procedure(self, name, asm_code): """ Add a new procedure with specific name and assembly code. :param str name: The name of the new procedure. :param str asm_code: The assembly code of the procedure :return: None """ proc = Procedure(self, name=name, ...
[ "def", "append_procedure", "(", "self", ",", "name", ",", "asm_code", ")", ":", "proc", "=", "Procedure", "(", "self", ",", "name", "=", "name", ",", "asm_code", "=", "asm_code", ")", "self", ".", "procedures", ".", "append", "(", "proc", ")" ]
Add a new procedure with specific name and assembly code. :param str name: The name of the new procedure. :param str asm_code: The assembly code of the procedure :return: None
[ "Add", "a", "new", "procedure", "with", "specific", "name", "and", "assembly", "code", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L1978-L1988
train
Add a new procedure with specific name and assembly code.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler.append_data
def append_data(self, name, initial_content, size, readonly=False, sort="unknown"): # pylint:disable=unused-argument """ Append a new data entry into the binary with specific name, content, and size. :param str name: Name of the data entry. Will be used as the label. :param bytes initi...
python
def append_data(self, name, initial_content, size, readonly=False, sort="unknown"): # pylint:disable=unused-argument """ Append a new data entry into the binary with specific name, content, and size. :param str name: Name of the data entry. Will be used as the label. :param bytes initi...
[ "def", "append_data", "(", "self", ",", "name", ",", "initial_content", ",", "size", ",", "readonly", "=", "False", ",", "sort", "=", "\"unknown\"", ")", ":", "# pylint:disable=unused-argument", "if", "readonly", ":", "section_name", "=", "\".rodata\"", "else", ...
Append a new data entry into the binary with specific name, content, and size. :param str name: Name of the data entry. Will be used as the label. :param bytes initial_content: The initial content of the data entry. :param int size: Size of the data entry. :param bool readonly: If the d...
[ "Append", "a", "new", "data", "entry", "into", "the", "binary", "with", "specific", "name", "content", "and", "size", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L1990-L2017
train
Append a new data entry into the binary with specific name content and size.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler.remove_cgc_attachments
def remove_cgc_attachments(self): """ Remove CGC attachments. :return: True if CGC attachments are found and removed, False otherwise :rtype: bool """ cgc_package_list = None cgc_extended_application = None for data in self.data: if data.sor...
python
def remove_cgc_attachments(self): """ Remove CGC attachments. :return: True if CGC attachments are found and removed, False otherwise :rtype: bool """ cgc_package_list = None cgc_extended_application = None for data in self.data: if data.sor...
[ "def", "remove_cgc_attachments", "(", "self", ")", ":", "cgc_package_list", "=", "None", "cgc_extended_application", "=", "None", "for", "data", "in", "self", ".", "data", ":", "if", "data", ".", "sort", "==", "'cgc-package-list'", ":", "cgc_package_list", "=", ...
Remove CGC attachments. :return: True if CGC attachments are found and removed, False otherwise :rtype: bool
[ "Remove", "CGC", "attachments", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L2136-L2245
train
Removes CGC attachments from the current state.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler.remove_unnecessary_stuff
def remove_unnecessary_stuff(self): """ Remove unnecessary functions and data :return: None """ glibc_functions_blacklist = { '_start', '_init', '_fini', '__gmon_start__', '__do_global_dtors_aux', 'frame_du...
python
def remove_unnecessary_stuff(self): """ Remove unnecessary functions and data :return: None """ glibc_functions_blacklist = { '_start', '_init', '_fini', '__gmon_start__', '__do_global_dtors_aux', 'frame_du...
[ "def", "remove_unnecessary_stuff", "(", "self", ")", ":", "glibc_functions_blacklist", "=", "{", "'_start'", ",", "'_init'", ",", "'_fini'", ",", "'__gmon_start__'", ",", "'__do_global_dtors_aux'", ",", "'frame_dummy'", ",", "'atexit'", ",", "'deregister_tm_clones'", ...
Remove unnecessary functions and data :return: None
[ "Remove", "unnecessary", "functions", "and", "data" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L2247-L2309
train
Removes unnecessary functions and data from the current object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler._initialize
def _initialize(self): """ Initialize the binary. :return: None """ # figure out section alignments for section in self.project.loader.main_object.sections: in_segment = False for segment in self.project.loader.main_object.segments: ...
python
def _initialize(self): """ Initialize the binary. :return: None """ # figure out section alignments for section in self.project.loader.main_object.sections: in_segment = False for segment in self.project.loader.main_object.segments: ...
[ "def", "_initialize", "(", "self", ")", ":", "# figure out section alignments", "for", "section", "in", "self", ".", "project", ".", "loader", ".", "main_object", ".", "sections", ":", "in_segment", "=", "False", "for", "segment", "in", "self", ".", "project",...
Initialize the binary. :return: None
[ "Initialize", "the", "binary", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L2315-L2560
train
Initialize the binary.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler._sequence_handler
def _sequence_handler(self, cfg, irsb, irsb_addr, stmt_idx, data_addr, max_size): # pylint:disable=unused-argument """ Find sequences in binary data. :param angr.analyses.CFG cfg: The control flow graph. :param pyvex.IRSB irsb: The IRSB object. :param int irsb_addr: Address of ...
python
def _sequence_handler(self, cfg, irsb, irsb_addr, stmt_idx, data_addr, max_size): # pylint:disable=unused-argument """ Find sequences in binary data. :param angr.analyses.CFG cfg: The control flow graph. :param pyvex.IRSB irsb: The IRSB object. :param int irsb_addr: Address of ...
[ "def", "_sequence_handler", "(", "self", ",", "cfg", ",", "irsb", ",", "irsb_addr", ",", "stmt_idx", ",", "data_addr", ",", "max_size", ")", ":", "# pylint:disable=unused-argument", "if", "not", "self", ".", "_is_sequence", "(", "cfg", ",", "data_addr", ",", ...
Find sequences in binary data. :param angr.analyses.CFG cfg: The control flow graph. :param pyvex.IRSB irsb: The IRSB object. :param int irsb_addr: Address of the block. :param int stmt_idx: Statement ID. :param int data_addr: Address of the data in memory. :param int ma...
[ "Find", "sequences", "in", "binary", "data", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L2589-L2613
train
This function handles the sequence processing.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler._cgc_package_list_identifier
def _cgc_package_list_identifier(self, data_addr, data_size): """ Identifies the CGC package list associated with the CGC binary. :param int data_addr: Address of the data in memory. :param int data_size: Maximum size possible. :return: A 2-tuple of data type and size. :...
python
def _cgc_package_list_identifier(self, data_addr, data_size): """ Identifies the CGC package list associated with the CGC binary. :param int data_addr: Address of the data in memory. :param int data_size: Maximum size possible. :return: A 2-tuple of data type and size. :...
[ "def", "_cgc_package_list_identifier", "(", "self", ",", "data_addr", ",", "data_size", ")", ":", "if", "data_size", "<", "100", ":", "return", "None", ",", "None", "data", "=", "self", ".", "fast_memory_load", "(", "data_addr", ",", "data_size", ",", "str",...
Identifies the CGC package list associated with the CGC binary. :param int data_addr: Address of the data in memory. :param int data_size: Maximum size possible. :return: A 2-tuple of data type and size. :rtype: tuple
[ "Identifies", "the", "CGC", "package", "list", "associated", "with", "the", "CGC", "binary", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L2615-L2639
train
Returns the identifier of the CGC package list associated with the CGC binary.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler._cgc_extended_application_handler
def _cgc_extended_application_handler(self, cfg, irsb, irsb_addr, stmt_idx, data_addr, max_size): # pylint:disable=unused-argument """ Identifies the extended application (a PDF file) associated with the CGC binary. :param angr.analyses.CFG cfg: The control flow graph. :param pyvex.IRS...
python
def _cgc_extended_application_handler(self, cfg, irsb, irsb_addr, stmt_idx, data_addr, max_size): # pylint:disable=unused-argument """ Identifies the extended application (a PDF file) associated with the CGC binary. :param angr.analyses.CFG cfg: The control flow graph. :param pyvex.IRS...
[ "def", "_cgc_extended_application_handler", "(", "self", ",", "cfg", ",", "irsb", ",", "irsb_addr", ",", "stmt_idx", ",", "data_addr", ",", "max_size", ")", ":", "# pylint:disable=unused-argument", "if", "max_size", "<", "100", ":", "return", "None", ",", "None"...
Identifies the extended application (a PDF file) associated with the CGC binary. :param angr.analyses.CFG cfg: The control flow graph. :param pyvex.IRSB irsb: The IRSB object. :param int irsb_addr: Address of the block. :param int stmt_idx: Statement ID. :param int data_addr: Ad...
[ "Identifies", "the", "extended", "application", "(", "a", "PDF", "file", ")", "associated", "with", "the", "CGC", "binary", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L2641-L2681
train
Handles the CGC extended application processing.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler._unknown_data_size_handler
def _unknown_data_size_handler(self, cfg, irsb, irsb_addr, stmt_idx, data_addr, max_size): # pylint:disable=unused-argument """ Return the maximum number of bytes until a potential pointer or a potential sequence is found. :param angr.analyses.CFG cfg: The control flow graph. :param py...
python
def _unknown_data_size_handler(self, cfg, irsb, irsb_addr, stmt_idx, data_addr, max_size): # pylint:disable=unused-argument """ Return the maximum number of bytes until a potential pointer or a potential sequence is found. :param angr.analyses.CFG cfg: The control flow graph. :param py...
[ "def", "_unknown_data_size_handler", "(", "self", ",", "cfg", ",", "irsb", ",", "irsb_addr", ",", "stmt_idx", ",", "data_addr", ",", "max_size", ")", ":", "# pylint:disable=unused-argument", "sequence_offset", "=", "None", "for", "offset", "in", "range", "(", "1...
Return the maximum number of bytes until a potential pointer or a potential sequence is found. :param angr.analyses.CFG cfg: The control flow graph. :param pyvex.IRSB irsb: The IRSB object. :param int irsb_addr: Address of the block. :param int stmt_idx: Statement ID. :param int...
[ "Return", "the", "maximum", "number", "of", "bytes", "until", "a", "potential", "pointer", "or", "a", "potential", "sequence", "is", "found", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L2683-L2726
train
Internal method to handle unknown data size.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler._has_integer_used_as_pointers
def _has_integer_used_as_pointers(self): """ Test if there is any (suspicious) pointer decryption in the code. :return: True if there is any pointer decryption, False otherwise. :rtype: bool """ # check all integer accesses and see if there is any integer being used as ...
python
def _has_integer_used_as_pointers(self): """ Test if there is any (suspicious) pointer decryption in the code. :return: True if there is any pointer decryption, False otherwise. :rtype: bool """ # check all integer accesses and see if there is any integer being used as ...
[ "def", "_has_integer_used_as_pointers", "(", "self", ")", ":", "# check all integer accesses and see if there is any integer being used as a pointer later, but it wasn't", "# classified as a pointer reference", "# we only care about unknown memory data that are 4 bytes long, and is directly referenc...
Test if there is any (suspicious) pointer decryption in the code. :return: True if there is any pointer decryption, False otherwise. :rtype: bool
[ "Test", "if", "there", "is", "any", "(", "suspicious", ")", "pointer", "decryption", "in", "the", "code", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L2728-L2806
train
Test if there is any integer being used as a pointer
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/reassembler.py
Reassembler.fast_memory_load
def fast_memory_load(self, addr, size, data_type, endness='Iend_LE'): """ Load memory bytes from loader's memory backend. :param int addr: The address to begin memory loading. :param int size: Size in bytes. :param data_type: Type of the data. :param str endness:...
python
def fast_memory_load(self, addr, size, data_type, endness='Iend_LE'): """ Load memory bytes from loader's memory backend. :param int addr: The address to begin memory loading. :param int size: Size in bytes. :param data_type: Type of the data. :param str endness:...
[ "def", "fast_memory_load", "(", "self", ",", "addr", ",", "size", ",", "data_type", ",", "endness", "=", "'Iend_LE'", ")", ":", "if", "data_type", "is", "int", ":", "try", ":", "return", "self", ".", "project", ".", "loader", ".", "memory", ".", "unpac...
Load memory bytes from loader's memory backend. :param int addr: The address to begin memory loading. :param int size: Size in bytes. :param data_type: Type of the data. :param str endness: Endianness of this memory load. :return: Data read out of the memory. ...
[ "Load", "memory", "bytes", "from", "loader", "s", "memory", "backend", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reassembler.py#L2808-L2832
train
Fast memory load.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/variable_recovery/variable_recovery_fast.py
VariableRecoveryFastState.merge
def merge(self, other, successor=None): """ Merge two abstract states. For any node A whose dominance frontier that the current node (at the current program location) belongs to, we create a phi variable V' for each variable V that is defined in A, and then replace all existence of V wi...
python
def merge(self, other, successor=None): """ Merge two abstract states. For any node A whose dominance frontier that the current node (at the current program location) belongs to, we create a phi variable V' for each variable V that is defined in A, and then replace all existence of V wi...
[ "def", "merge", "(", "self", ",", "other", ",", "successor", "=", "None", ")", ":", "replacements", "=", "{", "}", "if", "successor", "in", "self", ".", "dominance_frontiers", ":", "replacements", "=", "self", ".", "_make_phi_variables", "(", "successor", ...
Merge two abstract states. For any node A whose dominance frontier that the current node (at the current program location) belongs to, we create a phi variable V' for each variable V that is defined in A, and then replace all existence of V with V' in the merged abstract state. :param ...
[ "Merge", "two", "abstract", "states", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/variable_recovery/variable_recovery_fast.py#L525-L557
train
Merge two abstract states.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/variable_recovery/variable_recovery_fast.py
VariableRecoveryFast._process_block
def _process_block(self, state, block): # pylint:disable=no-self-use """ Scan through all statements and perform the following tasks: - Find stack pointers and the VEX temporary variable storing stack pointers - Selectively calculate VEX statements - Track memory loading and mar...
python
def _process_block(self, state, block): # pylint:disable=no-self-use """ Scan through all statements and perform the following tasks: - Find stack pointers and the VEX temporary variable storing stack pointers - Selectively calculate VEX statements - Track memory loading and mar...
[ "def", "_process_block", "(", "self", ",", "state", ",", "block", ")", ":", "# pylint:disable=no-self-use", "l", ".", "debug", "(", "'Processing block %#x.'", ",", "block", ".", "addr", ")", "processor", "=", "self", ".", "_ail_engine", "if", "isinstance", "("...
Scan through all statements and perform the following tasks: - Find stack pointers and the VEX temporary variable storing stack pointers - Selectively calculate VEX statements - Track memory loading and mark stack and global variables accordingly :param angr.Block block: :return...
[ "Scan", "through", "all", "statements", "and", "perform", "the", "following", "tasks", ":", "-", "Find", "stack", "pointers", "and", "the", "VEX", "temporary", "variable", "storing", "stack", "pointers", "-", "Selectively", "calculate", "VEX", "statements", "-",...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/variable_recovery/variable_recovery_fast.py#L718-L741
train
Process a block and update the state.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...