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/keyed_region.py | KeyedRegion.get_objects_by_offset | def get_objects_by_offset(self, start):
"""
Find objects covering the given region offset.
:param start:
:return:
"""
_, container = self._get_container(start)
if container is None:
return set()
else:
return container.internal_obj... | python | def get_objects_by_offset(self, start):
"""
Find objects covering the given region offset.
:param start:
:return:
"""
_, container = self._get_container(start)
if container is None:
return set()
else:
return container.internal_obj... | [
"def",
"get_objects_by_offset",
"(",
"self",
",",
"start",
")",
":",
"_",
",",
"container",
"=",
"self",
".",
"_get_container",
"(",
"start",
")",
"if",
"container",
"is",
"None",
":",
"return",
"set",
"(",
")",
"else",
":",
"return",
"container",
".",
... | Find objects covering the given region offset.
:param start:
:return: | [
"Find",
"objects",
"covering",
"the",
"given",
"region",
"offset",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/keyed_region.py#L307-L319 | train | Find objects covering the given region 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/keyed_region.py | KeyedRegion._store | def _store(self, start, obj, size, overwrite=False):
"""
Store a variable into the storage.
:param int start: The beginning address of the variable.
:param obj: The object to store.
:param int size: Size of the object to store.
:param bool overwrite: Whether existing obj... | python | def _store(self, start, obj, size, overwrite=False):
"""
Store a variable into the storage.
:param int start: The beginning address of the variable.
:param obj: The object to store.
:param int size: Size of the object to store.
:param bool overwrite: Whether existing obj... | [
"def",
"_store",
"(",
"self",
",",
"start",
",",
"obj",
",",
"size",
",",
"overwrite",
"=",
"False",
")",
":",
"stored_object",
"=",
"StoredObject",
"(",
"start",
",",
"obj",
",",
"size",
")",
"self",
".",
"_object_mapping",
"[",
"stored_object",
".",
... | Store a variable into the storage.
:param int start: The beginning address of the variable.
:param obj: The object to store.
:param int size: Size of the object to store.
:param bool overwrite: Whether existing objects should be overwritten or not.
:return: None | [
"Store",
"a",
"variable",
"into",
"the",
"storage",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/keyed_region.py#L325-L338 | train | Store a variable into the storage. | 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/keyed_region.py | KeyedRegion.__store | def __store(self, stored_object, overwrite=False):
"""
Store a variable into the storage.
:param StoredObject stored_object: The descriptor describing start address and the variable.
:param bool overwrite: Whether existing objects should be overwritten or not. True to make a strong upd... | python | def __store(self, stored_object, overwrite=False):
"""
Store a variable into the storage.
:param StoredObject stored_object: The descriptor describing start address and the variable.
:param bool overwrite: Whether existing objects should be overwritten or not. True to make a strong upd... | [
"def",
"__store",
"(",
"self",
",",
"stored_object",
",",
"overwrite",
"=",
"False",
")",
":",
"start",
"=",
"stored_object",
".",
"start",
"object_size",
"=",
"stored_object",
".",
"size",
"end",
"=",
"start",
"+",
"object_size",
"# region items in the middle",... | Store a variable into the storage.
:param StoredObject stored_object: The descriptor describing start address and the variable.
:param bool overwrite: Whether existing objects should be overwritten or not. True to make a strong update,
False to make a weak update.
... | [
"Store",
"a",
"variable",
"into",
"the",
"storage",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/keyed_region.py#L340-L402 | train | Store a variable into the storage. | 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/analysis.py | Analysis._initialize_progressbar | def _initialize_progressbar(self):
"""
Initialize the progressbar.
:return: None
"""
self._progressbar = progressbar.ProgressBar(widgets=Analysis._PROGRESS_WIDGETS, maxval=10000 * 100).start() | python | def _initialize_progressbar(self):
"""
Initialize the progressbar.
:return: None
"""
self._progressbar = progressbar.ProgressBar(widgets=Analysis._PROGRESS_WIDGETS, maxval=10000 * 100).start() | [
"def",
"_initialize_progressbar",
"(",
"self",
")",
":",
"self",
".",
"_progressbar",
"=",
"progressbar",
".",
"ProgressBar",
"(",
"widgets",
"=",
"Analysis",
".",
"_PROGRESS_WIDGETS",
",",
"maxval",
"=",
"10000",
"*",
"100",
")",
".",
"start",
"(",
")"
] | Initialize the progressbar.
:return: None | [
"Initialize",
"the",
"progressbar",
".",
":",
"return",
":",
"None"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/analysis.py#L163-L169 | train | Initialize the progressbar. | 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/analysis.py | Analysis._update_progress | def _update_progress(self, percentage, **kwargs):
"""
Update the progress with a percentage, including updating the progressbar as well as calling the progress
callback.
:param float percentage: Percentage of the progressbar. from 0.0 to 100.0.
:param kwargs: Oth... | python | def _update_progress(self, percentage, **kwargs):
"""
Update the progress with a percentage, including updating the progressbar as well as calling the progress
callback.
:param float percentage: Percentage of the progressbar. from 0.0 to 100.0.
:param kwargs: Oth... | [
"def",
"_update_progress",
"(",
"self",
",",
"percentage",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"_show_progressbar",
":",
"if",
"self",
".",
"_progressbar",
"is",
"None",
":",
"self",
".",
"_initialize_progressbar",
"(",
")",
"self",
".",
... | Update the progress with a percentage, including updating the progressbar as well as calling the progress
callback.
:param float percentage: Percentage of the progressbar. from 0.0 to 100.0.
:param kwargs: Other parameters that will be passed to the progress_callback handler.
... | [
"Update",
"the",
"progress",
"with",
"a",
"percentage",
"including",
"updating",
"the",
"progressbar",
"as",
"well",
"as",
"calling",
"the",
"progress",
"callback",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/analysis.py#L171-L188 | train | Update the progress with a percentage. | 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/analysis.py | Analysis._finish_progress | def _finish_progress(self):
"""
Mark the progressbar as finished.
:return: None
"""
if self._show_progressbar:
if self._progressbar is None:
self._initialize_progressbar()
if self._progressbar is not None:
self._progressbar... | python | def _finish_progress(self):
"""
Mark the progressbar as finished.
:return: None
"""
if self._show_progressbar:
if self._progressbar is None:
self._initialize_progressbar()
if self._progressbar is not None:
self._progressbar... | [
"def",
"_finish_progress",
"(",
"self",
")",
":",
"if",
"self",
".",
"_show_progressbar",
":",
"if",
"self",
".",
"_progressbar",
"is",
"None",
":",
"self",
".",
"_initialize_progressbar",
"(",
")",
"if",
"self",
".",
"_progressbar",
"is",
"not",
"None",
"... | Mark the progressbar as finished.
:return: None | [
"Mark",
"the",
"progressbar",
"as",
"finished",
".",
":",
"return",
":",
"None"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/analysis.py#L190-L203 | train | Finish the progressbar. | 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.py | VariableRecoveryState.merge | def merge(self, other, successor=None):
"""
Merge two abstract states.
:param VariableRecoveryState other: The other abstract state to merge.
:return: The merged abstract state.
:rtype: VariableRecoveryState
"""
... | python | def merge(self, other, successor=None):
"""
Merge two abstract states.
:param VariableRecoveryState other: The other abstract state to merge.
:return: The merged abstract state.
:rtype: VariableRecoveryState
"""
... | [
"def",
"merge",
"(",
"self",
",",
"other",
",",
"successor",
"=",
"None",
")",
":",
"replacements",
"=",
"{",
"}",
"if",
"successor",
"in",
"self",
".",
"dominance_frontiers",
":",
"replacements",
"=",
"self",
".",
"_make_phi_variables",
"(",
"successor",
... | Merge two abstract states.
:param VariableRecoveryState other: The other abstract state to merge.
:return: The merged abstract state.
:rtype: VariableRecoveryState | [
"Merge",
"two",
"abstract",
"states",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/variable_recovery/variable_recovery.py#L94-L118 | train | Merges 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.py | VariableRecoveryState._addr_to_stack_offset | def _addr_to_stack_offset(self, addr):
"""
Convert an address to a stack offset.
:param claripy.ast.Base addr: The address to convert from.
:return: A stack offset if the addr comes from the stack pointer, or None if the address
... | python | def _addr_to_stack_offset(self, addr):
"""
Convert an address to a stack offset.
:param claripy.ast.Base addr: The address to convert from.
:return: A stack offset if the addr comes from the stack pointer, or None if the address
... | [
"def",
"_addr_to_stack_offset",
"(",
"self",
",",
"addr",
")",
":",
"def",
"_parse",
"(",
"addr",
")",
":",
"if",
"addr",
".",
"op",
"==",
"'__add__'",
":",
"# __add__ might have multiple arguments",
"parsed",
"=",
"[",
"_parse",
"(",
"arg",
")",
"for",
"a... | Convert an address to a stack offset.
:param claripy.ast.Base addr: The address to convert from.
:return: A stack offset if the addr comes from the stack pointer, or None if the address
does not come from the stack pointer. | [
"Convert",
"an",
"address",
"to",
"a",
"stack",
"offset",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/variable_recovery/variable_recovery.py#L325-L372 | train | Convert an address to a stack 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/variable_recovery/variable_recovery.py | VariableRecovery._run_on_node | def _run_on_node(self, node, state):
"""
Take an input abstract state, execute the node, and derive an output state.
:param angr.Block node: The node to work on.
:param VariableRecoveryState state: The input state.
:return: A tuple of (chan... | python | def _run_on_node(self, node, state):
"""
Take an input abstract state, execute the node, and derive an output state.
:param angr.Block node: The node to work on.
:param VariableRecoveryState state: The input state.
:return: A tuple of (chan... | [
"def",
"_run_on_node",
"(",
"self",
",",
"node",
",",
"state",
")",
":",
"l",
".",
"debug",
"(",
"'Analyzing block %#x, iteration %d.'",
",",
"node",
".",
"addr",
",",
"self",
".",
"_node_iterations",
"[",
"node",
"]",
")",
"concrete_state",
"=",
"state",
... | Take an input abstract state, execute the node, and derive an output state.
:param angr.Block node: The node to work on.
:param VariableRecoveryState state: The input state.
:return: A tuple of (changed, new output state).
:rtype: ... | [
"Take",
"an",
"input",
"abstract",
"state",
"execute",
"the",
"node",
"and",
"derive",
"an",
"output",
"state",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/variable_recovery/variable_recovery.py#L451-L493 | train | Execute the node and derive an output 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/cfg/cfg_base.py | CFGBase._initialize_cfg | def _initialize_cfg(self):
"""
Re-create the DiGraph
"""
self.kb.functions = FunctionManager(self.kb)
self._jobs_to_analyze_per_function = defaultdict(set)
self._completed_functions = set() | python | def _initialize_cfg(self):
"""
Re-create the DiGraph
"""
self.kb.functions = FunctionManager(self.kb)
self._jobs_to_analyze_per_function = defaultdict(set)
self._completed_functions = set() | [
"def",
"_initialize_cfg",
"(",
"self",
")",
":",
"self",
".",
"kb",
".",
"functions",
"=",
"FunctionManager",
"(",
"self",
".",
"kb",
")",
"self",
".",
"_jobs_to_analyze_per_function",
"=",
"defaultdict",
"(",
"set",
")",
"self",
".",
"_completed_functions",
... | Re-create the DiGraph | [
"Re",
"-",
"create",
"the",
"DiGraph"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L207-L215 | train | Re - create the DiGraph
| 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_base.py | CFGBase.make_copy | def make_copy(self, copy_to):
"""
Copy self attributes to the new object.
:param CFGBase copy_to: The target to copy to.
:return: None
"""
for attr, value in self.__dict__.items():
if attr.startswith('__') and attr.endswith('__'):
continue
... | python | def make_copy(self, copy_to):
"""
Copy self attributes to the new object.
:param CFGBase copy_to: The target to copy to.
:return: None
"""
for attr, value in self.__dict__.items():
if attr.startswith('__') and attr.endswith('__'):
continue
... | [
"def",
"make_copy",
"(",
"self",
",",
"copy_to",
")",
":",
"for",
"attr",
",",
"value",
"in",
"self",
".",
"__dict__",
".",
"items",
"(",
")",
":",
"if",
"attr",
".",
"startswith",
"(",
"'__'",
")",
"and",
"attr",
".",
"endswith",
"(",
"'__'",
")",... | Copy self attributes to the new object.
:param CFGBase copy_to: The target to copy to.
:return: None | [
"Copy",
"self",
"attributes",
"to",
"the",
"new",
"object",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L229-L240 | train | Copy self attributes to the new 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_base.py | CFGBase._merge_cfgnodes | def _merge_cfgnodes(self, cfgnode_0, cfgnode_1):
"""
Merge two adjacent CFGNodes into one.
:param CFGNode cfgnode_0: The first CFGNode.
:param CFGNode cfgnode_1: The second CFGNode.
:return: None
"""
assert cfgnode_0.addr + cfgnode_0.size ... | python | def _merge_cfgnodes(self, cfgnode_0, cfgnode_1):
"""
Merge two adjacent CFGNodes into one.
:param CFGNode cfgnode_0: The first CFGNode.
:param CFGNode cfgnode_1: The second CFGNode.
:return: None
"""
assert cfgnode_0.addr + cfgnode_0.size ... | [
"def",
"_merge_cfgnodes",
"(",
"self",
",",
"cfgnode_0",
",",
"cfgnode_1",
")",
":",
"assert",
"cfgnode_0",
".",
"addr",
"+",
"cfgnode_0",
".",
"size",
"==",
"cfgnode_1",
".",
"addr",
"addr0",
",",
"addr1",
"=",
"cfgnode_0",
".",
"addr",
",",
"cfgnode_1",
... | Merge two adjacent CFGNodes into one.
:param CFGNode cfgnode_0: The first CFGNode.
:param CFGNode cfgnode_1: The second CFGNode.
:return: None | [
"Merge",
"two",
"adjacent",
"CFGNodes",
"into",
"one",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L326-L365 | train | Merge two adjacent CFGNodes into one. | 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_base.py | CFGBase._to_snippet | def _to_snippet(self, cfg_node=None, addr=None, size=None, thumb=False, jumpkind=None, base_state=None):
"""
Convert a CFGNode instance to a CodeNode object.
:param angr.analyses.CFGNode cfg_node: The CFGNode instance.
:param int addr: Address of the node. Only used when `cfg_node` is N... | python | def _to_snippet(self, cfg_node=None, addr=None, size=None, thumb=False, jumpkind=None, base_state=None):
"""
Convert a CFGNode instance to a CodeNode object.
:param angr.analyses.CFGNode cfg_node: The CFGNode instance.
:param int addr: Address of the node. Only used when `cfg_node` is N... | [
"def",
"_to_snippet",
"(",
"self",
",",
"cfg_node",
"=",
"None",
",",
"addr",
"=",
"None",
",",
"size",
"=",
"None",
",",
"thumb",
"=",
"False",
",",
"jumpkind",
"=",
"None",
",",
"base_state",
"=",
"None",
")",
":",
"if",
"cfg_node",
"is",
"not",
... | Convert a CFGNode instance to a CodeNode object.
:param angr.analyses.CFGNode cfg_node: The CFGNode instance.
:param int addr: Address of the node. Only used when `cfg_node` is None.
:param bool thumb: Whether this is in THUMB mode or not. Only used for ARM code and when `cfg_node` is None.
... | [
"Convert",
"a",
"CFGNode",
"instance",
"to",
"a",
"CodeNode",
"object",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L367-L401 | train | Convert a CFGNode instance to a CodeNode 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_base.py | CFGBase._arm_thumb_filter_jump_successors | def _arm_thumb_filter_jump_successors(self, addr, size, successors, get_ins_addr, get_exit_stmt_idx):
"""
Filter successors for THUMB mode basic blocks, and remove those successors that won't be taken normally.
:param int addr: Address of the basic block / SimIRSB.
:param int size: Size... | python | def _arm_thumb_filter_jump_successors(self, addr, size, successors, get_ins_addr, get_exit_stmt_idx):
"""
Filter successors for THUMB mode basic blocks, and remove those successors that won't be taken normally.
:param int addr: Address of the basic block / SimIRSB.
:param int size: Size... | [
"def",
"_arm_thumb_filter_jump_successors",
"(",
"self",
",",
"addr",
",",
"size",
",",
"successors",
",",
"get_ins_addr",
",",
"get_exit_stmt_idx",
")",
":",
"if",
"not",
"successors",
":",
"return",
"[",
"]",
"it_counter",
"=",
"0",
"conc_temps",
"=",
"{",
... | Filter successors for THUMB mode basic blocks, and remove those successors that won't be taken normally.
:param int addr: Address of the basic block / SimIRSB.
:param int size: Size of the basic block.
:param list successors: A list of successors.
:param func get_ins_addr: A callable th... | [
"Filter",
"successors",
"for",
"THUMB",
"mode",
"basic",
"blocks",
"and",
"remove",
"those",
"successors",
"that",
"won",
"t",
"be",
"taken",
"normally",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L406-L461 | train | Filter successors for THUMB mode basic blocks and remove those that won t be taken normally. | 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_base.py | CFGBase._is_region_extremely_sparse | def _is_region_extremely_sparse(self, start, end, base_state=None):
"""
Check whether the given memory region is extremely sparse, i.e., all bytes are the same value.
:param int start: The beginning of the region.
:param int end: The end of the region.
:param base_state: The b... | python | def _is_region_extremely_sparse(self, start, end, base_state=None):
"""
Check whether the given memory region is extremely sparse, i.e., all bytes are the same value.
:param int start: The beginning of the region.
:param int end: The end of the region.
:param base_state: The b... | [
"def",
"_is_region_extremely_sparse",
"(",
"self",
",",
"start",
",",
"end",
",",
"base_state",
"=",
"None",
")",
":",
"all_bytes",
"=",
"None",
"if",
"base_state",
"is",
"not",
"None",
":",
"all_bytes",
"=",
"base_state",
".",
"memory",
".",
"load",
"(",
... | Check whether the given memory region is extremely sparse, i.e., all bytes are the same value.
:param int start: The beginning of the region.
:param int end: The end of the region.
:param base_state: The base state (optional).
:return: True if the region is extremely sparse,... | [
"Check",
"whether",
"the",
"given",
"memory",
"region",
"is",
"extremely",
"sparse",
"i",
".",
"e",
".",
"all",
"bytes",
"are",
"the",
"same",
"value",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L463-L505 | train | Checks if the given memory region is extremely sparse. | 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_base.py | CFGBase._should_skip_region | def _should_skip_region(self, region_start):
"""
Some regions usually do not contain any executable code, but are still marked as executable. We should skip
those regions by default.
:param int region_start: Address of the beginning of the region.
:return: True/F... | python | def _should_skip_region(self, region_start):
"""
Some regions usually do not contain any executable code, but are still marked as executable. We should skip
those regions by default.
:param int region_start: Address of the beginning of the region.
:return: True/F... | [
"def",
"_should_skip_region",
"(",
"self",
",",
"region_start",
")",
":",
"obj",
"=",
"self",
".",
"project",
".",
"loader",
".",
"find_object_containing",
"(",
"region_start",
",",
"membership_check",
"=",
"False",
")",
"if",
"obj",
"is",
"None",
":",
"retu... | Some regions usually do not contain any executable code, but are still marked as executable. We should skip
those regions by default.
:param int region_start: Address of the beginning of the region.
:return: True/False
:rtype: bool | [
"Some",
"regions",
"usually",
"do",
"not",
"contain",
"any",
"executable",
"code",
"but",
"are",
"still",
"marked",
"as",
"executable",
".",
"We",
"should",
"skip",
"those",
"regions",
"by",
"default",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L507-L527 | train | Returns True if we should skip the region 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/cfg/cfg_base.py | CFGBase._executable_memory_regions | def _executable_memory_regions(self, objects=None, force_segment=False):
"""
Get all executable memory regions from the binaries
:param objects: A collection of binary objects to collect regions from. If None, regions from all project
binary objects are used.
:pa... | python | def _executable_memory_regions(self, objects=None, force_segment=False):
"""
Get all executable memory regions from the binaries
:param objects: A collection of binary objects to collect regions from. If None, regions from all project
binary objects are used.
:pa... | [
"def",
"_executable_memory_regions",
"(",
"self",
",",
"objects",
"=",
"None",
",",
"force_segment",
"=",
"False",
")",
":",
"if",
"objects",
"is",
"None",
":",
"binaries",
"=",
"self",
".",
"project",
".",
"loader",
".",
"all_objects",
"else",
":",
"binar... | Get all executable memory regions from the binaries
:param objects: A collection of binary objects to collect regions from. If None, regions from all project
binary objects are used.
:param bool force_segment: Rely on binary segments instead of sections.
:return: A sorte... | [
"Get",
"all",
"executable",
"memory",
"regions",
"from",
"the",
"binaries"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L529-L598 | train | Get all executable memory regions from the binaries. | 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_base.py | CFGBase._addr_in_exec_memory_regions | def _addr_in_exec_memory_regions(self, addr):
"""
Test if the address belongs to an executable memory region.
:param int addr: The address to test
:return: True if the address belongs to an exectubale memory region, False otherwise
:rtype: bool
"""
for start, en... | python | def _addr_in_exec_memory_regions(self, addr):
"""
Test if the address belongs to an executable memory region.
:param int addr: The address to test
:return: True if the address belongs to an exectubale memory region, False otherwise
:rtype: bool
"""
for start, en... | [
"def",
"_addr_in_exec_memory_regions",
"(",
"self",
",",
"addr",
")",
":",
"for",
"start",
",",
"end",
"in",
"self",
".",
"_exec_mem_regions",
":",
"if",
"start",
"<=",
"addr",
"<",
"end",
":",
"return",
"True",
"return",
"False"
] | Test if the address belongs to an executable memory region.
:param int addr: The address to test
:return: True if the address belongs to an exectubale memory region, False otherwise
:rtype: bool | [
"Test",
"if",
"the",
"address",
"belongs",
"to",
"an",
"executable",
"memory",
"region",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L600-L612 | train | Test if the given address belongs to an executable memory 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/cfg/cfg_base.py | CFGBase._addrs_belong_to_same_section | def _addrs_belong_to_same_section(self, addr_a, addr_b):
"""
Test if two addresses belong to the same section.
:param int addr_a: The first address to test.
:param int addr_b: The second address to test.
:return: True if the two addresses belong to the same section ... | python | def _addrs_belong_to_same_section(self, addr_a, addr_b):
"""
Test if two addresses belong to the same section.
:param int addr_a: The first address to test.
:param int addr_b: The second address to test.
:return: True if the two addresses belong to the same section ... | [
"def",
"_addrs_belong_to_same_section",
"(",
"self",
",",
"addr_a",
",",
"addr_b",
")",
":",
"obj",
"=",
"self",
".",
"project",
".",
"loader",
".",
"find_object_containing",
"(",
"addr_a",
",",
"membership_check",
"=",
"False",
")",
"if",
"obj",
"is",
"None... | Test if two addresses belong to the same section.
:param int addr_a: The first address to test.
:param int addr_b: The second address to test.
:return: True if the two addresses belong to the same section or both of them do not belong to any
section, Fal... | [
"Test",
"if",
"two",
"addresses",
"belong",
"to",
"the",
"same",
"section",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L614-L642 | train | Test if two addresses belong to the same section. | 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_base.py | CFGBase._addr_hooked_or_syscall | def _addr_hooked_or_syscall(self, addr):
"""
Check whether the address belongs to a hook or a syscall.
:param int addr: The address to check.
:return: True if the address is hooked or belongs to a syscall. False otherwise.
:rtype: bool
"""
... | python | def _addr_hooked_or_syscall(self, addr):
"""
Check whether the address belongs to a hook or a syscall.
:param int addr: The address to check.
:return: True if the address is hooked or belongs to a syscall. False otherwise.
:rtype: bool
"""
... | [
"def",
"_addr_hooked_or_syscall",
"(",
"self",
",",
"addr",
")",
":",
"return",
"self",
".",
"project",
".",
"is_hooked",
"(",
"addr",
")",
"or",
"self",
".",
"project",
".",
"simos",
".",
"is_syscall_addr",
"(",
"addr",
")"
] | Check whether the address belongs to a hook or a syscall.
:param int addr: The address to check.
:return: True if the address is hooked or belongs to a syscall. False otherwise.
:rtype: bool | [
"Check",
"whether",
"the",
"address",
"belongs",
"to",
"a",
"hook",
"or",
"a",
"syscall",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L644-L653 | train | Checks whether the given address belongs to a hook or a syscall. | 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_base.py | CFGBase._fast_memory_load_bytes | def _fast_memory_load_bytes(self, addr, length):
"""
Perform a fast memory loading of some data.
:param int addr: Address to read from.
:param int length: Size of the string to load.
:return: A string or None if the address does not exist.
:rtype: bytes ... | python | def _fast_memory_load_bytes(self, addr, length):
"""
Perform a fast memory loading of some data.
:param int addr: Address to read from.
:param int length: Size of the string to load.
:return: A string or None if the address does not exist.
:rtype: bytes ... | [
"def",
"_fast_memory_load_bytes",
"(",
"self",
",",
"addr",
",",
"length",
")",
":",
"try",
":",
"return",
"self",
".",
"project",
".",
"loader",
".",
"memory",
".",
"load",
"(",
"addr",
",",
"length",
")",
"except",
"KeyError",
":",
"return",
"None"
] | Perform a fast memory loading of some data.
:param int addr: Address to read from.
:param int length: Size of the string to load.
:return: A string or None if the address does not exist.
:rtype: bytes or None | [
"Perform",
"a",
"fast",
"memory",
"loading",
"of",
"some",
"data",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L669-L682 | train | Perform a fast memory loading of some 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/cfg/cfg_base.py | CFGBase._fast_memory_load_pointer | def _fast_memory_load_pointer(self, addr, size=None):
"""
Perform a fast memory loading of a pointer.
:param int addr: Address to read from.
:param int size: Size of the pointer. Default to machine-word size.
:return: A pointer or None if the address does not exist.
... | python | def _fast_memory_load_pointer(self, addr, size=None):
"""
Perform a fast memory loading of a pointer.
:param int addr: Address to read from.
:param int size: Size of the pointer. Default to machine-word size.
:return: A pointer or None if the address does not exist.
... | [
"def",
"_fast_memory_load_pointer",
"(",
"self",
",",
"addr",
",",
"size",
"=",
"None",
")",
":",
"try",
":",
"return",
"self",
".",
"project",
".",
"loader",
".",
"memory",
".",
"unpack_word",
"(",
"addr",
",",
"size",
"=",
"size",
")",
"except",
"Key... | Perform a fast memory loading of a pointer.
:param int addr: Address to read from.
:param int size: Size of the pointer. Default to machine-word size.
:return: A pointer or None if the address does not exist.
:rtype: int | [
"Perform",
"a",
"fast",
"memory",
"loading",
"of",
"a",
"pointer",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L684-L697 | train | Perform a fast memory loading of 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/cfg/cfg_base.py | CFGBase._determine_function_returning | def _determine_function_returning(self, func, all_funcs_completed=False):
"""
Determine if a function returns or not.
A function does not return if
a) it is a SimProcedure that has NO_RET being True,
or
b) it is completely recovered (i.e. every block of this function has... | python | def _determine_function_returning(self, func, all_funcs_completed=False):
"""
Determine if a function returns or not.
A function does not return if
a) it is a SimProcedure that has NO_RET being True,
or
b) it is completely recovered (i.e. every block of this function has... | [
"def",
"_determine_function_returning",
"(",
"self",
",",
"func",
",",
"all_funcs_completed",
"=",
"False",
")",
":",
"# If there is at least one return site, then this function is definitely returning",
"if",
"func",
".",
"has_return",
":",
"return",
"True",
"# Let's first s... | Determine if a function returns or not.
A function does not return if
a) it is a SimProcedure that has NO_RET being True,
or
b) it is completely recovered (i.e. every block of this function has been recovered, and no future block will
be added to it), and it does not have a r... | [
"Determine",
"if",
"a",
"function",
"returns",
"or",
"not",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L703-L797 | train | Determines if a function returns or not. | 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_base.py | CFGBase._analyze_function_features | def _analyze_function_features(self, all_funcs_completed=False):
"""
For each function in the function_manager, try to determine if it returns or not. A function does not return if
it calls another function that is known to be not returning, and this function does not have other exits.
... | python | def _analyze_function_features(self, all_funcs_completed=False):
"""
For each function in the function_manager, try to determine if it returns or not. A function does not return if
it calls another function that is known to be not returning, and this function does not have other exits.
... | [
"def",
"_analyze_function_features",
"(",
"self",
",",
"all_funcs_completed",
"=",
"False",
")",
":",
"changes",
"=",
"{",
"'functions_return'",
":",
"[",
"]",
",",
"'functions_do_not_return'",
":",
"[",
"]",
"}",
"if",
"self",
".",
"_updated_nonreturning_function... | For each function in the function_manager, try to determine if it returns or not. A function does not return if
it calls another function that is known to be not returning, and this function does not have other exits.
We might as well analyze other features of functions in the future.
:param b... | [
"For",
"each",
"function",
"in",
"the",
"function_manager",
"try",
"to",
"determine",
"if",
"it",
"returns",
"or",
"not",
".",
"A",
"function",
"does",
"not",
"return",
"if",
"it",
"calls",
"another",
"function",
"that",
"is",
"known",
"to",
"be",
"not",
... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L799-L857 | train | Analyze the function features of functions in the function 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/cfg/cfg_base.py | CFGBase._iteratively_analyze_function_features | def _iteratively_analyze_function_features(self, all_funcs_completed=False):
"""
Iteratively analyze function features until a fixed point is reached.
:return: the "changes" dict
:rtype: dict
"""
changes = {
'functions_do_not_return': set(),
'fu... | python | def _iteratively_analyze_function_features(self, all_funcs_completed=False):
"""
Iteratively analyze function features until a fixed point is reached.
:return: the "changes" dict
:rtype: dict
"""
changes = {
'functions_do_not_return': set(),
'fu... | [
"def",
"_iteratively_analyze_function_features",
"(",
"self",
",",
"all_funcs_completed",
"=",
"False",
")",
":",
"changes",
"=",
"{",
"'functions_do_not_return'",
":",
"set",
"(",
")",
",",
"'functions_return'",
":",
"set",
"(",
")",
"}",
"while",
"True",
":",
... | Iteratively analyze function features until a fixed point is reached.
:return: the "changes" dict
:rtype: dict | [
"Iteratively",
"analyze",
"function",
"features",
"until",
"a",
"fixed",
"point",
"is",
"reached",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L859-L882 | train | Iteratively analyze function features until a fixed point is reached. | 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_base.py | CFGBase.normalize | def normalize(self):
"""
Normalize the CFG, making sure that there are no overlapping basic blocks.
Note that this method will not alter transition graphs of each function in self.kb.functions. You may call
normalize() on each Function object to normalize their transition graphs.
... | python | def normalize(self):
"""
Normalize the CFG, making sure that there are no overlapping basic blocks.
Note that this method will not alter transition graphs of each function in self.kb.functions. You may call
normalize() on each Function object to normalize their transition graphs.
... | [
"def",
"normalize",
"(",
"self",
")",
":",
"graph",
"=",
"self",
".",
"graph",
"smallest_nodes",
"=",
"{",
"}",
"# indexed by end address of the node",
"end_addresses_to_nodes",
"=",
"defaultdict",
"(",
"set",
")",
"for",
"n",
"in",
"graph",
".",
"nodes",
"(",... | Normalize the CFG, making sure that there are no overlapping basic blocks.
Note that this method will not alter transition graphs of each function in self.kb.functions. You may call
normalize() on each Function object to normalize their transition graphs.
:return: None | [
"Normalize",
"the",
"CFG",
"making",
"sure",
"that",
"there",
"are",
"no",
"overlapping",
"basic",
"blocks",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L884-L973 | train | Normalizes the CFG making sure that there are no overlapping basic blocks. | 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_base.py | CFGBase._get_finished_functions | def _get_finished_functions(self):
"""
Obtain all functions of which we have finished analyzing. As _jobs_to_analyze_per_function is a defaultdict(),
if a function address shows up in it with an empty job list, we consider we have exhausted all jobs of this
function (both current jobs an... | python | def _get_finished_functions(self):
"""
Obtain all functions of which we have finished analyzing. As _jobs_to_analyze_per_function is a defaultdict(),
if a function address shows up in it with an empty job list, we consider we have exhausted all jobs of this
function (both current jobs an... | [
"def",
"_get_finished_functions",
"(",
"self",
")",
":",
"finished_func_addrs",
"=",
"[",
"]",
"for",
"func_addr",
",",
"all_jobs",
"in",
"self",
".",
"_jobs_to_analyze_per_function",
".",
"items",
"(",
")",
":",
"if",
"not",
"all_jobs",
":",
"# great! we have f... | Obtain all functions of which we have finished analyzing. As _jobs_to_analyze_per_function is a defaultdict(),
if a function address shows up in it with an empty job list, we consider we have exhausted all jobs of this
function (both current jobs and pending jobs), thus the analysis of this function is ... | [
"Obtain",
"all",
"functions",
"of",
"which",
"we",
"have",
"finished",
"analyzing",
".",
"As",
"_jobs_to_analyze_per_function",
"is",
"a",
"defaultdict",
"()",
"if",
"a",
"function",
"address",
"shows",
"up",
"in",
"it",
"with",
"an",
"empty",
"job",
"list",
... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1110-L1126 | train | Return a list of all functions that have finished 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_base.py | CFGBase._cleanup_analysis_jobs | def _cleanup_analysis_jobs(self, finished_func_addrs=None):
"""
From job manager, remove all functions of which we have finished analysis.
:param list or None finished_func_addrs: A list of addresses of functions of which we have finished analysis.
... | python | def _cleanup_analysis_jobs(self, finished_func_addrs=None):
"""
From job manager, remove all functions of which we have finished analysis.
:param list or None finished_func_addrs: A list of addresses of functions of which we have finished analysis.
... | [
"def",
"_cleanup_analysis_jobs",
"(",
"self",
",",
"finished_func_addrs",
"=",
"None",
")",
":",
"if",
"finished_func_addrs",
"is",
"None",
":",
"finished_func_addrs",
"=",
"self",
".",
"_get_finished_functions",
"(",
")",
"for",
"func_addr",
"in",
"finished_func_ad... | From job manager, remove all functions of which we have finished analysis.
:param list or None finished_func_addrs: A list of addresses of functions of which we have finished analysis.
A new list of function addresses will be obtained by calling
... | [
"From",
"job",
"manager",
"remove",
"all",
"functions",
"of",
"which",
"we",
"have",
"finished",
"analysis",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1128-L1143 | train | This function is called by _get_finished_functions to remove all functions of which we have finished 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_base.py | CFGBase._make_completed_functions | def _make_completed_functions(self):
"""
Fill in self._completed_functions list and clean up job manager.
:return: None
"""
finished = self._get_finished_functions()
for func_addr in finished:
self._completed_functions.add(func_addr)
self._cleanup_an... | python | def _make_completed_functions(self):
"""
Fill in self._completed_functions list and clean up job manager.
:return: None
"""
finished = self._get_finished_functions()
for func_addr in finished:
self._completed_functions.add(func_addr)
self._cleanup_an... | [
"def",
"_make_completed_functions",
"(",
"self",
")",
":",
"finished",
"=",
"self",
".",
"_get_finished_functions",
"(",
")",
"for",
"func_addr",
"in",
"finished",
":",
"self",
".",
"_completed_functions",
".",
"add",
"(",
"func_addr",
")",
"self",
".",
"_clea... | Fill in self._completed_functions list and clean up job manager.
:return: None | [
"Fill",
"in",
"self",
".",
"_completed_functions",
"list",
"and",
"clean",
"up",
"job",
"manager",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1145-L1155 | train | Fill in self. _completed_functions list and clean up job 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/cfg/cfg_base.py | CFGBase.remove_function_alignments | def remove_function_alignments(self):
"""
Remove all function alignments.
:return: None
"""
# This function requires Capstone engine support
if not self.project.arch.capstone_support:
return
for func_addr in self.kb.functions.keys():
fun... | python | def remove_function_alignments(self):
"""
Remove all function alignments.
:return: None
"""
# This function requires Capstone engine support
if not self.project.arch.capstone_support:
return
for func_addr in self.kb.functions.keys():
fun... | [
"def",
"remove_function_alignments",
"(",
"self",
")",
":",
"# This function requires Capstone engine support",
"if",
"not",
"self",
".",
"project",
".",
"arch",
".",
"capstone_support",
":",
"return",
"for",
"func_addr",
"in",
"self",
".",
"kb",
".",
"functions",
... | Remove all function alignments.
:return: None | [
"Remove",
"all",
"function",
"alignments",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1161-L1183 | train | Remove all function alignments. | 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_base.py | CFGBase.make_functions | def make_functions(self):
"""
Revisit the entire control flow graph, create Function instances accordingly, and correctly put blocks into
each function.
Although Function objects are crated during the CFG recovery, they are neither sound nor accurate. With a
pre-constructed CFG,... | python | def make_functions(self):
"""
Revisit the entire control flow graph, create Function instances accordingly, and correctly put blocks into
each function.
Although Function objects are crated during the CFG recovery, they are neither sound nor accurate. With a
pre-constructed CFG,... | [
"def",
"make_functions",
"(",
"self",
")",
":",
"# TODO: Is it required that PLT stubs are always aligned by 16? If so, on what architectures and platforms is it",
"# TODO: enforced?",
"tmp_functions",
"=",
"self",
".",
"kb",
".",
"functions",
".",
"copy",
"(",
")",
"for",
"... | Revisit the entire control flow graph, create Function instances accordingly, and correctly put blocks into
each function.
Although Function objects are crated during the CFG recovery, they are neither sound nor accurate. With a
pre-constructed CFG, this method rebuilds all functions bearing th... | [
"Revisit",
"the",
"entire",
"control",
"flow",
"graph",
"create",
"Function",
"instances",
"accordingly",
"and",
"correctly",
"put",
"blocks",
"into",
"each",
"function",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1185-L1320 | train | Revisit the entire control flow graph and create Function instances accordingly. | 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_base.py | CFGBase._process_irrational_functions | def _process_irrational_functions(self, functions, predetermined_function_addrs, blockaddr_to_function):
"""
For unresolveable indirect jumps, angr marks those jump targets as individual functions. For example, usually
the following pattern is seen:
sub_0x400010:
push ebp
... | python | def _process_irrational_functions(self, functions, predetermined_function_addrs, blockaddr_to_function):
"""
For unresolveable indirect jumps, angr marks those jump targets as individual functions. For example, usually
the following pattern is seen:
sub_0x400010:
push ebp
... | [
"def",
"_process_irrational_functions",
"(",
"self",
",",
"functions",
",",
"predetermined_function_addrs",
",",
"blockaddr_to_function",
")",
":",
"functions_to_remove",
"=",
"{",
"}",
"functions_can_be_removed",
"=",
"set",
"(",
"functions",
".",
"keys",
"(",
")",
... | For unresolveable indirect jumps, angr marks those jump targets as individual functions. For example, usually
the following pattern is seen:
sub_0x400010:
push ebp
mov esp, ebp
...
cmp eax, 10
ja end
mov eax, jumptable[eax]
... | [
"For",
"unresolveable",
"indirect",
"jumps",
"angr",
"marks",
"those",
"jump",
"targets",
"as",
"individual",
"functions",
".",
"For",
"example",
"usually",
"the",
"following",
"pattern",
"is",
"seen",
":"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1322-L1473 | train | This method is used to remove functions that are not in the function manager and add them to the function 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/cfg/cfg_base.py | CFGBase._process_irrational_function_starts | def _process_irrational_function_starts(self, functions, predetermined_function_addrs, blockaddr_to_function):
"""
Functions that are identified via function prologues can be starting after the actual beginning of the function.
For example, the following function (with an incorrect start) might ... | python | def _process_irrational_function_starts(self, functions, predetermined_function_addrs, blockaddr_to_function):
"""
Functions that are identified via function prologues can be starting after the actual beginning of the function.
For example, the following function (with an incorrect start) might ... | [
"def",
"_process_irrational_function_starts",
"(",
"self",
",",
"functions",
",",
"predetermined_function_addrs",
",",
"blockaddr_to_function",
")",
":",
"addrs",
"=",
"sorted",
"(",
"k",
"for",
"k",
"in",
"functions",
".",
"keys",
"(",
")",
"if",
"not",
"self",... | Functions that are identified via function prologues can be starting after the actual beginning of the function.
For example, the following function (with an incorrect start) might exist after a CFG recovery:
sub_8049f70:
push esi
sub_8049f71:
sub esp, 0A8h
... | [
"Functions",
"that",
"are",
"identified",
"via",
"function",
"prologues",
"can",
"be",
"starting",
"after",
"the",
"actual",
"beginning",
"of",
"the",
"function",
".",
"For",
"example",
"the",
"following",
"function",
"(",
"with",
"an",
"incorrect",
"start",
"... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1475-L1557 | train | This method is used to remove functions that are not called by other functions. | 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_base.py | CFGBase._addr_to_function | def _addr_to_function(self, addr, blockaddr_to_function, known_functions):
"""
Convert an address to a Function object, and store the mapping in a dict. If the block is known to be part of a
function, just return that function.
:param int addr: Address to convert
:param dict blo... | python | def _addr_to_function(self, addr, blockaddr_to_function, known_functions):
"""
Convert an address to a Function object, and store the mapping in a dict. If the block is known to be part of a
function, just return that function.
:param int addr: Address to convert
:param dict blo... | [
"def",
"_addr_to_function",
"(",
"self",
",",
"addr",
",",
"blockaddr_to_function",
",",
"known_functions",
")",
":",
"if",
"addr",
"in",
"blockaddr_to_function",
":",
"f",
"=",
"blockaddr_to_function",
"[",
"addr",
"]",
"else",
":",
"is_syscall",
"=",
"self",
... | Convert an address to a Function object, and store the mapping in a dict. If the block is known to be part of a
function, just return that function.
:param int addr: Address to convert
:param dict blockaddr_to_function: A mapping between block addresses to Function instances.
:param ang... | [
"Convert",
"an",
"address",
"to",
"a",
"Function",
"object",
"and",
"store",
"the",
"mapping",
"in",
"a",
"dict",
".",
"If",
"the",
"block",
"is",
"known",
"to",
"be",
"part",
"of",
"a",
"function",
"just",
"return",
"that",
"function",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1559-L1600 | train | Convert an address to a Function object and store the mapping between the block addresses to the function 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_base.py | CFGBase._is_tail_call_optimization | def _is_tail_call_optimization(self, g : networkx.DiGraph, src_addr, dst_addr, src_function, all_edges,
known_functions, blockaddr_to_function):
"""
If source and destination belong to the same function, and the following criteria apply:
- source node has only ... | python | def _is_tail_call_optimization(self, g : networkx.DiGraph, src_addr, dst_addr, src_function, all_edges,
known_functions, blockaddr_to_function):
"""
If source and destination belong to the same function, and the following criteria apply:
- source node has only ... | [
"def",
"_is_tail_call_optimization",
"(",
"self",
",",
"g",
":",
"networkx",
".",
"DiGraph",
",",
"src_addr",
",",
"dst_addr",
",",
"src_function",
",",
"all_edges",
",",
"known_functions",
",",
"blockaddr_to_function",
")",
":",
"def",
"_has_more_than_one_exit",
... | If source and destination belong to the same function, and the following criteria apply:
- source node has only one default exit
- destination is not one of the known functions
- destination does not belong to another function, or destination belongs to the same function that
source be... | [
"If",
"source",
"and",
"destination",
"belong",
"to",
"the",
"same",
"function",
"and",
"the",
"following",
"criteria",
"apply",
":",
"-",
"source",
"node",
"has",
"only",
"one",
"default",
"exit",
"-",
"destination",
"is",
"not",
"one",
"of",
"the",
"know... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1602-L1663 | train | Checks if the source and destination nodes are tail - call optimizations. | 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_base.py | CFGBase._graph_bfs_custom | def _graph_bfs_custom(self, g, starts, callback, blockaddr_to_function, known_functions, traversed_cfg_nodes=None):
"""
A customized control flow graph BFS implementation with the following rules:
- Call edges are not followed.
- Syscall edges are not followed.
:param networkx.D... | python | def _graph_bfs_custom(self, g, starts, callback, blockaddr_to_function, known_functions, traversed_cfg_nodes=None):
"""
A customized control flow graph BFS implementation with the following rules:
- Call edges are not followed.
- Syscall edges are not followed.
:param networkx.D... | [
"def",
"_graph_bfs_custom",
"(",
"self",
",",
"g",
",",
"starts",
",",
"callback",
",",
"blockaddr_to_function",
",",
"known_functions",
",",
"traversed_cfg_nodes",
"=",
"None",
")",
":",
"stack",
"=",
"OrderedSet",
"(",
"starts",
")",
"traversed",
"=",
"set",... | A customized control flow graph BFS implementation with the following rules:
- Call edges are not followed.
- Syscall edges are not followed.
:param networkx.DiGraph g: The graph.
:param list starts: A collection of beginning nodes to start graph traversal.
:param func callback:... | [
"A",
"customized",
"control",
"flow",
"graph",
"BFS",
"implementation",
"with",
"the",
"following",
"rules",
":",
"-",
"Call",
"edges",
"are",
"not",
"followed",
".",
"-",
"Syscall",
"edges",
"are",
"not",
"followed",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1665-L1709 | train | A custom control flow graph BFS implementation with the following rules. | 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_base.py | CFGBase._graph_traversal_handler | def _graph_traversal_handler(self, g, src, dst, data, blockaddr_to_function, known_functions, all_edges):
"""
Graph traversal handler. It takes in a node or an edge, and create new functions or add nodes to existing
functions accordingly. Oh, it also create edges on the transition map of functio... | python | def _graph_traversal_handler(self, g, src, dst, data, blockaddr_to_function, known_functions, all_edges):
"""
Graph traversal handler. It takes in a node or an edge, and create new functions or add nodes to existing
functions accordingly. Oh, it also create edges on the transition map of functio... | [
"def",
"_graph_traversal_handler",
"(",
"self",
",",
"g",
",",
"src",
",",
"dst",
",",
"data",
",",
"blockaddr_to_function",
",",
"known_functions",
",",
"all_edges",
")",
":",
"src_addr",
"=",
"src",
".",
"addr",
"src_function",
"=",
"self",
".",
"_addr_to_... | Graph traversal handler. It takes in a node or an edge, and create new functions or add nodes to existing
functions accordingly. Oh, it also create edges on the transition map of functions.
:param g: The control flow graph that is currently being traversed.
:param CFGNode src: Beginni... | [
"Graph",
"traversal",
"handler",
".",
"It",
"takes",
"in",
"a",
"node",
"or",
"an",
"edge",
"and",
"create",
"new",
"functions",
"or",
"add",
"nodes",
"to",
"existing",
"functions",
"accordingly",
".",
"Oh",
"it",
"also",
"create",
"edges",
"on",
"the",
... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1711-L1922 | train | This function is called by the function manager when a CFG is traversed. It creates new functions or adds nodes to existing functions accordingly. | 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_base.py | CFGBase._is_noop_block | def _is_noop_block(arch, block):
"""
Check if the block is a no-op block by checking VEX statements.
:param block: The VEX block instance.
:return: True if the entire block is a single-byte or multi-byte nop instruction, False otherwise.
:rtype: bool
"""
if arch... | python | def _is_noop_block(arch, block):
"""
Check if the block is a no-op block by checking VEX statements.
:param block: The VEX block instance.
:return: True if the entire block is a single-byte or multi-byte nop instruction, False otherwise.
:rtype: bool
"""
if arch... | [
"def",
"_is_noop_block",
"(",
"arch",
",",
"block",
")",
":",
"if",
"arch",
".",
"name",
"==",
"\"MIPS32\"",
":",
"if",
"arch",
".",
"memory_endness",
"==",
"\"Iend_BE\"",
":",
"MIPS32_BE_NOOPS",
"=",
"{",
"b\"\\x00\\x20\\x08\\x25\"",
",",
"# move $at, $at",
"... | Check if the block is a no-op block by checking VEX statements.
:param block: The VEX block instance.
:return: True if the entire block is a single-byte or multi-byte nop instruction, False otherwise.
:rtype: bool | [
"Check",
"if",
"the",
"block",
"is",
"a",
"no",
"-",
"op",
"block",
"by",
"checking",
"VEX",
"statements",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1929-L1952 | train | Checks if the block is a no - op block by checking VEX 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/cfg/cfg_base.py | CFGBase._is_noop_insn | def _is_noop_insn(insn):
"""
Check if the instruction does nothing.
:param insn: The capstone insn object.
:return: True if the instruction does no-op, False otherwise.
"""
if insn.insn_name() == 'nop':
# nops
return True
if insn.insn_nam... | python | def _is_noop_insn(insn):
"""
Check if the instruction does nothing.
:param insn: The capstone insn object.
:return: True if the instruction does no-op, False otherwise.
"""
if insn.insn_name() == 'nop':
# nops
return True
if insn.insn_nam... | [
"def",
"_is_noop_insn",
"(",
"insn",
")",
":",
"if",
"insn",
".",
"insn_name",
"(",
")",
"==",
"'nop'",
":",
"# nops",
"return",
"True",
"if",
"insn",
".",
"insn_name",
"(",
")",
"==",
"'lea'",
":",
"# lea reg, [reg + 0]",
"op0",
",",
"op1",
"=",
"insn... | Check if the instruction does nothing.
:param insn: The capstone insn object.
:return: True if the instruction does no-op, False otherwise. | [
"Check",
"if",
"the",
"instruction",
"does",
"nothing",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1955-L1976 | train | Check if the instruction does nothing. | 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_base.py | CFGBase._get_nop_length | def _get_nop_length(cls, insns):
"""
Calculate the total size of leading nop instructions.
:param insns: A list of capstone insn objects.
:return: Number of bytes of leading nop instructions.
:rtype: int
"""
nop_length = 0
if insns and cls._is_noop_insn... | python | def _get_nop_length(cls, insns):
"""
Calculate the total size of leading nop instructions.
:param insns: A list of capstone insn objects.
:return: Number of bytes of leading nop instructions.
:rtype: int
"""
nop_length = 0
if insns and cls._is_noop_insn... | [
"def",
"_get_nop_length",
"(",
"cls",
",",
"insns",
")",
":",
"nop_length",
"=",
"0",
"if",
"insns",
"and",
"cls",
".",
"_is_noop_insn",
"(",
"insns",
"[",
"0",
"]",
")",
":",
"# see where those nop instructions terminate",
"for",
"insn",
"in",
"insns",
":",... | Calculate the total size of leading nop instructions.
:param insns: A list of capstone insn objects.
:return: Number of bytes of leading nop instructions.
:rtype: int | [
"Calculate",
"the",
"total",
"size",
"of",
"leading",
"nop",
"instructions",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L1979-L1998 | train | Calculate the total length of leading nop instructions. | 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_base.py | CFGBase._lift | def _lift(self, *args, **kwargs):
"""
Lift a basic block of code. Will use the base state as a source of bytes if possible.
"""
if 'backup_state' not in kwargs:
kwargs['backup_state'] = self._base_state
return self.project.factory.block(*args, **kwargs) | python | def _lift(self, *args, **kwargs):
"""
Lift a basic block of code. Will use the base state as a source of bytes if possible.
"""
if 'backup_state' not in kwargs:
kwargs['backup_state'] = self._base_state
return self.project.factory.block(*args, **kwargs) | [
"def",
"_lift",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"'backup_state'",
"not",
"in",
"kwargs",
":",
"kwargs",
"[",
"'backup_state'",
"]",
"=",
"self",
".",
"_base_state",
"return",
"self",
".",
"project",
".",
"factory... | Lift a basic block of code. Will use the base state as a source of bytes if possible. | [
"Lift",
"a",
"basic",
"block",
"of",
"code",
".",
"Will",
"use",
"the",
"base",
"state",
"as",
"a",
"source",
"of",
"bytes",
"if",
"possible",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L2015-L2021 | train | Internal helper to create a basic block of 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/cfg/cfg_base.py | CFGBase._resolve_indirect_jump_timelessly | def _resolve_indirect_jump_timelessly(self, addr, block, func_addr, jumpkind):
"""
Checks if MIPS32 and calls MIPS32 check, otherwise false
:param int addr: irsb address
:param pyvex.IRSB block: irsb
:param int func_addr: Function address
:return: If it was resolved and ... | python | def _resolve_indirect_jump_timelessly(self, addr, block, func_addr, jumpkind):
"""
Checks if MIPS32 and calls MIPS32 check, otherwise false
:param int addr: irsb address
:param pyvex.IRSB block: irsb
:param int func_addr: Function address
:return: If it was resolved and ... | [
"def",
"_resolve_indirect_jump_timelessly",
"(",
"self",
",",
"addr",
",",
"block",
",",
"func_addr",
",",
"jumpkind",
")",
":",
"if",
"block",
".",
"statements",
"is",
"None",
":",
"block",
"=",
"self",
".",
"project",
".",
"factory",
".",
"block",
"(",
... | Checks if MIPS32 and calls MIPS32 check, otherwise false
:param int addr: irsb address
:param pyvex.IRSB block: irsb
:param int func_addr: Function address
:return: If it was resolved and targets alongside it
:rtype: tuple | [
"Checks",
"if",
"MIPS32",
"and",
"calls",
"MIPS32",
"check",
"otherwise",
"false"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L2027-L2046 | train | Checks if MIPS32 and calls MIPS32 check otherwise false
| 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_base.py | CFGBase._indirect_jump_resolved | def _indirect_jump_resolved(self, jump, jump_addr, resolved_by, targets):
"""
Called when an indirect jump is successfully resolved.
:param IndirectJump jump: The resolved indirect jump, or None if an IndirectJump instance is
... | python | def _indirect_jump_resolved(self, jump, jump_addr, resolved_by, targets):
"""
Called when an indirect jump is successfully resolved.
:param IndirectJump jump: The resolved indirect jump, or None if an IndirectJump instance is
... | [
"def",
"_indirect_jump_resolved",
"(",
"self",
",",
"jump",
",",
"jump_addr",
",",
"resolved_by",
",",
"targets",
")",
":",
"addr",
"=",
"jump",
".",
"addr",
"if",
"jump",
"is",
"not",
"None",
"else",
"jump_addr",
"l",
".",
"debug",
"(",
"'The indirect jum... | Called when an indirect jump is successfully resolved.
:param IndirectJump jump: The resolved indirect jump, or None if an IndirectJump instance is
not available.
:param int jump_addr: Address of the resolved in... | [
"Called",
"when",
"an",
"indirect",
"jump",
"is",
"successfully",
"resolved",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L2048-L2064 | train | Called when an indirect jump is successfully resolved. | 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_base.py | CFGBase._indirect_jump_unresolved | def _indirect_jump_unresolved(self, jump):
"""
Called when we cannot resolve an indirect jump.
:param IndirectJump jump: The unresolved indirect jump.
:return: None
"""
l.debug('Failed to resolve the indirect jump at %#x.', jump.addr)
# tell KnowledgeBase that ... | python | def _indirect_jump_unresolved(self, jump):
"""
Called when we cannot resolve an indirect jump.
:param IndirectJump jump: The unresolved indirect jump.
:return: None
"""
l.debug('Failed to resolve the indirect jump at %#x.', jump.addr)
# tell KnowledgeBase that ... | [
"def",
"_indirect_jump_unresolved",
"(",
"self",
",",
"jump",
")",
":",
"l",
".",
"debug",
"(",
"'Failed to resolve the indirect jump at %#x.'",
",",
"jump",
".",
"addr",
")",
"# tell KnowledgeBase that it's not resolved",
"# TODO: self.kb._unresolved_indirect_jumps is not proc... | Called when we cannot resolve an indirect jump.
:param IndirectJump jump: The unresolved indirect jump.
:return: None | [
"Called",
"when",
"we",
"cannot",
"resolve",
"an",
"indirect",
"jump",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L2066-L2078 | train | Called when we cannot resolve an indirect jump. | 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_base.py | CFGBase._indirect_jump_encountered | def _indirect_jump_encountered(self, addr, cfg_node, irsb, func_addr, stmt_idx=DEFAULT_STATEMENT):
"""
Called when we encounter an indirect jump. We will try to resolve this indirect jump using timeless (fast)
indirect jump resolvers. If it cannot be resolved, we will see if this indirect jump h... | python | def _indirect_jump_encountered(self, addr, cfg_node, irsb, func_addr, stmt_idx=DEFAULT_STATEMENT):
"""
Called when we encounter an indirect jump. We will try to resolve this indirect jump using timeless (fast)
indirect jump resolvers. If it cannot be resolved, we will see if this indirect jump h... | [
"def",
"_indirect_jump_encountered",
"(",
"self",
",",
"addr",
",",
"cfg_node",
",",
"irsb",
",",
"func_addr",
",",
"stmt_idx",
"=",
"DEFAULT_STATEMENT",
")",
":",
"jumpkind",
"=",
"irsb",
".",
"jumpkind",
"l",
".",
"debug",
"(",
"'(%s) IRSB %#x has an indirect ... | Called when we encounter an indirect jump. We will try to resolve this indirect jump using timeless (fast)
indirect jump resolvers. If it cannot be resolved, we will see if this indirect jump has been resolved before.
:param int addr: Address of the block containing the indirect jump.
... | [
"Called",
"when",
"we",
"encounter",
"an",
"indirect",
"jump",
".",
"We",
"will",
"try",
"to",
"resolve",
"this",
"indirect",
"jump",
"using",
"timeless",
"(",
"fast",
")",
"indirect",
"jump",
"resolvers",
".",
"If",
"it",
"cannot",
"be",
"resolved",
"we",... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L2080-L2118 | train | Called when an indirect jump is encountered. | 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_base.py | CFGBase._process_unresolved_indirect_jumps | def _process_unresolved_indirect_jumps(self):
"""
Resolve all unresolved indirect jumps found in previous scanning.
Currently we support resolving the following types of indirect jumps:
- Ijk_Call: indirect calls where the function address is passed in from a proceeding basic block
... | python | def _process_unresolved_indirect_jumps(self):
"""
Resolve all unresolved indirect jumps found in previous scanning.
Currently we support resolving the following types of indirect jumps:
- Ijk_Call: indirect calls where the function address is passed in from a proceeding basic block
... | [
"def",
"_process_unresolved_indirect_jumps",
"(",
"self",
")",
":",
"l",
".",
"info",
"(",
"\"%d indirect jumps to resolve.\"",
",",
"len",
"(",
"self",
".",
"_indirect_jumps_to_resolve",
")",
")",
"all_targets",
"=",
"set",
"(",
")",
"for",
"idx",
",",
"jump",
... | Resolve all unresolved indirect jumps found in previous scanning.
Currently we support resolving the following types of indirect jumps:
- Ijk_Call: indirect calls where the function address is passed in from a proceeding basic block
- Ijk_Boring: jump tables
- For an up-to-date list, se... | [
"Resolve",
"all",
"unresolved",
"indirect",
"jumps",
"found",
"in",
"previous",
"scanning",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L2120-L2143 | train | Resolves unresolved indirect jumps in previous scanning. | 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_base.py | CFGBase._process_one_indirect_jump | def _process_one_indirect_jump(self, jump):
"""
Resolve a given indirect jump.
:param IndirectJump jump: The IndirectJump instance.
:return: A set of resolved indirect jump targets (ints).
"""
resolved = False
resolved_by = None
targets = None
... | python | def _process_one_indirect_jump(self, jump):
"""
Resolve a given indirect jump.
:param IndirectJump jump: The IndirectJump instance.
:return: A set of resolved indirect jump targets (ints).
"""
resolved = False
resolved_by = None
targets = None
... | [
"def",
"_process_one_indirect_jump",
"(",
"self",
",",
"jump",
")",
":",
"resolved",
"=",
"False",
"resolved_by",
"=",
"None",
"targets",
"=",
"None",
"block",
"=",
"self",
".",
"_lift",
"(",
"jump",
".",
"addr",
",",
"opt_level",
"=",
"1",
")",
"for",
... | Resolve a given indirect jump.
:param IndirectJump jump: The IndirectJump instance.
:return: A set of resolved indirect jump targets (ints). | [
"Resolve",
"a",
"given",
"indirect",
"jump",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_base.py#L2145-L2175 | train | Resolves a given indirect jump. | 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/indirect_jump_resolvers/jumptable.py | JumpTableResolver.resolve | def resolve(self, cfg, addr, func_addr, block, jumpkind):
"""
Resolves jump tables.
:param cfg: A CFG instance.
:param int addr: IRSB address.
:param int func_addr: The function address.
:param pyvex.IRSB block: The IRSB.
:return: A bool indicating whether the in... | python | def resolve(self, cfg, addr, func_addr, block, jumpkind):
"""
Resolves jump tables.
:param cfg: A CFG instance.
:param int addr: IRSB address.
:param int func_addr: The function address.
:param pyvex.IRSB block: The IRSB.
:return: A bool indicating whether the in... | [
"def",
"resolve",
"(",
"self",
",",
"cfg",
",",
"addr",
",",
"func_addr",
",",
"block",
",",
"jumpkind",
")",
":",
"project",
"=",
"self",
".",
"project",
"# short-hand",
"self",
".",
"_max_targets",
"=",
"cfg",
".",
"_indirect_jump_target_limit",
"# Perform... | Resolves jump tables.
:param cfg: A CFG instance.
:param int addr: IRSB address.
:param int func_addr: The function address.
:param pyvex.IRSB block: The IRSB.
:return: A bool indicating whether the indirect jump is resolved successfully, and a list of resolved targets
:... | [
"Resolves",
"jump",
"tables",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/indirect_jump_resolvers/jumptable.py#L78-L537 | train | Resolves indirect jump tables. | 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/indirect_jump_resolvers/jumptable.py | JumpTableResolver._parse_load_statement | def _parse_load_statement(load_stmt, state):
"""
Parse a memory load VEX statement and get the jump target addresses.
:param load_stmt: The VEX statement for loading the jump target addresses.
:param state: The SimState instance (in static mode).
:return: An a... | python | def _parse_load_statement(load_stmt, state):
"""
Parse a memory load VEX statement and get the jump target addresses.
:param load_stmt: The VEX statement for loading the jump target addresses.
:param state: The SimState instance (in static mode).
:return: An a... | [
"def",
"_parse_load_statement",
"(",
"load_stmt",
",",
"state",
")",
":",
"# The jump table address is stored in a tmp. In this case, we find the jump-target loading tmp.",
"load_addr_tmp",
"=",
"None",
"if",
"isinstance",
"(",
"load_stmt",
",",
"pyvex",
".",
"IRStmt",
".",
... | Parse a memory load VEX statement and get the jump target addresses.
:param load_stmt: The VEX statement for loading the jump target addresses.
:param state: The SimState instance (in static mode).
:return: An abstract value (or a concrete value) representing the jump target ... | [
"Parse",
"a",
"memory",
"load",
"VEX",
"statement",
"and",
"get",
"the",
"jump",
"target",
"addresses",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/indirect_jump_resolvers/jumptable.py#L666-L724 | train | Parse a memory load statement and return the jump target 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/segment_list.py | SegmentList._search | def _search(self, addr):
"""
Checks which segment that the address `addr` should belong to, and, returns the offset of that segment.
Note that the address may not actually belong to the block.
:param addr: The address to search
:return: The offset of the segment.
"""
... | python | def _search(self, addr):
"""
Checks which segment that the address `addr` should belong to, and, returns the offset of that segment.
Note that the address may not actually belong to the block.
:param addr: The address to search
:return: The offset of the segment.
"""
... | [
"def",
"_search",
"(",
"self",
",",
"addr",
")",
":",
"start",
"=",
"0",
"end",
"=",
"len",
"(",
"self",
".",
"_list",
")",
"while",
"start",
"!=",
"end",
":",
"mid",
"=",
"(",
"start",
"+",
"end",
")",
"//",
"2",
"segment",
"=",
"self",
".",
... | Checks which segment that the address `addr` should belong to, and, returns the offset of that segment.
Note that the address may not actually belong to the block.
:param addr: The address to search
:return: The offset of the segment. | [
"Checks",
"which",
"segment",
"that",
"the",
"address",
"addr",
"should",
"belong",
"to",
"and",
"returns",
"the",
"offset",
"of",
"that",
"segment",
".",
"Note",
"that",
"the",
"address",
"may",
"not",
"actually",
"belong",
"to",
"the",
"block",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/segment_list.py#L76-L101 | train | Searches the segment list for the entry that the address addr belongs to and returns the offset of that segment. | 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/segment_list.py | SegmentList._insert_and_merge | def _insert_and_merge(self, address, size, sort, idx):
"""
Determines whether the block specified by (address, size) should be merged with adjacent blocks.
:param int address: Starting address of the block to be merged.
:param int size: Size of the block to be merged.
:param str... | python | def _insert_and_merge(self, address, size, sort, idx):
"""
Determines whether the block specified by (address, size) should be merged with adjacent blocks.
:param int address: Starting address of the block to be merged.
:param int size: Size of the block to be merged.
:param str... | [
"def",
"_insert_and_merge",
"(",
"self",
",",
"address",
",",
"size",
",",
"sort",
",",
"idx",
")",
":",
"# sanity check",
"if",
"idx",
">",
"0",
"and",
"address",
"+",
"size",
"<=",
"self",
".",
"_list",
"[",
"idx",
"-",
"1",
"]",
".",
"start",
":... | Determines whether the block specified by (address, size) should be merged with adjacent blocks.
:param int address: Starting address of the block to be merged.
:param int size: Size of the block to be merged.
:param str sort: Type of the block.
:param int idx: ID of the address.
... | [
"Determines",
"whether",
"the",
"block",
"specified",
"by",
"(",
"address",
"size",
")",
"should",
"be",
"merged",
"with",
"adjacent",
"blocks",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/segment_list.py#L103-L152 | train | Insert a new entry into the internal list and merge it with the other entries. | 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/segment_list.py | SegmentList._insert_and_merge_core | def _insert_and_merge_core(self, pos, direction):
"""
The core part of method _insert_and_merge.
:param int pos: The starting position.
:param str direction: If we are traversing forwards or backwards in the list. It determines where the "sort"
... | python | def _insert_and_merge_core(self, pos, direction):
"""
The core part of method _insert_and_merge.
:param int pos: The starting position.
:param str direction: If we are traversing forwards or backwards in the list. It determines where the "sort"
... | [
"def",
"_insert_and_merge_core",
"(",
"self",
",",
"pos",
",",
"direction",
")",
":",
"bytes_changed",
"=",
"0",
"if",
"direction",
"==",
"\"forward\"",
":",
"if",
"pos",
"==",
"len",
"(",
"self",
".",
"_list",
")",
"-",
"1",
":",
"return",
"False",
",... | The core part of method _insert_and_merge.
:param int pos: The starting position.
:param str direction: If we are traversing forwards or backwards in the list. It determines where the "sort"
of the overlapping memory block comes from. If everything works as exp... | [
"The",
"core",
"part",
"of",
"method",
"_insert_and_merge",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/segment_list.py#L154-L257 | train | Internal method to insert a new core into the list at the specified position. | 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/segment_list.py | SegmentList._dbg_output | def _dbg_output(self):
"""
Returns a string representation of the segments that form this SegmentList
:return: String representation of contents
:rtype: str
"""
s = "["
lst = []
for segment in self._list:
lst.append(repr(segment))
s +=... | python | def _dbg_output(self):
"""
Returns a string representation of the segments that form this SegmentList
:return: String representation of contents
:rtype: str
"""
s = "["
lst = []
for segment in self._list:
lst.append(repr(segment))
s +=... | [
"def",
"_dbg_output",
"(",
"self",
")",
":",
"s",
"=",
"\"[\"",
"lst",
"=",
"[",
"]",
"for",
"segment",
"in",
"self",
".",
"_list",
":",
"lst",
".",
"append",
"(",
"repr",
"(",
"segment",
")",
")",
"s",
"+=",
"\", \"",
".",
"join",
"(",
"lst",
... | Returns a string representation of the segments that form this SegmentList
:return: String representation of contents
:rtype: str | [
"Returns",
"a",
"string",
"representation",
"of",
"the",
"segments",
"that",
"form",
"this",
"SegmentList"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/segment_list.py#L259-L272 | train | Returns a string representation of the segments that form this SegmentList
| 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/segment_list.py | SegmentList._debug_check | def _debug_check(self):
"""
Iterates over list checking segments with same sort do not overlap
:raise: Exception: if segments overlap space with same sort
"""
# old_start = 0
old_end = 0
old_sort = ""
for segment in self._list:
if segment.star... | python | def _debug_check(self):
"""
Iterates over list checking segments with same sort do not overlap
:raise: Exception: if segments overlap space with same sort
"""
# old_start = 0
old_end = 0
old_sort = ""
for segment in self._list:
if segment.star... | [
"def",
"_debug_check",
"(",
"self",
")",
":",
"# old_start = 0",
"old_end",
"=",
"0",
"old_sort",
"=",
"\"\"",
"for",
"segment",
"in",
"self",
".",
"_list",
":",
"if",
"segment",
".",
"start",
"<=",
"old_end",
"and",
"segment",
".",
"sort",
"==",
"old_so... | Iterates over list checking segments with same sort do not overlap
:raise: Exception: if segments overlap space with same sort | [
"Iterates",
"over",
"list",
"checking",
"segments",
"with",
"same",
"sort",
"do",
"not",
"overlap"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/segment_list.py#L274-L288 | train | Checks that all segments with same sort do not overlap with the same start and end. | 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/segment_list.py | SegmentList.next_free_pos | def next_free_pos(self, address):
"""
Returns the next free position with respect to an address, including that address itself
:param address: The address to begin the search with (including itself)
:return: The next free position
"""
idx = self._search(address)
... | python | def next_free_pos(self, address):
"""
Returns the next free position with respect to an address, including that address itself
:param address: The address to begin the search with (including itself)
:return: The next free position
"""
idx = self._search(address)
... | [
"def",
"next_free_pos",
"(",
"self",
",",
"address",
")",
":",
"idx",
"=",
"self",
".",
"_search",
"(",
"address",
")",
"if",
"idx",
"<",
"len",
"(",
"self",
".",
"_list",
")",
"and",
"self",
".",
"_list",
"[",
"idx",
"]",
".",
"start",
"<=",
"ad... | Returns the next free position with respect to an address, including that address itself
:param address: The address to begin the search with (including itself)
:return: The next free position | [
"Returns",
"the",
"next",
"free",
"position",
"with",
"respect",
"to",
"an",
"address",
"including",
"that",
"address",
"itself"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/segment_list.py#L294-L313 | train | Returns the next free position with respect to an address including that address itself | 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/segment_list.py | SegmentList.next_pos_with_sort_not_in | def next_pos_with_sort_not_in(self, address, sorts, max_distance=None):
"""
Returns the address of the next occupied block whose sort is not one of the specified ones.
:param int address: The address to begin the search with (including itself).
:param sorts: A collection of sort s... | python | def next_pos_with_sort_not_in(self, address, sorts, max_distance=None):
"""
Returns the address of the next occupied block whose sort is not one of the specified ones.
:param int address: The address to begin the search with (including itself).
:param sorts: A collection of sort s... | [
"def",
"next_pos_with_sort_not_in",
"(",
"self",
",",
"address",
",",
"sorts",
",",
"max_distance",
"=",
"None",
")",
":",
"list_length",
"=",
"len",
"(",
"self",
".",
"_list",
")",
"idx",
"=",
"self",
".",
"_search",
"(",
"address",
")",
"if",
"idx",
... | Returns the address of the next occupied block whose sort is not one of the specified ones.
:param int address: The address to begin the search with (including itself).
:param sorts: A collection of sort strings.
:param max_distance: The maximum distance between `address` and the next ... | [
"Returns",
"the",
"address",
"of",
"the",
"next",
"occupied",
"block",
"whose",
"sort",
"is",
"not",
"one",
"of",
"the",
"specified",
"ones",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/segment_list.py#L315-L354 | train | Returns the next position in the list that is not in the specified sort list. | 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/segment_list.py | SegmentList.is_occupied | def is_occupied(self, address):
"""
Check if an address belongs to any segment
:param address: The address to check
:return: True if this address belongs to a segment, False otherwise
"""
idx = self._search(address)
if len(self._list) <= idx:
return ... | python | def is_occupied(self, address):
"""
Check if an address belongs to any segment
:param address: The address to check
:return: True if this address belongs to a segment, False otherwise
"""
idx = self._search(address)
if len(self._list) <= idx:
return ... | [
"def",
"is_occupied",
"(",
"self",
",",
"address",
")",
":",
"idx",
"=",
"self",
".",
"_search",
"(",
"address",
")",
"if",
"len",
"(",
"self",
".",
"_list",
")",
"<=",
"idx",
":",
"return",
"False",
"if",
"self",
".",
"_list",
"[",
"idx",
"]",
"... | Check if an address belongs to any segment
:param address: The address to check
:return: True if this address belongs to a segment, False otherwise | [
"Check",
"if",
"an",
"address",
"belongs",
"to",
"any",
"segment"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/segment_list.py#L356-L372 | train | Checks if an address belongs to any segment in the cache. | 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/segment_list.py | SegmentList.occupied_by_sort | def occupied_by_sort(self, address):
"""
Check if an address belongs to any segment, and if yes, returns the sort of the segment
:param int address: The address to check
:return: Sort of the segment that occupies this address
:rtype: str
"""
idx = self._search(a... | python | def occupied_by_sort(self, address):
"""
Check if an address belongs to any segment, and if yes, returns the sort of the segment
:param int address: The address to check
:return: Sort of the segment that occupies this address
:rtype: str
"""
idx = self._search(a... | [
"def",
"occupied_by_sort",
"(",
"self",
",",
"address",
")",
":",
"idx",
"=",
"self",
".",
"_search",
"(",
"address",
")",
"if",
"len",
"(",
"self",
".",
"_list",
")",
"<=",
"idx",
":",
"return",
"None",
"if",
"self",
".",
"_list",
"[",
"idx",
"]",... | Check if an address belongs to any segment, and if yes, returns the sort of the segment
:param int address: The address to check
:return: Sort of the segment that occupies this address
:rtype: str | [
"Check",
"if",
"an",
"address",
"belongs",
"to",
"any",
"segment",
"and",
"if",
"yes",
"returns",
"the",
"sort",
"of",
"the",
"segment"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/segment_list.py#L374-L391 | train | Checks if an address belongs to any segment and returns the sort of the segment that occupies this 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/segment_list.py | SegmentList.occupy | def occupy(self, address, size, sort):
"""
Include a block, specified by (address, size), in this segment list.
:param int address: The starting address of the block.
:param int size: Size of the block.
:param str sort: Type of the block.
:return: None
... | python | def occupy(self, address, size, sort):
"""
Include a block, specified by (address, size), in this segment list.
:param int address: The starting address of the block.
:param int size: Size of the block.
:param str sort: Type of the block.
:return: None
... | [
"def",
"occupy",
"(",
"self",
",",
"address",
",",
"size",
",",
"sort",
")",
":",
"if",
"size",
"is",
"None",
"or",
"size",
"<=",
"0",
":",
"# Cannot occupy a non-existent block",
"return",
"# l.debug(\"Occpuying 0x%08x-0x%08x\", address, address + size)",
"if",
"no... | Include a block, specified by (address, size), in this segment list.
:param int address: The starting address of the block.
:param int size: Size of the block.
:param str sort: Type of the block.
:return: None | [
"Include",
"a",
"block",
"specified",
"by",
"(",
"address",
"size",
")",
"in",
"this",
"segment",
"list",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/segment_list.py#L393-L416 | train | Adds a block to the segment list. | 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/segment_list.py | SegmentList.copy | def copy(self):
"""
Make a copy of the SegmentList.
:return: A copy of the SegmentList instance.
:rtype: angr.analyses.cfg_fast.SegmentList
"""
n = SegmentList()
n._list = [ a.copy() for a in self._list ]
n._bytes_occupied = self._bytes_occupied
... | python | def copy(self):
"""
Make a copy of the SegmentList.
:return: A copy of the SegmentList instance.
:rtype: angr.analyses.cfg_fast.SegmentList
"""
n = SegmentList()
n._list = [ a.copy() for a in self._list ]
n._bytes_occupied = self._bytes_occupied
... | [
"def",
"copy",
"(",
"self",
")",
":",
"n",
"=",
"SegmentList",
"(",
")",
"n",
".",
"_list",
"=",
"[",
"a",
".",
"copy",
"(",
")",
"for",
"a",
"in",
"self",
".",
"_list",
"]",
"n",
".",
"_bytes_occupied",
"=",
"self",
".",
"_bytes_occupied",
"retu... | Make a copy of the SegmentList.
:return: A copy of the SegmentList instance.
:rtype: angr.analyses.cfg_fast.SegmentList | [
"Make",
"a",
"copy",
"of",
"the",
"SegmentList",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/segment_list.py#L420-L431 | train | Make a copy of the SegmentList 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/calling_convention.py | CallingConventionAnalysis._analyze_function | def _analyze_function(self):
"""
Go over the variable information in variable manager for this function, and return all uninitialized
register/stack variables.
:return:
"""
if not self._function.is_simprocedure \
and not self._function.is_plt \
... | python | def _analyze_function(self):
"""
Go over the variable information in variable manager for this function, and return all uninitialized
register/stack variables.
:return:
"""
if not self._function.is_simprocedure \
and not self._function.is_plt \
... | [
"def",
"_analyze_function",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"_function",
".",
"is_simprocedure",
"and",
"not",
"self",
".",
"_function",
".",
"is_plt",
"and",
"not",
"self",
".",
"_variable_manager",
".",
"has_function_manager",
"(",
"self",
... | Go over the variable information in variable manager for this function, and return all uninitialized
register/stack variables.
:return: | [
"Go",
"over",
"the",
"variable",
"information",
"in",
"variable",
"manager",
"for",
"this",
"function",
"and",
"return",
"all",
"uninitialized",
"register",
"/",
"stack",
"variables",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/calling_convention.py#L48-L77 | train | Return the calling convention that this function is 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/calling_convention.py | CallingConventionAnalysis._is_sane_register_variable | def _is_sane_register_variable(self, variable):
"""
Filters all registers that are surly not members of function arguments.
This can be seen as a workaround, since VariableRecoveryFast sometimes gives input variables of cc_ndep (which
is a VEX-specific register) :-(
:param SimRe... | python | def _is_sane_register_variable(self, variable):
"""
Filters all registers that are surly not members of function arguments.
This can be seen as a workaround, since VariableRecoveryFast sometimes gives input variables of cc_ndep (which
is a VEX-specific register) :-(
:param SimRe... | [
"def",
"_is_sane_register_variable",
"(",
"self",
",",
"variable",
")",
":",
"arch",
"=",
"self",
".",
"project",
".",
"arch",
"if",
"arch",
".",
"name",
"==",
"'AARCH64'",
":",
"return",
"16",
"<=",
"variable",
".",
"reg",
"<",
"80",
"# x0-x7",
"elif",
... | Filters all registers that are surly not members of function arguments.
This can be seen as a workaround, since VariableRecoveryFast sometimes gives input variables of cc_ndep (which
is a VEX-specific register) :-(
:param SimRegisterVariable variable: The variable to test.
:return: ... | [
"Filters",
"all",
"registers",
"that",
"are",
"surly",
"not",
"members",
"of",
"function",
"arguments",
".",
"This",
"can",
"be",
"seen",
"as",
"a",
"workaround",
"since",
"VariableRecoveryFast",
"sometimes",
"gives",
"input",
"variables",
"of",
"cc_ndep",
"(",
... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/calling_convention.py#L128-L164 | train | Tests if the given variable is a sane register variable. | 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/procedures/definitions/__init__.py | SimLibrary.copy | def copy(self):
"""
Make a copy of this SimLibrary, allowing it to be mutated without affecting the global version.
:return: A new SimLibrary object with the same library references but different dict/list references
"""
o = SimLibrary()
o.procedures = dict(self.proce... | python | def copy(self):
"""
Make a copy of this SimLibrary, allowing it to be mutated without affecting the global version.
:return: A new SimLibrary object with the same library references but different dict/list references
"""
o = SimLibrary()
o.procedures = dict(self.proce... | [
"def",
"copy",
"(",
"self",
")",
":",
"o",
"=",
"SimLibrary",
"(",
")",
"o",
".",
"procedures",
"=",
"dict",
"(",
"self",
".",
"procedures",
")",
"o",
".",
"non_returning",
"=",
"set",
"(",
"self",
".",
"non_returning",
")",
"o",
".",
"prototypes",
... | Make a copy of this SimLibrary, allowing it to be mutated without affecting the global version.
:return: A new SimLibrary object with the same library references but different dict/list references | [
"Make",
"a",
"copy",
"of",
"this",
"SimLibrary",
"allowing",
"it",
"to",
"be",
"mutated",
"without",
"affecting",
"the",
"global",
"version",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L38-L50 | train | Make a copy of this SimLibrary allowing it to be mutated without affecting the global version. | 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/procedures/definitions/__init__.py | SimLibrary.update | def update(self, other):
"""
Augment this SimLibrary with the information from another SimLibrary
:param other: The other SimLibrary
"""
self.procedures.update(other.procedures)
self.non_returning.update(other.non_returning)
self.prototypes.update(other.prototy... | python | def update(self, other):
"""
Augment this SimLibrary with the information from another SimLibrary
:param other: The other SimLibrary
"""
self.procedures.update(other.procedures)
self.non_returning.update(other.non_returning)
self.prototypes.update(other.prototy... | [
"def",
"update",
"(",
"self",
",",
"other",
")",
":",
"self",
".",
"procedures",
".",
"update",
"(",
"other",
".",
"procedures",
")",
"self",
".",
"non_returning",
".",
"update",
"(",
"other",
".",
"non_returning",
")",
"self",
".",
"prototypes",
".",
... | Augment this SimLibrary with the information from another SimLibrary
:param other: The other SimLibrary | [
"Augment",
"this",
"SimLibrary",
"with",
"the",
"information",
"from",
"another",
"SimLibrary"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L52-L61 | train | Augment this SimLibrary with the information from another SimLibrary. | 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/procedures/definitions/__init__.py | SimLibrary.set_library_names | def set_library_names(self, *names):
"""
Set some common names of this library by which it may be referred during linking
:param names: Any number of string library names may be passed as varargs.
"""
for name in names:
self.names.append(name)
SIM_LIBRA... | python | def set_library_names(self, *names):
"""
Set some common names of this library by which it may be referred during linking
:param names: Any number of string library names may be passed as varargs.
"""
for name in names:
self.names.append(name)
SIM_LIBRA... | [
"def",
"set_library_names",
"(",
"self",
",",
"*",
"names",
")",
":",
"for",
"name",
"in",
"names",
":",
"self",
".",
"names",
".",
"append",
"(",
"name",
")",
"SIM_LIBRARIES",
"[",
"name",
"]",
"=",
"self"
] | Set some common names of this library by which it may be referred during linking
:param names: Any number of string library names may be passed as varargs. | [
"Set",
"some",
"common",
"names",
"of",
"this",
"library",
"by",
"which",
"it",
"may",
"be",
"referred",
"during",
"linking"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L70-L78 | train | Set some common names of this library by which it may be referred during linking. | 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/procedures/definitions/__init__.py | SimLibrary.set_default_cc | def set_default_cc(self, arch_name, cc_cls):
"""
Set the default calling convention used for this library under a given architecture
:param arch_name: The string name of the architecture, i.e. the ``.name`` field from archinfo.
:parm cc_cls: The SimCC class (not an instance!) to... | python | def set_default_cc(self, arch_name, cc_cls):
"""
Set the default calling convention used for this library under a given architecture
:param arch_name: The string name of the architecture, i.e. the ``.name`` field from archinfo.
:parm cc_cls: The SimCC class (not an instance!) to... | [
"def",
"set_default_cc",
"(",
"self",
",",
"arch_name",
",",
"cc_cls",
")",
":",
"arch_name",
"=",
"archinfo",
".",
"arch_from_id",
"(",
"arch_name",
")",
".",
"name",
"self",
".",
"default_ccs",
"[",
"arch_name",
"]",
"=",
"cc_cls"
] | Set the default calling convention used for this library under a given architecture
:param arch_name: The string name of the architecture, i.e. the ``.name`` field from archinfo.
:parm cc_cls: The SimCC class (not an instance!) to use | [
"Set",
"the",
"default",
"calling",
"convention",
"used",
"for",
"this",
"library",
"under",
"a",
"given",
"architecture"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L80-L88 | train | Set the default calling convention used for this library under a given architecture | 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/procedures/definitions/__init__.py | SimLibrary.set_c_prototype | def set_c_prototype(self, c_decl):
"""
Set the prototype of a function in the form of a C-style function declaration.
:param str c_decl: The C-style declaration of the function.
:return: A tuple of (function name, function prototype)
:rtype: tuple
""... | python | def set_c_prototype(self, c_decl):
"""
Set the prototype of a function in the form of a C-style function declaration.
:param str c_decl: The C-style declaration of the function.
:return: A tuple of (function name, function prototype)
:rtype: tuple
""... | [
"def",
"set_c_prototype",
"(",
"self",
",",
"c_decl",
")",
":",
"parsed",
"=",
"parse_file",
"(",
"c_decl",
")",
"parsed_decl",
"=",
"parsed",
"[",
"0",
"]",
"if",
"not",
"parsed_decl",
":",
"raise",
"ValueError",
"(",
"'Cannot parse the function prototype.'",
... | Set the prototype of a function in the form of a C-style function declaration.
:param str c_decl: The C-style declaration of the function.
:return: A tuple of (function name, function prototype)
:rtype: tuple | [
"Set",
"the",
"prototype",
"of",
"a",
"function",
"in",
"the",
"form",
"of",
"a",
"C",
"-",
"style",
"function",
"declaration",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L116-L133 | train | Set the prototype of a function in the form of a C - style function declaration. | 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/procedures/definitions/__init__.py | SimLibrary.add | def add(self, name, proc_cls, **kwargs):
"""
Add a function implementation fo the library.
:param name: The name of the function as a string
:param proc_cls: The implementation of the function as a SimProcedure _class_, not instance
:param kwargs: Any additional p... | python | def add(self, name, proc_cls, **kwargs):
"""
Add a function implementation fo the library.
:param name: The name of the function as a string
:param proc_cls: The implementation of the function as a SimProcedure _class_, not instance
:param kwargs: Any additional p... | [
"def",
"add",
"(",
"self",
",",
"name",
",",
"proc_cls",
",",
"*",
"*",
"kwargs",
")",
":",
"self",
".",
"procedures",
"[",
"name",
"]",
"=",
"proc_cls",
"(",
"display_name",
"=",
"name",
",",
"*",
"*",
"kwargs",
")"
] | Add a function implementation fo the library.
:param name: The name of the function as a string
:param proc_cls: The implementation of the function as a SimProcedure _class_, not instance
:param kwargs: Any additional parameters to the procedure class constructor may be passed as... | [
"Add",
"a",
"function",
"implementation",
"fo",
"the",
"library",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L135-L143 | train | Adds a function implementation to the library. | 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/procedures/definitions/__init__.py | SimLibrary.add_all_from_dict | def add_all_from_dict(self, dictionary, **kwargs):
"""
Batch-add function implementations to the library.
:param dictionary: A mapping from name to procedure class, i.e. the first two arguments to add()
:param kwargs: Any additional kwargs will be passed to the constructors of _ea... | python | def add_all_from_dict(self, dictionary, **kwargs):
"""
Batch-add function implementations to the library.
:param dictionary: A mapping from name to procedure class, i.e. the first two arguments to add()
:param kwargs: Any additional kwargs will be passed to the constructors of _ea... | [
"def",
"add_all_from_dict",
"(",
"self",
",",
"dictionary",
",",
"*",
"*",
"kwargs",
")",
":",
"for",
"name",
",",
"procedure",
"in",
"dictionary",
".",
"items",
"(",
")",
":",
"self",
".",
"add",
"(",
"name",
",",
"procedure",
",",
"*",
"*",
"kwargs... | Batch-add function implementations to the library.
:param dictionary: A mapping from name to procedure class, i.e. the first two arguments to add()
:param kwargs: Any additional kwargs will be passed to the constructors of _each_ procedure class | [
"Batch",
"-",
"add",
"function",
"implementations",
"to",
"the",
"library",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L145-L153 | train | Adds all the classes in the given dictionary to the library. | 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/procedures/definitions/__init__.py | SimLibrary.add_alias | def add_alias(self, name, *alt_names):
"""
Add some duplicate names for a given function. The original function's implementation must already be
registered.
:param name: The name of the function for which an implementation is already present
:param alt_names: Any number... | python | def add_alias(self, name, *alt_names):
"""
Add some duplicate names for a given function. The original function's implementation must already be
registered.
:param name: The name of the function for which an implementation is already present
:param alt_names: Any number... | [
"def",
"add_alias",
"(",
"self",
",",
"name",
",",
"*",
"alt_names",
")",
":",
"old_procedure",
"=",
"self",
".",
"procedures",
"[",
"name",
"]",
"for",
"alt",
"in",
"alt_names",
":",
"new_procedure",
"=",
"copy",
".",
"deepcopy",
"(",
"old_procedure",
"... | Add some duplicate names for a given function. The original function's implementation must already be
registered.
:param name: The name of the function for which an implementation is already present
:param alt_names: Any number of alternate names may be passed as varargs | [
"Add",
"some",
"duplicate",
"names",
"for",
"a",
"given",
"function",
".",
"The",
"original",
"function",
"s",
"implementation",
"must",
"already",
"be",
"registered",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L155-L167 | train | Add some duplicate names for a given 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/procedures/definitions/__init__.py | SimLibrary.get | def get(self, name, arch):
"""
Get an implementation of the given function specialized for the given arch, or a stub procedure if none exists.
:param name: The name of the function as a string
:param arch: The architecure to use, as either a string or an archinfo.Arch instance
... | python | def get(self, name, arch):
"""
Get an implementation of the given function specialized for the given arch, or a stub procedure if none exists.
:param name: The name of the function as a string
:param arch: The architecure to use, as either a string or an archinfo.Arch instance
... | [
"def",
"get",
"(",
"self",
",",
"name",
",",
"arch",
")",
":",
"if",
"type",
"(",
"arch",
")",
"is",
"str",
":",
"arch",
"=",
"archinfo",
".",
"arch_from_id",
"(",
"arch",
")",
"if",
"name",
"in",
"self",
".",
"procedures",
":",
"proc",
"=",
"cop... | Get an implementation of the given function specialized for the given arch, or a stub procedure if none exists.
:param name: The name of the function as a string
:param arch: The architecure to use, as either a string or an archinfo.Arch instance
:return: A SimProcedure instance re... | [
"Get",
"an",
"implementation",
"of",
"the",
"given",
"function",
"specialized",
"for",
"the",
"given",
"arch",
"or",
"a",
"stub",
"procedure",
"if",
"none",
"exists",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L188-L203 | train | Get an implementation of the given function specialized for the given arch or a stub procedure if none exists. | 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/procedures/definitions/__init__.py | SimLibrary.get_stub | def get_stub(self, name, arch):
"""
Get a stub procedure for the given function, regardless of if a real implementation is available. This will
apply any metadata, such as a default calling convention or a function prototype.
By stub, we pretty much always mean a ``ReturnUnconstrained``... | python | def get_stub(self, name, arch):
"""
Get a stub procedure for the given function, regardless of if a real implementation is available. This will
apply any metadata, such as a default calling convention or a function prototype.
By stub, we pretty much always mean a ``ReturnUnconstrained``... | [
"def",
"get_stub",
"(",
"self",
",",
"name",
",",
"arch",
")",
":",
"proc",
"=",
"self",
".",
"fallback_proc",
"(",
"display_name",
"=",
"name",
",",
"is_stub",
"=",
"True",
")",
"self",
".",
"_apply_metadata",
"(",
"proc",
",",
"arch",
")",
"return",
... | Get a stub procedure for the given function, regardless of if a real implementation is available. This will
apply any metadata, such as a default calling convention or a function prototype.
By stub, we pretty much always mean a ``ReturnUnconstrained`` SimProcedure with the appropriate display name
... | [
"Get",
"a",
"stub",
"procedure",
"for",
"the",
"given",
"function",
"regardless",
"of",
"if",
"a",
"real",
"implementation",
"is",
"available",
".",
"This",
"will",
"apply",
"any",
"metadata",
"such",
"as",
"a",
"default",
"calling",
"convention",
"or",
"a",... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L205-L219 | train | Returns a SimProcedure instance representing a stub for the given 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/procedures/definitions/__init__.py | SimLibrary.has_metadata | def has_metadata(self, name):
"""
Check if a function has either an implementation or any metadata associated with it
:param name: The name of the function as a string
:return: A bool indicating if anything is known about the function
"""
return self.has_implem... | python | def has_metadata(self, name):
"""
Check if a function has either an implementation or any metadata associated with it
:param name: The name of the function as a string
:return: A bool indicating if anything is known about the function
"""
return self.has_implem... | [
"def",
"has_metadata",
"(",
"self",
",",
"name",
")",
":",
"return",
"self",
".",
"has_implementation",
"(",
"name",
")",
"or",
"name",
"in",
"self",
".",
"non_returning",
"or",
"name",
"in",
"self",
".",
"prototypes"
] | Check if a function has either an implementation or any metadata associated with it
:param name: The name of the function as a string
:return: A bool indicating if anything is known about the function | [
"Check",
"if",
"a",
"function",
"has",
"either",
"an",
"implementation",
"or",
"any",
"metadata",
"associated",
"with",
"it"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L221-L230 | train | Check if a function has either an implementation or any metadata associated with it. | 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/procedures/definitions/__init__.py | SimSyscallLibrary.minimum_syscall_number | def minimum_syscall_number(self, abi):
"""
:param abi: The abi to evaluate
:return: The smallest syscall number known for the given abi
"""
if abi not in self.syscall_number_mapping or \
not self.syscall_number_mapping[abi]:
return 0
return ... | python | def minimum_syscall_number(self, abi):
"""
:param abi: The abi to evaluate
:return: The smallest syscall number known for the given abi
"""
if abi not in self.syscall_number_mapping or \
not self.syscall_number_mapping[abi]:
return 0
return ... | [
"def",
"minimum_syscall_number",
"(",
"self",
",",
"abi",
")",
":",
"if",
"abi",
"not",
"in",
"self",
".",
"syscall_number_mapping",
"or",
"not",
"self",
".",
"syscall_number_mapping",
"[",
"abi",
"]",
":",
"return",
"0",
"return",
"min",
"(",
"self",
".",... | :param abi: The abi to evaluate
:return: The smallest syscall number known for the given abi | [
":",
"param",
"abi",
":",
"The",
"abi",
"to",
"evaluate",
":",
"return",
":",
"The",
"smallest",
"syscall",
"number",
"known",
"for",
"the",
"given",
"abi"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L289-L297 | train | Returns the smallest syscall number known for the given abi | 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/procedures/definitions/__init__.py | SimSyscallLibrary.maximum_syscall_number | def maximum_syscall_number(self, abi):
"""
:param abi: The abi to evaluate
:return: The largest syscall number known for the given abi
"""
if abi not in self.syscall_number_mapping or \
not self.syscall_number_mapping[abi]:
return 0
return m... | python | def maximum_syscall_number(self, abi):
"""
:param abi: The abi to evaluate
:return: The largest syscall number known for the given abi
"""
if abi not in self.syscall_number_mapping or \
not self.syscall_number_mapping[abi]:
return 0
return m... | [
"def",
"maximum_syscall_number",
"(",
"self",
",",
"abi",
")",
":",
"if",
"abi",
"not",
"in",
"self",
".",
"syscall_number_mapping",
"or",
"not",
"self",
".",
"syscall_number_mapping",
"[",
"abi",
"]",
":",
"return",
"0",
"return",
"max",
"(",
"self",
".",... | :param abi: The abi to evaluate
:return: The largest syscall number known for the given abi | [
":",
"param",
"abi",
":",
"The",
"abi",
"to",
"evaluate",
":",
"return",
":",
"The",
"largest",
"syscall",
"number",
"known",
"for",
"the",
"given",
"abi"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L299-L307 | train | Returns the maximum syscall number known for the given abi | 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/procedures/definitions/__init__.py | SimSyscallLibrary.add_number_mapping | def add_number_mapping(self, abi, number, name):
"""
Associate a syscall number with the name of a function present in the underlying SimLibrary
:param abi: The abi for which this mapping applies
:param number: The syscall number
:param name: The name of the function
... | python | def add_number_mapping(self, abi, number, name):
"""
Associate a syscall number with the name of a function present in the underlying SimLibrary
:param abi: The abi for which this mapping applies
:param number: The syscall number
:param name: The name of the function
... | [
"def",
"add_number_mapping",
"(",
"self",
",",
"abi",
",",
"number",
",",
"name",
")",
":",
"self",
".",
"syscall_number_mapping",
"[",
"abi",
"]",
"[",
"number",
"]",
"=",
"name",
"self",
".",
"syscall_name_mapping",
"[",
"abi",
"]",
"[",
"name",
"]",
... | Associate a syscall number with the name of a function present in the underlying SimLibrary
:param abi: The abi for which this mapping applies
:param number: The syscall number
:param name: The name of the function | [
"Associate",
"a",
"syscall",
"number",
"with",
"the",
"name",
"of",
"a",
"function",
"present",
"in",
"the",
"underlying",
"SimLibrary"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L309-L318 | train | Associate a syscall number with the name of a function present in the underlying library. | 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/procedures/definitions/__init__.py | SimSyscallLibrary.add_number_mapping_from_dict | def add_number_mapping_from_dict(self, abi, mapping):
"""
Batch-associate syscall numbers with names of functions present in the underlying SimLibrary
:param abi: The abi for which this mapping applies
:param mapping: A dict mapping syscall numbers to function names
"""
... | python | def add_number_mapping_from_dict(self, abi, mapping):
"""
Batch-associate syscall numbers with names of functions present in the underlying SimLibrary
:param abi: The abi for which this mapping applies
:param mapping: A dict mapping syscall numbers to function names
"""
... | [
"def",
"add_number_mapping_from_dict",
"(",
"self",
",",
"abi",
",",
"mapping",
")",
":",
"self",
".",
"syscall_number_mapping",
"[",
"abi",
"]",
".",
"update",
"(",
"mapping",
")",
"self",
".",
"syscall_name_mapping",
"[",
"abi",
"]",
".",
"update",
"(",
... | Batch-associate syscall numbers with names of functions present in the underlying SimLibrary
:param abi: The abi for which this mapping applies
:param mapping: A dict mapping syscall numbers to function names | [
"Batch",
"-",
"associate",
"syscall",
"numbers",
"with",
"names",
"of",
"functions",
"present",
"in",
"the",
"underlying",
"SimLibrary"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L320-L328 | train | Adds a dictionary mapping syscall numbers to names of functions present in the underlying library. | 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/procedures/definitions/__init__.py | SimSyscallLibrary.get | def get(self, number, arch, abi_list=()):
"""
The get() function for SimSyscallLibrary looks a little different from its original version.
Instead of providing a name, you provide a number, and you additionally provide a list of abi names that are
applicable. The first abi for which the... | python | def get(self, number, arch, abi_list=()):
"""
The get() function for SimSyscallLibrary looks a little different from its original version.
Instead of providing a name, you provide a number, and you additionally provide a list of abi names that are
applicable. The first abi for which the... | [
"def",
"get",
"(",
"self",
",",
"number",
",",
"arch",
",",
"abi_list",
"=",
"(",
")",
")",
":",
"name",
",",
"arch",
",",
"abi",
"=",
"self",
".",
"_canonicalize",
"(",
"number",
",",
"arch",
",",
"abi_list",
")",
"proc",
"=",
"super",
"(",
"Sim... | The get() function for SimSyscallLibrary looks a little different from its original version.
Instead of providing a name, you provide a number, and you additionally provide a list of abi names that are
applicable. The first abi for which the number is present in the mapping will be chosen. This allows ... | [
"The",
"get",
"()",
"function",
"for",
"SimSyscallLibrary",
"looks",
"a",
"little",
"different",
"from",
"its",
"original",
"version",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L360-L380 | train | This function is a little different from the get method for SimSyscallLibrary. | 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/procedures/definitions/__init__.py | SimSyscallLibrary.get_stub | def get_stub(self, number, arch, abi_list=()):
"""
Pretty much the intersection of SimLibrary.get_stub() and SimSyscallLibrary.get().
:param number: The syscall number
:param arch: The architecture being worked with, as either a string name or an archinfo.Arch
:param... | python | def get_stub(self, number, arch, abi_list=()):
"""
Pretty much the intersection of SimLibrary.get_stub() and SimSyscallLibrary.get().
:param number: The syscall number
:param arch: The architecture being worked with, as either a string name or an archinfo.Arch
:param... | [
"def",
"get_stub",
"(",
"self",
",",
"number",
",",
"arch",
",",
"abi_list",
"=",
"(",
")",
")",
":",
"name",
",",
"arch",
",",
"abi",
"=",
"self",
".",
"_canonicalize",
"(",
"number",
",",
"arch",
",",
"abi_list",
")",
"proc",
"=",
"super",
"(",
... | Pretty much the intersection of SimLibrary.get_stub() and SimSyscallLibrary.get().
:param number: The syscall number
:param arch: The architecture being worked with, as either a string name or an archinfo.Arch
:param abi_list: A list of ABI names that could be used
:retur... | [
"Pretty",
"much",
"the",
"intersection",
"of",
"SimLibrary",
".",
"get_stub",
"()",
"and",
"SimSyscallLibrary",
".",
"get",
"()",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L382-L395 | train | Returns a SimProcedure representing a plausable stub that could model the syscall. | 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/procedures/definitions/__init__.py | SimSyscallLibrary.has_implementation | def has_implementation(self, number, arch, abi_list=()):
"""
Pretty much the intersection of SimLibrary.has_implementation() and SimSyscallLibrary.get().
:param number: The syscall number
:param arch: The architecture being worked with, as either a string name or an archinfo... | python | def has_implementation(self, number, arch, abi_list=()):
"""
Pretty much the intersection of SimLibrary.has_implementation() and SimSyscallLibrary.get().
:param number: The syscall number
:param arch: The architecture being worked with, as either a string name or an archinfo... | [
"def",
"has_implementation",
"(",
"self",
",",
"number",
",",
"arch",
",",
"abi_list",
"=",
"(",
")",
")",
":",
"name",
",",
"_",
",",
"_",
"=",
"self",
".",
"_canonicalize",
"(",
"number",
",",
"arch",
",",
"abi_list",
")",
"return",
"super",
"(",
... | Pretty much the intersection of SimLibrary.has_implementation() and SimSyscallLibrary.get().
:param number: The syscall number
:param arch: The architecture being worked with, as either a string name or an archinfo.Arch
:param abi_list: A list of ABI names that could be used
... | [
"Pretty",
"much",
"the",
"intersection",
"of",
"SimLibrary",
".",
"has_implementation",
"()",
"and",
"SimSyscallLibrary",
".",
"get",
"()",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/definitions/__init__.py#L409-L419 | train | A method to check if a syscall has an implementation of the given number arch and abi_list. | 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/scratch.py | SimStateScratch.tmp_expr | def tmp_expr(self, tmp):
"""
Returns the Claripy expression of a VEX temp value.
:param tmp: the number of the tmp
:param simplify: simplify the tmp before returning it
:returns: a Claripy expression of the tmp
"""
self.state._inspect('tmp_read', BP_BEFORE, tmp_r... | python | def tmp_expr(self, tmp):
"""
Returns the Claripy expression of a VEX temp value.
:param tmp: the number of the tmp
:param simplify: simplify the tmp before returning it
:returns: a Claripy expression of the tmp
"""
self.state._inspect('tmp_read', BP_BEFORE, tmp_r... | [
"def",
"tmp_expr",
"(",
"self",
",",
"tmp",
")",
":",
"self",
".",
"state",
".",
"_inspect",
"(",
"'tmp_read'",
",",
"BP_BEFORE",
",",
"tmp_read_num",
"=",
"tmp",
")",
"try",
":",
"v",
"=",
"self",
".",
"temps",
"[",
"tmp",
"]",
"if",
"v",
"is",
... | Returns the Claripy expression of a VEX temp value.
:param tmp: the number of the tmp
:param simplify: simplify the tmp before returning it
:returns: a Claripy expression of the tmp | [
"Returns",
"the",
"Claripy",
"expression",
"of",
"a",
"VEX",
"temp",
"value",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/scratch.py#L85-L102 | train | Returns the Claripy expression of a VEX temp value. | 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/scratch.py | SimStateScratch.store_tmp | def store_tmp(self, tmp, content, reg_deps=None, tmp_deps=None, deps=None):
"""
Stores a Claripy expression in a VEX temp value.
If in symbolic mode, this involves adding a constraint for the tmp's symbolic variable.
:param tmp: the number of the tmp
:param content: a Claripy ex... | python | def store_tmp(self, tmp, content, reg_deps=None, tmp_deps=None, deps=None):
"""
Stores a Claripy expression in a VEX temp value.
If in symbolic mode, this involves adding a constraint for the tmp's symbolic variable.
:param tmp: the number of the tmp
:param content: a Claripy ex... | [
"def",
"store_tmp",
"(",
"self",
",",
"tmp",
",",
"content",
",",
"reg_deps",
"=",
"None",
",",
"tmp_deps",
"=",
"None",
",",
"deps",
"=",
"None",
")",
":",
"self",
".",
"state",
".",
"_inspect",
"(",
"'tmp_write'",
",",
"BP_BEFORE",
",",
"tmp_write_nu... | Stores a Claripy expression in a VEX temp value.
If in symbolic mode, this involves adding a constraint for the tmp's symbolic variable.
:param tmp: the number of the tmp
:param content: a Claripy expression of the content
:param reg_deps: the register dependencies of the content
... | [
"Stores",
"a",
"Claripy",
"expression",
"in",
"a",
"VEX",
"temp",
"value",
".",
"If",
"in",
"symbolic",
"mode",
"this",
"involves",
"adding",
"a",
"constraint",
"for",
"the",
"tmp",
"s",
"symbolic",
"variable",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/scratch.py#L104-L131 | train | Stores a Claripy expression in a VEX temp value. | 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/filesystem.py | SimFilesystem._normalize_path | def _normalize_path(self, path):
"""
Takes a path and returns a simple absolute path as a list of directories from the root
"""
if type(path) is str:
path = path.encode()
path = path.split(b'\0')[0]
if path[0:1] != self.pathsep:
path = self.cwd + ... | python | def _normalize_path(self, path):
"""
Takes a path and returns a simple absolute path as a list of directories from the root
"""
if type(path) is str:
path = path.encode()
path = path.split(b'\0')[0]
if path[0:1] != self.pathsep:
path = self.cwd + ... | [
"def",
"_normalize_path",
"(",
"self",
",",
"path",
")",
":",
"if",
"type",
"(",
"path",
")",
"is",
"str",
":",
"path",
"=",
"path",
".",
"encode",
"(",
")",
"path",
"=",
"path",
".",
"split",
"(",
"b'\\0'",
")",
"[",
"0",
"]",
"if",
"path",
"[... | Takes a path and returns a simple absolute path as a list of directories from the root | [
"Takes",
"a",
"path",
"and",
"returns",
"a",
"simple",
"absolute",
"path",
"as",
"a",
"list",
"of",
"directories",
"from",
"the",
"root"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/filesystem.py#L118-L142 | train | Takes a path and returns a simple absolute path as a list of directories from the root
| 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/filesystem.py | SimFilesystem.chdir | def chdir(self, path):
"""
Changes the current directory to the given path
"""
self.cwd = self._join_chunks(self._normalize_path(path)) | python | def chdir(self, path):
"""
Changes the current directory to the given path
"""
self.cwd = self._join_chunks(self._normalize_path(path)) | [
"def",
"chdir",
"(",
"self",
",",
"path",
")",
":",
"self",
".",
"cwd",
"=",
"self",
".",
"_join_chunks",
"(",
"self",
".",
"_normalize_path",
"(",
"path",
")",
")"
] | Changes the current directory to the given path | [
"Changes",
"the",
"current",
"directory",
"to",
"the",
"given",
"path"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/filesystem.py#L150-L154 | train | Changes the current directory to the given path. | 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/filesystem.py | SimFilesystem.get | def get(self, path):
"""
Get a file from the filesystem. Returns a SimFile or None.
"""
mountpoint, chunks = self.get_mountpoint(path)
if mountpoint is None:
return self._files.get(self._join_chunks(chunks))
else:
return mountpoint.get(chunks) | python | def get(self, path):
"""
Get a file from the filesystem. Returns a SimFile or None.
"""
mountpoint, chunks = self.get_mountpoint(path)
if mountpoint is None:
return self._files.get(self._join_chunks(chunks))
else:
return mountpoint.get(chunks) | [
"def",
"get",
"(",
"self",
",",
"path",
")",
":",
"mountpoint",
",",
"chunks",
"=",
"self",
".",
"get_mountpoint",
"(",
"path",
")",
"if",
"mountpoint",
"is",
"None",
":",
"return",
"self",
".",
"_files",
".",
"get",
"(",
"self",
".",
"_join_chunks",
... | Get a file from the filesystem. Returns a SimFile or None. | [
"Get",
"a",
"file",
"from",
"the",
"filesystem",
".",
"Returns",
"a",
"SimFile",
"or",
"None",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/filesystem.py#L156-L165 | train | Get a file from the filesystem. Returns a SimFile or None. | 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/filesystem.py | SimFilesystem.insert | def insert(self, path, simfile):
"""
Insert a file into the filesystem. Returns whether the operation was successful.
"""
if self.state is not None:
simfile.set_state(self.state)
mountpoint, chunks = self.get_mountpoint(path)
if mountpoint is None:
... | python | def insert(self, path, simfile):
"""
Insert a file into the filesystem. Returns whether the operation was successful.
"""
if self.state is not None:
simfile.set_state(self.state)
mountpoint, chunks = self.get_mountpoint(path)
if mountpoint is None:
... | [
"def",
"insert",
"(",
"self",
",",
"path",
",",
"simfile",
")",
":",
"if",
"self",
".",
"state",
"is",
"not",
"None",
":",
"simfile",
".",
"set_state",
"(",
"self",
".",
"state",
")",
"mountpoint",
",",
"chunks",
"=",
"self",
".",
"get_mountpoint",
"... | Insert a file into the filesystem. Returns whether the operation was successful. | [
"Insert",
"a",
"file",
"into",
"the",
"filesystem",
".",
"Returns",
"whether",
"the",
"operation",
"was",
"successful",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/filesystem.py#L167-L179 | train | Insert a file into the filesystem. Returns whether the operation was successful. | 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/filesystem.py | SimFilesystem.delete | def delete(self, path):
"""
Remove a file from the filesystem. Returns whether the operation was successful.
This will add a ``fs_unlink`` event with the path of the file and also the index into the `unlinks` list.
"""
mountpoint, chunks = self.get_mountpoint(path)
apath... | python | def delete(self, path):
"""
Remove a file from the filesystem. Returns whether the operation was successful.
This will add a ``fs_unlink`` event with the path of the file and also the index into the `unlinks` list.
"""
mountpoint, chunks = self.get_mountpoint(path)
apath... | [
"def",
"delete",
"(",
"self",
",",
"path",
")",
":",
"mountpoint",
",",
"chunks",
"=",
"self",
".",
"get_mountpoint",
"(",
"path",
")",
"apath",
"=",
"self",
".",
"_join_chunks",
"(",
"chunks",
")",
"if",
"mountpoint",
"is",
"None",
":",
"try",
":",
... | Remove a file from the filesystem. Returns whether the operation was successful.
This will add a ``fs_unlink`` event with the path of the file and also the index into the `unlinks` list. | [
"Remove",
"a",
"file",
"from",
"the",
"filesystem",
".",
"Returns",
"whether",
"the",
"operation",
"was",
"successful",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/filesystem.py#L181-L200 | train | Removes a file from the filesystem. Returns whether the operation was successful. | 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/filesystem.py | SimFilesystem.mount | def mount(self, path, mount):
"""
Add a mountpoint to the filesystem.
"""
self._mountpoints[self._join_chunks(self._normalize_path(path))] = mount | python | def mount(self, path, mount):
"""
Add a mountpoint to the filesystem.
"""
self._mountpoints[self._join_chunks(self._normalize_path(path))] = mount | [
"def",
"mount",
"(",
"self",
",",
"path",
",",
"mount",
")",
":",
"self",
".",
"_mountpoints",
"[",
"self",
".",
"_join_chunks",
"(",
"self",
".",
"_normalize_path",
"(",
"path",
")",
")",
"]",
"=",
"mount"
] | Add a mountpoint to the filesystem. | [
"Add",
"a",
"mountpoint",
"to",
"the",
"filesystem",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/filesystem.py#L202-L206 | train | Add a mountpoint to the filesystem. | 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/filesystem.py | SimFilesystem.unmount | def unmount(self, path):
"""
Remove a mountpoint from the filesystem.
"""
del self._mountpoints[self._join_chunks(self._normalize_path(path))] | python | def unmount(self, path):
"""
Remove a mountpoint from the filesystem.
"""
del self._mountpoints[self._join_chunks(self._normalize_path(path))] | [
"def",
"unmount",
"(",
"self",
",",
"path",
")",
":",
"del",
"self",
".",
"_mountpoints",
"[",
"self",
".",
"_join_chunks",
"(",
"self",
".",
"_normalize_path",
"(",
"path",
")",
")",
"]"
] | Remove a mountpoint from the filesystem. | [
"Remove",
"a",
"mountpoint",
"from",
"the",
"filesystem",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/filesystem.py#L208-L212 | train | Unmount a mountpoint from the filesystem. | 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/filesystem.py | SimFilesystem.get_mountpoint | def get_mountpoint(self, path):
"""
Look up the mountpoint servicing the given path.
:return: A tuple of the mount and a list of path elements traversing from the mountpoint to the specified file.
"""
path_chunks = self._normalize_path(path)
for i in range(len(path_chunk... | python | def get_mountpoint(self, path):
"""
Look up the mountpoint servicing the given path.
:return: A tuple of the mount and a list of path elements traversing from the mountpoint to the specified file.
"""
path_chunks = self._normalize_path(path)
for i in range(len(path_chunk... | [
"def",
"get_mountpoint",
"(",
"self",
",",
"path",
")",
":",
"path_chunks",
"=",
"self",
".",
"_normalize_path",
"(",
"path",
")",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"path_chunks",
")",
"-",
"1",
",",
"-",
"1",
",",
"-",
"1",
")",
":",
"... | Look up the mountpoint servicing the given path.
:return: A tuple of the mount and a list of path elements traversing from the mountpoint to the specified file. | [
"Look",
"up",
"the",
"mountpoint",
"servicing",
"the",
"given",
"path",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/filesystem.py#L214-L229 | train | Look up the mountpoint servicing the given path. | 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/procedures/java_jni/__init__.py | JNISimProcedure._store_in_native_memory | def _store_in_native_memory(self, data, data_type, addr=None):
"""
Store in native memory.
:param data: Either a single value or a list.
Lists get interpreted as an array.
:param data_type: Java type of the element(s).
:param addr: Native stor... | python | def _store_in_native_memory(self, data, data_type, addr=None):
"""
Store in native memory.
:param data: Either a single value or a list.
Lists get interpreted as an array.
:param data_type: Java type of the element(s).
:param addr: Native stor... | [
"def",
"_store_in_native_memory",
"(",
"self",
",",
"data",
",",
"data_type",
",",
"addr",
"=",
"None",
")",
":",
"# check if addr is symbolic",
"if",
"addr",
"is",
"not",
"None",
"and",
"self",
".",
"state",
".",
"solver",
".",
"symbolic",
"(",
"addr",
")... | Store in native memory.
:param data: Either a single value or a list.
Lists get interpreted as an array.
:param data_type: Java type of the element(s).
:param addr: Native store address.
If not set, native memory is allocated.
... | [
"Store",
"in",
"native",
"memory",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/java_jni/__init__.py#L46-L77 | train | Stores the data in the native 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/procedures/java_jni/__init__.py | JNISimProcedure._load_from_native_memory | def _load_from_native_memory(self, addr, data_type=None, data_size=None,
no_of_elements=1, return_as_list=False):
"""
Load from native memory.
:param addr: Native load address.
:param data_type: Java type of elements.
... | python | def _load_from_native_memory(self, addr, data_type=None, data_size=None,
no_of_elements=1, return_as_list=False):
"""
Load from native memory.
:param addr: Native load address.
:param data_type: Java type of elements.
... | [
"def",
"_load_from_native_memory",
"(",
"self",
",",
"addr",
",",
"data_type",
"=",
"None",
",",
"data_size",
"=",
"None",
",",
"no_of_elements",
"=",
"1",
",",
"return_as_list",
"=",
"False",
")",
":",
"# check if addr is symbolic",
"if",
"addr",
"is",
"not",... | Load from native memory.
:param addr: Native load address.
:param data_type: Java type of elements.
If set, all loaded elements are casted to this type.
:param data_size: Size of each element.
If not set, siz... | [
"Load",
"from",
"native",
"memory",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/java_jni/__init__.py#L79-L116 | train | Load the elements from native 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/procedures/java_jni/__init__.py | JNISimProcedure._load_string_from_native_memory | def _load_string_from_native_memory(self, addr_):
"""
Load zero terminated UTF-8 string from native memory.
:param addr_: Native load address.
:return: Loaded string.
"""
# check if addr is symbolic
if self.state.solver.symbolic(addr_):
l.error("... | python | def _load_string_from_native_memory(self, addr_):
"""
Load zero terminated UTF-8 string from native memory.
:param addr_: Native load address.
:return: Loaded string.
"""
# check if addr is symbolic
if self.state.solver.symbolic(addr_):
l.error("... | [
"def",
"_load_string_from_native_memory",
"(",
"self",
",",
"addr_",
")",
":",
"# check if addr is symbolic",
"if",
"self",
".",
"state",
".",
"solver",
".",
"symbolic",
"(",
"addr_",
")",
":",
"l",
".",
"error",
"(",
"\"Loading strings from symbolic addresses is no... | Load zero terminated UTF-8 string from native memory.
:param addr_: Native load address.
:return: Loaded string. | [
"Load",
"zero",
"terminated",
"UTF",
"-",
"8",
"string",
"from",
"native",
"memory",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/java_jni/__init__.py#L118-L144 | train | Load a string from native 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/procedures/java_jni/__init__.py | JNISimProcedure._store_string_in_native_memory | def _store_string_in_native_memory(self, string, addr=None):
"""
Store given string UTF-8 encoded and zero terminated in native memory.
:param str string: String
:param addr: Native store address.
If not set, native memory is allocated.
:retur... | python | def _store_string_in_native_memory(self, string, addr=None):
"""
Store given string UTF-8 encoded and zero terminated in native memory.
:param str string: String
:param addr: Native store address.
If not set, native memory is allocated.
:retur... | [
"def",
"_store_string_in_native_memory",
"(",
"self",
",",
"string",
",",
"addr",
"=",
"None",
")",
":",
"if",
"addr",
"is",
"None",
":",
"addr",
"=",
"self",
".",
"_allocate_native_memory",
"(",
"size",
"=",
"len",
"(",
"string",
")",
"+",
"1",
")",
"... | Store given string UTF-8 encoded and zero terminated in native memory.
:param str string: String
:param addr: Native store address.
If not set, native memory is allocated.
:return: Native address of the string. | [
"Store",
"given",
"string",
"UTF",
"-",
"8",
"encoded",
"and",
"zero",
"terminated",
"in",
"native",
"memory",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/java_jni/__init__.py#L146-L178 | train | Store given string in native 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/procedures/java_jni/__init__.py | JNISimProcedure._normalize_array_idx | def _normalize_array_idx(self, idx):
"""
In Java, all array indices are represented by a 32 bit integer and
consequently we are using in the Soot engine a 32bit bitvector for this.
This function normalize the given index to follow this "convention".
:return: Index as a 32bit bit... | python | def _normalize_array_idx(self, idx):
"""
In Java, all array indices are represented by a 32 bit integer and
consequently we are using in the Soot engine a 32bit bitvector for this.
This function normalize the given index to follow this "convention".
:return: Index as a 32bit bit... | [
"def",
"_normalize_array_idx",
"(",
"self",
",",
"idx",
")",
":",
"if",
"isinstance",
"(",
"idx",
",",
"SimActionObject",
")",
":",
"idx",
"=",
"idx",
".",
"to_claripy",
"(",
")",
"if",
"self",
".",
"arch",
".",
"memory_endness",
"==",
"\"Iend_LE\"",
":"... | In Java, all array indices are represented by a 32 bit integer and
consequently we are using in the Soot engine a 32bit bitvector for this.
This function normalize the given index to follow this "convention".
:return: Index as a 32bit bitvector. | [
"In",
"Java",
"all",
"array",
"indices",
"are",
"represented",
"by",
"a",
"32",
"bit",
"integer",
"and",
"consequently",
"we",
"are",
"using",
"in",
"the",
"Soot",
"engine",
"a",
"32bit",
"bitvector",
"for",
"this",
".",
"This",
"function",
"normalize",
"t... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/java_jni/__init__.py#L184-L197 | train | This function converts an array index into a 32bit bitvector. | 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/misc/hookset.py | HookSet.install_hooks | def install_hooks(target, **hooks):
"""
Given the target `target`, apply the hooks given as keyword arguments to it.
If any targeted method has already been hooked, the hooks will not be overridden but will instead be pushed
into a list of pending hooks. The final behavior should be that... | python | def install_hooks(target, **hooks):
"""
Given the target `target`, apply the hooks given as keyword arguments to it.
If any targeted method has already been hooked, the hooks will not be overridden but will instead be pushed
into a list of pending hooks. The final behavior should be that... | [
"def",
"install_hooks",
"(",
"target",
",",
"*",
"*",
"hooks",
")",
":",
"for",
"name",
",",
"hook",
"in",
"hooks",
".",
"items",
"(",
")",
":",
"func",
"=",
"getattr",
"(",
"target",
",",
"name",
")",
"if",
"not",
"isinstance",
"(",
"func",
",",
... | Given the target `target`, apply the hooks given as keyword arguments to it.
If any targeted method has already been hooked, the hooks will not be overridden but will instead be pushed
into a list of pending hooks. The final behavior should be that all hooks call each other in a nested stack.
:... | [
"Given",
"the",
"target",
"target",
"apply",
"the",
"hooks",
"given",
"as",
"keyword",
"arguments",
"to",
"it",
".",
"If",
"any",
"targeted",
"method",
"has",
"already",
"been",
"hooked",
"the",
"hooks",
"will",
"not",
"be",
"overridden",
"but",
"will",
"i... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/misc/hookset.py#L11-L26 | train | Given the target object and a set of hooks apply them to the target 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/misc/hookset.py | HookSet.remove_hooks | def remove_hooks(target, **hooks):
"""
Remove the given hooks from the given target.
:param target: The object from which to remove hooks. If all hooks are removed from a given method, the
HookedMethod object will be removed and replaced with the original function.
... | python | def remove_hooks(target, **hooks):
"""
Remove the given hooks from the given target.
:param target: The object from which to remove hooks. If all hooks are removed from a given method, the
HookedMethod object will be removed and replaced with the original function.
... | [
"def",
"remove_hooks",
"(",
"target",
",",
"*",
"*",
"hooks",
")",
":",
"for",
"name",
",",
"hook",
"in",
"hooks",
".",
"items",
"(",
")",
":",
"hooked",
"=",
"getattr",
"(",
"target",
",",
"name",
")",
"if",
"hook",
"in",
"hooked",
".",
"pending",... | Remove the given hooks from the given target.
:param target: The object from which to remove hooks. If all hooks are removed from a given method, the
HookedMethod object will be removed and replaced with the original function.
:param hooks: Any keywords will be interpreted as... | [
"Remove",
"the",
"given",
"hooks",
"from",
"the",
"given",
"target",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/misc/hookset.py#L29-L46 | train | Removes the given hooks from the given target 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/forward_analysis.py | GraphVisitor.reset | def reset(self):
"""
Reset the internal node traversal state. Must be called prior to visiting future nodes.
:return: None
"""
self._sorted_nodes.clear()
self._node_to_index.clear()
self._reached_fixedpoint.clear()
for i, n in enumerate(self.sort_nodes(... | python | def reset(self):
"""
Reset the internal node traversal state. Must be called prior to visiting future nodes.
:return: None
"""
self._sorted_nodes.clear()
self._node_to_index.clear()
self._reached_fixedpoint.clear()
for i, n in enumerate(self.sort_nodes(... | [
"def",
"reset",
"(",
"self",
")",
":",
"self",
".",
"_sorted_nodes",
".",
"clear",
"(",
")",
"self",
".",
"_node_to_index",
".",
"clear",
"(",
")",
"self",
".",
"_reached_fixedpoint",
".",
"clear",
"(",
")",
"for",
"i",
",",
"n",
"in",
"enumerate",
"... | Reset the internal node traversal state. Must be called prior to visiting future nodes.
:return: None | [
"Reset",
"the",
"internal",
"node",
"traversal",
"state",
".",
"Must",
"be",
"called",
"prior",
"to",
"visiting",
"future",
"nodes",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/forward_analysis.py#L102-L115 | train | Reset the internal node traversal 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/forward_analysis.py | GraphVisitor.all_successors | def all_successors(self, node, skip_reached_fixedpoint=False):
"""
Returns all successors to the specific node.
:param node: A node in the graph.
:return: A set of nodes that are all successors to the given node.
:rtype: set
"""
successors = set()
... | python | def all_successors(self, node, skip_reached_fixedpoint=False):
"""
Returns all successors to the specific node.
:param node: A node in the graph.
:return: A set of nodes that are all successors to the given node.
:rtype: set
"""
successors = set()
... | [
"def",
"all_successors",
"(",
"self",
",",
"node",
",",
"skip_reached_fixedpoint",
"=",
"False",
")",
":",
"successors",
"=",
"set",
"(",
")",
"stack",
"=",
"[",
"node",
"]",
"while",
"stack",
":",
"n",
"=",
"stack",
".",
"pop",
"(",
")",
"successors",... | Returns all successors to the specific node.
:param node: A node in the graph.
:return: A set of nodes that are all successors to the given node.
:rtype: set | [
"Returns",
"all",
"successors",
"to",
"the",
"specific",
"node",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/forward_analysis.py#L129-L149 | train | Returns all successors to the given 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/forward_analysis.py | GraphVisitor.revisit | def revisit(self, node, include_self=True):
"""
Revisit a node in the future. As a result, the successors to this node will be revisited as well.
:param node: The node to revisit in the future.
:return: None
"""
successors = self.successors(node) #, skip_reached_fix... | python | def revisit(self, node, include_self=True):
"""
Revisit a node in the future. As a result, the successors to this node will be revisited as well.
:param node: The node to revisit in the future.
:return: None
"""
successors = self.successors(node) #, skip_reached_fix... | [
"def",
"revisit",
"(",
"self",
",",
"node",
",",
"include_self",
"=",
"True",
")",
":",
"successors",
"=",
"self",
".",
"successors",
"(",
"node",
")",
"#, skip_reached_fixedpoint=True)",
"if",
"include_self",
":",
"self",
".",
"_sorted_nodes",
".",
"add",
"... | Revisit a node in the future. As a result, the successors to this node will be revisited as well.
:param node: The node to revisit in the future.
:return: None | [
"Revisit",
"a",
"node",
"in",
"the",
"future",
".",
"As",
"a",
"result",
"the",
"successors",
"to",
"this",
"node",
"will",
"be",
"revisited",
"as",
"well",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/forward_analysis.py#L151-L168 | train | Revisit a node in the future. | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.