repo stringlengths 7 54 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 20 28.4k | docstring stringlengths 1 46.3k | docstring_tokens listlengths 1 1.66k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value | summary stringlengths 4 350 | obf_code stringlengths 7.85k 764k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
angr/angr | angr/analyses/cfg/cfg_fast.py | PendingJobs.add_returning_function | def add_returning_function(self, func_addr):
"""
Mark a function as returning.
:param int func_addr: Address of the function that returns.
:return: None
"""
self._returning_functions.add(func_addr)
self._updated_functions.add(func_addr) | python | def add_returning_function(self, func_addr):
"""
Mark a function as returning.
:param int func_addr: Address of the function that returns.
:return: None
"""
self._returning_functions.add(func_addr)
self._updated_functions.add(func_addr) | [
"def",
"add_returning_function",
"(",
"self",
",",
"func_addr",
")",
":",
"self",
".",
"_returning_functions",
".",
"add",
"(",
"func_addr",
")",
"self",
".",
"_updated_functions",
".",
"add",
"(",
"func_addr",
")"
] | Mark a function as returning.
:param int func_addr: Address of the function that returns.
:return: None | [
"Mark",
"a",
"function",
"as",
"returning",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L173-L182 | train | Adds a function to the returning 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/cfg_fast.py | CFGFast._calc_entropy | def _calc_entropy(data, size=None):
"""
Calculate the entropy of a piece of data
:param data: The target data to calculate entropy on
:param size: Size of the data, Optional.
:return: A float
"""
if not data:
return 0
entropy = 0
if s... | python | def _calc_entropy(data, size=None):
"""
Calculate the entropy of a piece of data
:param data: The target data to calculate entropy on
:param size: Size of the data, Optional.
:return: A float
"""
if not data:
return 0
entropy = 0
if s... | [
"def",
"_calc_entropy",
"(",
"data",
",",
"size",
"=",
"None",
")",
":",
"if",
"not",
"data",
":",
"return",
"0",
"entropy",
"=",
"0",
"if",
"size",
"is",
"None",
":",
"size",
"=",
"len",
"(",
"data",
")",
"data",
"=",
"bytes",
"(",
"pyvex",
".",... | Calculate the entropy of a piece of data
:param data: The target data to calculate entropy on
:param size: Size of the data, Optional.
:return: A float | [
"Calculate",
"the",
"entropy",
"of",
"a",
"piece",
"of",
"data"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L641-L661 | train | Calculate the entropy of a piece of data. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | CFGFast._inside_regions | def _inside_regions(self, address):
"""
Check if the address is inside any existing region.
:param int address: Address to check.
:return: True if the address is within one of the memory regions, False otherwise.
:rtype: bool
"""
try:
... | python | def _inside_regions(self, address):
"""
Check if the address is inside any existing region.
:param int address: Address to check.
:return: True if the address is within one of the memory regions, False otherwise.
:rtype: bool
"""
try:
... | [
"def",
"_inside_regions",
"(",
"self",
",",
"address",
")",
":",
"try",
":",
"start_addr",
"=",
"next",
"(",
"self",
".",
"_regions",
".",
"irange",
"(",
"maximum",
"=",
"address",
",",
"reverse",
"=",
"True",
")",
")",
"except",
"StopIteration",
":",
... | Check if the address is inside any existing region.
:param int address: Address to check.
:return: True if the address is within one of the memory regions, False otherwise.
:rtype: bool | [
"Check",
"if",
"the",
"address",
"is",
"inside",
"any",
"existing",
"region",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L698-L712 | train | Check if the given address is inside one of the memory regions. | 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_fast.py | CFGFast._get_min_addr | def _get_min_addr(self):
"""
Get the minimum address out of all regions. We assume self._regions is sorted.
:return: The minimum address.
:rtype: int
"""
if not self._regions:
if self.project.arch.name != "Soot":
l.error("self._regions is em... | python | def _get_min_addr(self):
"""
Get the minimum address out of all regions. We assume self._regions is sorted.
:return: The minimum address.
:rtype: int
"""
if not self._regions:
if self.project.arch.name != "Soot":
l.error("self._regions is em... | [
"def",
"_get_min_addr",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"_regions",
":",
"if",
"self",
".",
"project",
".",
"arch",
".",
"name",
"!=",
"\"Soot\"",
":",
"l",
".",
"error",
"(",
"\"self._regions is empty or not properly set.\"",
")",
"return",... | Get the minimum address out of all regions. We assume self._regions is sorted.
:return: The minimum address.
:rtype: int | [
"Get",
"the",
"minimum",
"address",
"out",
"of",
"all",
"regions",
".",
"We",
"assume",
"self",
".",
"_regions",
"is",
"sorted",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L714-L727 | train | Get the minimum address out of all regions. | 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_fast.py | CFGFast._next_address_in_regions | def _next_address_in_regions(self, address):
"""
Return the next immediate address that is inside any of the regions.
:param int address: The address to start scanning.
:return: The next address that is inside one of the memory regions.
:rtype: int
... | python | def _next_address_in_regions(self, address):
"""
Return the next immediate address that is inside any of the regions.
:param int address: The address to start scanning.
:return: The next address that is inside one of the memory regions.
:rtype: int
... | [
"def",
"_next_address_in_regions",
"(",
"self",
",",
"address",
")",
":",
"if",
"self",
".",
"_inside_regions",
"(",
"address",
")",
":",
"return",
"address",
"try",
":",
"return",
"next",
"(",
"self",
".",
"_regions",
".",
"irange",
"(",
"minimum",
"=",
... | Return the next immediate address that is inside any of the regions.
:param int address: The address to start scanning.
:return: The next address that is inside one of the memory regions.
:rtype: int | [
"Return",
"the",
"next",
"immediate",
"address",
"that",
"is",
"inside",
"any",
"of",
"the",
"regions",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L729-L744 | train | Returns the next immediate address that is inside one of the memory regions. | 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_fast.py | CFGFast._next_unscanned_addr | def _next_unscanned_addr(self, alignment=None):
"""
Find the next address that we haven't processed
:param alignment: Assures the address returns must be aligned by this number
:return: An address to process next, or None if all addresses have been processed
"""
# TODO:... | python | def _next_unscanned_addr(self, alignment=None):
"""
Find the next address that we haven't processed
:param alignment: Assures the address returns must be aligned by this number
:return: An address to process next, or None if all addresses have been processed
"""
# TODO:... | [
"def",
"_next_unscanned_addr",
"(",
"self",
",",
"alignment",
"=",
"None",
")",
":",
"# TODO: Take care of those functions that are already generated",
"if",
"self",
".",
"_next_addr",
"is",
"None",
":",
"self",
".",
"_next_addr",
"=",
"self",
".",
"_get_min_addr",
... | Find the next address that we haven't processed
:param alignment: Assures the address returns must be aligned by this number
:return: An address to process next, or None if all addresses have been processed | [
"Find",
"the",
"next",
"address",
"that",
"we",
"haven",
"t",
"processed"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L748-L800 | train | Find the next unscanned address in the memory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | CFGFast._next_code_addr_core | def _next_code_addr_core(self):
"""
Call _next_unscanned_addr() first to get the next address that is not scanned. Then check if data locates at
that address seems to be code or not. If not, we'll continue to for the next un-scanned address.
"""
next_addr = self._next_unscanned_... | python | def _next_code_addr_core(self):
"""
Call _next_unscanned_addr() first to get the next address that is not scanned. Then check if data locates at
that address seems to be code or not. If not, we'll continue to for the next un-scanned address.
"""
next_addr = self._next_unscanned_... | [
"def",
"_next_code_addr_core",
"(",
"self",
")",
":",
"next_addr",
"=",
"self",
".",
"_next_unscanned_addr",
"(",
")",
"if",
"next_addr",
"is",
"None",
":",
"return",
"None",
"start_addr",
"=",
"next_addr",
"while",
"True",
":",
"string_length",
"=",
"self",
... | Call _next_unscanned_addr() first to get the next address that is not scanned. Then check if data locates at
that address seems to be code or not. If not, we'll continue to for the next un-scanned address. | [
"Call",
"_next_unscanned_addr",
"()",
"first",
"to",
"get",
"the",
"next",
"address",
"that",
"is",
"not",
"scanned",
".",
"Then",
"check",
"if",
"data",
"locates",
"at",
"that",
"address",
"seems",
"to",
"be",
"code",
"or",
"not",
".",
"If",
"not",
"we"... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L866-L908 | train | Return the next code address in the core 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/cfg_fast.py | CFGFast._pre_job_handling | def _pre_job_handling(self, job): # pylint:disable=arguments-differ
"""
Some pre job-processing tasks, like update progress bar.
:param CFGJob job: The CFGJob instance.
:return: None
"""
if self._low_priority:
self._release_gil(len(self._nodes), 20, 0.0001)... | python | def _pre_job_handling(self, job): # pylint:disable=arguments-differ
"""
Some pre job-processing tasks, like update progress bar.
:param CFGJob job: The CFGJob instance.
:return: None
"""
if self._low_priority:
self._release_gil(len(self._nodes), 20, 0.0001)... | [
"def",
"_pre_job_handling",
"(",
"self",
",",
"job",
")",
":",
"# pylint:disable=arguments-differ",
"if",
"self",
".",
"_low_priority",
":",
"self",
".",
"_release_gil",
"(",
"len",
"(",
"self",
".",
"_nodes",
")",
",",
"20",
",",
"0.0001",
")",
"# a new ent... | Some pre job-processing tasks, like update progress bar.
:param CFGJob job: The CFGJob instance.
:return: None | [
"Some",
"pre",
"job",
"-",
"processing",
"tasks",
"like",
"update",
"progress",
"bar",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L989-L1018 | train | This method is called before the job is processed. | 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_fast.py | CFGFast._func_addrs_from_symbols | def _func_addrs_from_symbols(self):
"""
Get all possible function addresses that are specified by the symbols in the binary
:return: A set of addresses that are probably functions
:rtype: set
"""
return {sym.rebased_addr for sym in self._binary.symbols if sym.is_functio... | python | def _func_addrs_from_symbols(self):
"""
Get all possible function addresses that are specified by the symbols in the binary
:return: A set of addresses that are probably functions
:rtype: set
"""
return {sym.rebased_addr for sym in self._binary.symbols if sym.is_functio... | [
"def",
"_func_addrs_from_symbols",
"(",
"self",
")",
":",
"return",
"{",
"sym",
".",
"rebased_addr",
"for",
"sym",
"in",
"self",
".",
"_binary",
".",
"symbols",
"if",
"sym",
".",
"is_function",
"}"
] | Get all possible function addresses that are specified by the symbols in the binary
:return: A set of addresses that are probably functions
:rtype: set | [
"Get",
"all",
"possible",
"function",
"addresses",
"that",
"are",
"specified",
"by",
"the",
"symbols",
"in",
"the",
"binary"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L1225-L1233 | train | Get all possible function addresses that are specified by the symbols in the binary | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | CFGFast._func_addrs_from_prologues | def _func_addrs_from_prologues(self):
"""
Scan the entire program image for function prologues, and start code scanning at those positions
:return: A list of possible function addresses
"""
# Pre-compile all regexes
regexes = list()
for ins_regex in self.project... | python | def _func_addrs_from_prologues(self):
"""
Scan the entire program image for function prologues, and start code scanning at those positions
:return: A list of possible function addresses
"""
# Pre-compile all regexes
regexes = list()
for ins_regex in self.project... | [
"def",
"_func_addrs_from_prologues",
"(",
"self",
")",
":",
"# Pre-compile all regexes",
"regexes",
"=",
"list",
"(",
")",
"for",
"ins_regex",
"in",
"self",
".",
"project",
".",
"arch",
".",
"function_prologs",
":",
"r",
"=",
"re",
".",
"compile",
"(",
"ins_... | Scan the entire program image for function prologues, and start code scanning at those positions
:return: A list of possible function addresses | [
"Scan",
"the",
"entire",
"program",
"image",
"for",
"function",
"prologues",
"and",
"start",
"code",
"scanning",
"at",
"those",
"positions"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L1235-L1282 | train | Scan the entire program image for function prologues and start code scanning at those positions and return a list of possible function addresses. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | CFGFast._scan_block | def _scan_block(self, cfg_job):
"""
Scan a basic block starting at a specific address
:param CFGJob cfg_job: The CFGJob instance.
:return: a list of successors
:rtype: list
"""
addr = cfg_job.addr
current_func_addr = cfg_job.func_addr
# Fix the ... | python | def _scan_block(self, cfg_job):
"""
Scan a basic block starting at a specific address
:param CFGJob cfg_job: The CFGJob instance.
:return: a list of successors
:rtype: list
"""
addr = cfg_job.addr
current_func_addr = cfg_job.func_addr
# Fix the ... | [
"def",
"_scan_block",
"(",
"self",
",",
"cfg_job",
")",
":",
"addr",
"=",
"cfg_job",
".",
"addr",
"current_func_addr",
"=",
"cfg_job",
".",
"func_addr",
"# Fix the function address",
"# This is for rare cases where we cannot successfully determine the end boundary of a previous... | Scan a basic block starting at a specific address
:param CFGJob cfg_job: The CFGJob instance.
:return: a list of successors
:rtype: list | [
"Scan",
"a",
"basic",
"block",
"starting",
"at",
"a",
"specific",
"address"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L1286-L1311 | train | Scan a basic block starting at a specific address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | CFGFast._scan_procedure | def _scan_procedure(self, cfg_job, current_func_addr):
"""
Checks the hooking procedure for this address searching for new static
exit points to add to successors (generating entries for them)
if this address has not been traced before. Updates previous CFG nodes
with edges.
... | python | def _scan_procedure(self, cfg_job, current_func_addr):
"""
Checks the hooking procedure for this address searching for new static
exit points to add to successors (generating entries for them)
if this address has not been traced before. Updates previous CFG nodes
with edges.
... | [
"def",
"_scan_procedure",
"(",
"self",
",",
"cfg_job",
",",
"current_func_addr",
")",
":",
"addr",
"=",
"cfg_job",
".",
"addr",
"try",
":",
"if",
"self",
".",
"project",
".",
"is_hooked",
"(",
"addr",
")",
":",
"procedure",
"=",
"self",
".",
"project",
... | Checks the hooking procedure for this address searching for new static
exit points to add to successors (generating entries for them)
if this address has not been traced before. Updates previous CFG nodes
with edges.
:param CFGJob cfg_job: The CFGJob instance.
:param int cu... | [
"Checks",
"the",
"hooking",
"procedure",
"for",
"this",
"address",
"searching",
"for",
"new",
"static",
"exit",
"points",
"to",
"add",
"to",
"successors",
"(",
"generating",
"entries",
"for",
"them",
")",
"if",
"this",
"address",
"has",
"not",
"been",
"trace... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L1313-L1402 | train | Scan a CFGJob for a specific address and add the relevant exit points to the successors 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/cfg_fast.py | CFGFast._scan_irsb | def _scan_irsb(self, cfg_job, current_func_addr):
"""
Generate a list of successors (generating them each as entries) to IRSB.
Updates previous CFG nodes with edges.
:param CFGJob cfg_job: The CFGJob instance.
:param int current_func_addr: Address of the current function
... | python | def _scan_irsb(self, cfg_job, current_func_addr):
"""
Generate a list of successors (generating them each as entries) to IRSB.
Updates previous CFG nodes with edges.
:param CFGJob cfg_job: The CFGJob instance.
:param int current_func_addr: Address of the current function
... | [
"def",
"_scan_irsb",
"(",
"self",
",",
"cfg_job",
",",
"current_func_addr",
")",
":",
"addr",
",",
"function_addr",
",",
"cfg_node",
",",
"irsb",
"=",
"self",
".",
"_generate_cfgnode",
"(",
"cfg_job",
",",
"current_func_addr",
")",
"# Add edges going to this node ... | Generate a list of successors (generating them each as entries) to IRSB.
Updates previous CFG nodes with edges.
:param CFGJob cfg_job: The CFGJob instance.
:param int current_func_addr: Address of the current function
:return: a list of successors
:rtype: list | [
"Generate",
"a",
"list",
"of",
"successors",
"(",
"generating",
"them",
"each",
"as",
"entries",
")",
"to",
"IRSB",
".",
"Updates",
"previous",
"CFG",
"nodes",
"with",
"edges",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L1404-L1498 | train | Scan the IRSB for the given CFGJob and return a list of successors. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | CFGFast._create_jobs | def _create_jobs(self, target, jumpkind, current_function_addr, irsb, addr, cfg_node, ins_addr, stmt_idx):
"""
Given a node and details of a successor, makes a list of CFGJobs
and if it is a call or exit marks it appropriately so in the CFG
:param int target: Destination of the... | python | def _create_jobs(self, target, jumpkind, current_function_addr, irsb, addr, cfg_node, ins_addr, stmt_idx):
"""
Given a node and details of a successor, makes a list of CFGJobs
and if it is a call or exit marks it appropriately so in the CFG
:param int target: Destination of the... | [
"def",
"_create_jobs",
"(",
"self",
",",
"target",
",",
"jumpkind",
",",
"current_function_addr",
",",
"irsb",
",",
"addr",
",",
"cfg_node",
",",
"ins_addr",
",",
"stmt_idx",
")",
":",
"if",
"type",
"(",
"target",
")",
"is",
"pyvex",
".",
"IRExpr",
".",
... | Given a node and details of a successor, makes a list of CFGJobs
and if it is a call or exit marks it appropriately so in the CFG
:param int target: Destination of the resultant job
:param str jumpkind: The jumpkind of the edge going to this node
:param int current_funct... | [
"Given",
"a",
"node",
"and",
"details",
"of",
"a",
"successor",
"makes",
"a",
"list",
"of",
"CFGJobs",
"and",
"if",
"it",
"is",
"a",
"call",
"or",
"exit",
"marks",
"it",
"appropriately",
"so",
"in",
"the",
"CFG"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L1500-L1671 | train | Creates a list of CFGJobs that are needed to create the CFGJobs for the current CFGEntry. | 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_fast.py | CFGFast._create_job_call | def _create_job_call(self, addr, irsb, cfg_node, stmt_idx, ins_addr, current_function_addr, target_addr, jumpkind,
is_syscall=False):
"""
Generate a CFGJob for target address, also adding to _pending_entries
if returning to succeeding position (if irsb arg is populated)
... | python | def _create_job_call(self, addr, irsb, cfg_node, stmt_idx, ins_addr, current_function_addr, target_addr, jumpkind,
is_syscall=False):
"""
Generate a CFGJob for target address, also adding to _pending_entries
if returning to succeeding position (if irsb arg is populated)
... | [
"def",
"_create_job_call",
"(",
"self",
",",
"addr",
",",
"irsb",
",",
"cfg_node",
",",
"stmt_idx",
",",
"ins_addr",
",",
"current_function_addr",
",",
"target_addr",
",",
"jumpkind",
",",
"is_syscall",
"=",
"False",
")",
":",
"jobs",
"=",
"[",
"]",
"if",
... | Generate a CFGJob for target address, also adding to _pending_entries
if returning to succeeding position (if irsb arg is populated)
:param int addr: Address of the predecessor node
:param pyvex.IRSB irsb: IRSB of the predecessor node
:param CFGNode cfg_node: The CFGNo... | [
"Generate",
"a",
"CFGJob",
"for",
"target",
"address",
"also",
"adding",
"to",
"_pending_entries",
"if",
"returning",
"to",
"succeeding",
"position",
"(",
"if",
"irsb",
"arg",
"is",
"populated",
")"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L1673-L1797 | train | Generate a CFGJob for a given target address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | CFGFast._collect_data_references | def _collect_data_references(self, irsb, irsb_addr):
"""
Unoptimises IRSB and _add_data_reference's for individual statements or
for parts of statements (e.g. Store)
:param pyvex.IRSB irsb: Block to scan for data references
:param int irsb_addr: Address of block
:return:... | python | def _collect_data_references(self, irsb, irsb_addr):
"""
Unoptimises IRSB and _add_data_reference's for individual statements or
for parts of statements (e.g. Store)
:param pyvex.IRSB irsb: Block to scan for data references
:param int irsb_addr: Address of block
:return:... | [
"def",
"_collect_data_references",
"(",
"self",
",",
"irsb",
",",
"irsb_addr",
")",
":",
"if",
"irsb",
".",
"data_refs",
":",
"self",
".",
"_process_irsb_data_refs",
"(",
"irsb",
")",
"elif",
"irsb",
".",
"statements",
":",
"irsb",
"=",
"self",
".",
"_unop... | Unoptimises IRSB and _add_data_reference's for individual statements or
for parts of statements (e.g. Store)
:param pyvex.IRSB irsb: Block to scan for data references
:param int irsb_addr: Address of block
:return: None | [
"Unoptimises",
"IRSB",
"and",
"_add_data_reference",
"s",
"for",
"individual",
"statements",
"or",
"for",
"parts",
"of",
"statements",
"(",
"e",
".",
"g",
".",
"Store",
")"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L1801-L1816 | train | Collect all data references for the given IRSB and add them to the internal list of data references. | 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_fast.py | CFGFast._add_data_reference | def _add_data_reference(self, irsb_addr, stmt_idx, insn_addr, data_addr, # pylint: disable=unused-argument
data_size=None, data_type=None):
"""
Checks addresses are in the correct segments and creates or updates
MemoryData in _memory_data as appropriate, labelling as... | python | def _add_data_reference(self, irsb_addr, stmt_idx, insn_addr, data_addr, # pylint: disable=unused-argument
data_size=None, data_type=None):
"""
Checks addresses are in the correct segments and creates or updates
MemoryData in _memory_data as appropriate, labelling as... | [
"def",
"_add_data_reference",
"(",
"self",
",",
"irsb_addr",
",",
"stmt_idx",
",",
"insn_addr",
",",
"data_addr",
",",
"# pylint: disable=unused-argument",
"data_size",
"=",
"None",
",",
"data_type",
"=",
"None",
")",
":",
"# Make sure data_addr is within a valid memory... | Checks addresses are in the correct segments and creates or updates
MemoryData in _memory_data as appropriate, labelling as segment
boundaries or data type
:param int irsb_addr: irsb address
:param int stmt_idx: Statement ID
:param int insn_addr: instruction address
:par... | [
"Checks",
"addresses",
"are",
"in",
"the",
"correct",
"segments",
"and",
"creates",
"or",
"updates",
"MemoryData",
"in",
"_memory_data",
"as",
"appropriate",
"labelling",
"as",
"segment",
"boundaries",
"or",
"data",
"type"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L1942-L1991 | train | Add a data reference to the memory of the current object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | CFGFast._guess_data_type | def _guess_data_type(self, data_addr, max_size, content_holder=None):
"""
Make a guess to the data type.
Users can provide their own data type guessing code when initializing CFGFast instance, and each guessing
handler will be called if this method fails to determine what the data is.
... | python | def _guess_data_type(self, data_addr, max_size, content_holder=None):
"""
Make a guess to the data type.
Users can provide their own data type guessing code when initializing CFGFast instance, and each guessing
handler will be called if this method fails to determine what the data is.
... | [
"def",
"_guess_data_type",
"(",
"self",
",",
"data_addr",
",",
"max_size",
",",
"content_holder",
"=",
"None",
")",
":",
"try",
":",
"ref",
"=",
"next",
"(",
"iter",
"(",
"self",
".",
"model",
".",
"references",
".",
"data_addr_to_ref",
"[",
"data_addr",
... | Make a guess to the data type.
Users can provide their own data type guessing code when initializing CFGFast instance, and each guessing
handler will be called if this method fails to determine what the data is.
:param int data_addr: Address of the data.
:param int max_size: The maximu... | [
"Make",
"a",
"guess",
"to",
"the",
"data",
"type",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2140-L2259 | train | Guesses the data type of the data entry. | 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_fast.py | CFGFast._resolve_plt | def _resolve_plt(self, addr, irsb, indir_jump):
"""
Determine if the IRSB at the given address is a PLT stub. If it is, concretely execute the basic block to
resolve the jump target.
:param int addr: Address of the block.
:param irsb: The basic ... | python | def _resolve_plt(self, addr, irsb, indir_jump):
"""
Determine if the IRSB at the given address is a PLT stub. If it is, concretely execute the basic block to
resolve the jump target.
:param int addr: Address of the block.
:param irsb: The basic ... | [
"def",
"_resolve_plt",
"(",
"self",
",",
"addr",
",",
"irsb",
",",
"indir_jump",
")",
":",
"# is the address identified by CLE as a PLT stub?",
"if",
"self",
".",
"project",
".",
"loader",
".",
"all_elf_objects",
":",
"# restrict this heuristics to ELF files only",
"if"... | Determine if the IRSB at the given address is a PLT stub. If it is, concretely execute the basic block to
resolve the jump target.
:param int addr: Address of the block.
:param irsb: The basic block.
:param IndirectJump indir_jump: The IndirectJump inst... | [
"Determine",
"if",
"the",
"IRSB",
"at",
"the",
"given",
"address",
"is",
"a",
"PLT",
"stub",
".",
"If",
"it",
"is",
"concretely",
"execute",
"the",
"basic",
"block",
"to",
"resolve",
"the",
"jump",
"target",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2263-L2301 | train | Determine if the IRSB at the given address is a PLT stub. If it is concretely execute the basic block to get the target. | 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_fast.py | CFGFast._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.
:param IndirectJumpResolver resolved_by: The resolver used to resolve this indi... | 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.
:param IndirectJumpResolver resolved_by: The resolver used to resolve this indi... | [
"def",
"_indirect_jump_resolved",
"(",
"self",
",",
"jump",
",",
"jump_addr",
",",
"resolved_by",
",",
"targets",
")",
":",
"from",
".",
"indirect_jump_resolvers",
".",
"jumptable",
"import",
"JumpTableResolver",
"source_addr",
"=",
"jump",
".",
"addr",
"if",
"i... | Called when an indirect jump is successfully resolved.
:param IndirectJump jump: The resolved indirect jump.
:param IndirectJumpResolver resolved_by: The resolver used to resolve this indirect jump.
:param list targets: List of indirect jump targets.
... | [
"Called",
"when",
"an",
"indirect",
"jump",
"is",
"successfully",
"resolved",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2303-L2344 | 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_fast.py | CFGFast._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
"""
# add a node from this node to UnresolvableJumpTarget or UnresolvalbeCallTarget node,
# d... | python | def _indirect_jump_unresolved(self, jump):
"""
Called when we cannot resolve an indirect jump.
:param IndirectJump jump: The unresolved indirect jump.
:return: None
"""
# add a node from this node to UnresolvableJumpTarget or UnresolvalbeCallTarget node,
# d... | [
"def",
"_indirect_jump_unresolved",
"(",
"self",
",",
"jump",
")",
":",
"# add a node from this node to UnresolvableJumpTarget or UnresolvalbeCallTarget node,",
"# depending on its jump kind",
"src_node",
"=",
"self",
".",
"_nodes",
"[",
"jump",
".",
"addr",
"]",
"if",
"jum... | 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_fast.py#L2346-L2389 | 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_fast.py | CFGFast._remove_redundant_overlapping_blocks | def _remove_redundant_overlapping_blocks(self):
"""
On some architectures there are sometimes garbage bytes (usually nops) between functions in order to properly
align the succeeding function. CFGFast does a linear sweeping which might create duplicated blocks for
function epilogues wher... | python | def _remove_redundant_overlapping_blocks(self):
"""
On some architectures there are sometimes garbage bytes (usually nops) between functions in order to properly
align the succeeding function. CFGFast does a linear sweeping which might create duplicated blocks for
function epilogues wher... | [
"def",
"_remove_redundant_overlapping_blocks",
"(",
"self",
")",
":",
"sorted_nodes",
"=",
"sorted",
"(",
"self",
".",
"graph",
".",
"nodes",
"(",
")",
",",
"key",
"=",
"lambda",
"n",
":",
"n",
".",
"addr",
"if",
"n",
"is",
"not",
"None",
"else",
"0",
... | On some architectures there are sometimes garbage bytes (usually nops) between functions in order to properly
align the succeeding function. CFGFast does a linear sweeping which might create duplicated blocks for
function epilogues where one block starts before the garbage bytes and the other starts aft... | [
"On",
"some",
"architectures",
"there",
"are",
"sometimes",
"garbage",
"bytes",
"(",
"usually",
"nops",
")",
"between",
"functions",
"in",
"order",
"to",
"properly",
"align",
"the",
"succeeding",
"function",
".",
"CFGFast",
"does",
"a",
"linear",
"sweeping",
"... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2393-L2580 | train | Remove redundant blocks that are not in the function. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | CFGFast._remove_node | def _remove_node(self, node):
"""
Remove a CFGNode from self.graph as well as from the function manager (if it is the beginning of a function)
:param CFGNode node: The CFGNode to remove from the graph.
:return: None
"""
self.graph.remove_node(node)
if node.addr ... | python | def _remove_node(self, node):
"""
Remove a CFGNode from self.graph as well as from the function manager (if it is the beginning of a function)
:param CFGNode node: The CFGNode to remove from the graph.
:return: None
"""
self.graph.remove_node(node)
if node.addr ... | [
"def",
"_remove_node",
"(",
"self",
",",
"node",
")",
":",
"self",
".",
"graph",
".",
"remove_node",
"(",
"node",
")",
"if",
"node",
".",
"addr",
"in",
"self",
".",
"_nodes",
":",
"del",
"self",
".",
"_nodes",
"[",
"node",
".",
"addr",
"]",
"# We w... | Remove a CFGNode from self.graph as well as from the function manager (if it is the beginning of a function)
:param CFGNode node: The CFGNode to remove from the graph.
:return: None | [
"Remove",
"a",
"CFGNode",
"from",
"self",
".",
"graph",
"as",
"well",
"as",
"from",
"the",
"function",
"manager",
"(",
"if",
"it",
"is",
"the",
"beginning",
"of",
"a",
"function",
")"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2582-L2599 | train | Remove a CFGNode from the graph as well as from 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_fast.py | CFGFast._shrink_node | def _shrink_node(self, node, new_size, remove_function=True):
"""
Shrink the size of a node in CFG.
:param CFGNode node: The CFGNode to shrink
:param int new_size: The new size of the basic block
:param bool remove_function: If there is a function starting at `node`, should we r... | python | def _shrink_node(self, node, new_size, remove_function=True):
"""
Shrink the size of a node in CFG.
:param CFGNode node: The CFGNode to shrink
:param int new_size: The new size of the basic block
:param bool remove_function: If there is a function starting at `node`, should we r... | [
"def",
"_shrink_node",
"(",
"self",
",",
"node",
",",
"new_size",
",",
"remove_function",
"=",
"True",
")",
":",
"# Generate the new node",
"new_node",
"=",
"CFGNode",
"(",
"node",
".",
"addr",
",",
"new_size",
",",
"self",
".",
"model",
",",
"function_addre... | Shrink the size of a node in CFG.
:param CFGNode node: The CFGNode to shrink
:param int new_size: The new size of the basic block
:param bool remove_function: If there is a function starting at `node`, should we remove that function or not.
:return: None | [
"Shrink",
"the",
"size",
"of",
"a",
"node",
"in",
"CFG",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2601-L2682 | train | Shrinks the size of a basic block. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | CFGFast._analyze_all_function_features | def _analyze_all_function_features(self, all_funcs_completed=False):
"""
Iteratively analyze all changed functions, update their returning attribute, until a fix-point is reached (i.e.
no new returning/not-returning functions are found).
:return: None
"""
while True:
... | python | def _analyze_all_function_features(self, all_funcs_completed=False):
"""
Iteratively analyze all changed functions, update their returning attribute, until a fix-point is reached (i.e.
no new returning/not-returning functions are found).
:return: None
"""
while True:
... | [
"def",
"_analyze_all_function_features",
"(",
"self",
",",
"all_funcs_completed",
"=",
"False",
")",
":",
"while",
"True",
":",
"new_changes",
"=",
"self",
".",
"_iteratively_analyze_function_features",
"(",
"all_funcs_completed",
"=",
"all_funcs_completed",
")",
"new_r... | Iteratively analyze all changed functions, update their returning attribute, until a fix-point is reached (i.e.
no new returning/not-returning functions are found).
:return: None | [
"Iteratively",
"analyze",
"all",
"changed",
"functions",
"update",
"their",
"returning",
"attribute",
"until",
"a",
"fix",
"-",
"point",
"is",
"reached",
"(",
"i",
".",
"e",
".",
"no",
"new",
"returning",
"/",
"not",
"-",
"returning",
"functions",
"are",
"... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2687-L2738 | train | Analyze all functions and update their returning attribute. | 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_fast.py | CFGFast._graph_add_edge | def _graph_add_edge(self, cfg_node, src_node, src_jumpkind, src_ins_addr, src_stmt_idx):
"""
Add edge between nodes, or add node if entry point
:param CFGNode cfg_node: node which is jumped to
:param CFGNode src_node: node which is jumped from none if entry point
:param str src_... | python | def _graph_add_edge(self, cfg_node, src_node, src_jumpkind, src_ins_addr, src_stmt_idx):
"""
Add edge between nodes, or add node if entry point
:param CFGNode cfg_node: node which is jumped to
:param CFGNode src_node: node which is jumped from none if entry point
:param str src_... | [
"def",
"_graph_add_edge",
"(",
"self",
",",
"cfg_node",
",",
"src_node",
",",
"src_jumpkind",
",",
"src_ins_addr",
",",
"src_stmt_idx",
")",
":",
"if",
"src_node",
"is",
"None",
":",
"self",
".",
"graph",
".",
"add_node",
"(",
"cfg_node",
")",
"else",
":",... | Add edge between nodes, or add node if entry point
:param CFGNode cfg_node: node which is jumped to
:param CFGNode src_node: node which is jumped from none if entry point
:param str src_jumpkind: what type of jump the edge takes
:param int or str src_stmt_idx: source statements ID
... | [
"Add",
"edge",
"between",
"nodes",
"or",
"add",
"node",
"if",
"entry",
"point"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2750-L2765 | train | Add edge between nodes or add node if entry point is not jumped from 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/analyses/cfg/cfg_fast.py | CFGFast._make_return_edges | def _make_return_edges(self):
"""
For each returning function, create return edges in self.graph.
:return: None
"""
for func_addr, func in self.functions.items():
if func.returning is False:
continue
# get the node on CFG
if ... | python | def _make_return_edges(self):
"""
For each returning function, create return edges in self.graph.
:return: None
"""
for func_addr, func in self.functions.items():
if func.returning is False:
continue
# get the node on CFG
if ... | [
"def",
"_make_return_edges",
"(",
"self",
")",
":",
"for",
"func_addr",
",",
"func",
"in",
"self",
".",
"functions",
".",
"items",
"(",
")",
":",
"if",
"func",
".",
"returning",
"is",
"False",
":",
"continue",
"# get the node on CFG",
"if",
"func",
".",
... | For each returning function, create return edges in self.graph.
:return: None | [
"For",
"each",
"returning",
"function",
"create",
"return",
"edges",
"in",
"self",
".",
"graph",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2812-L2859 | train | Create edges for each returning function. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | CFGFast._function_add_node | def _function_add_node(self, cfg_node, function_addr):
"""
Adds node to function manager, converting address to CodeNode if
possible
:param CFGNode cfg_node: A CFGNode instance.
:param int function_addr: Address of the current function.
:return: None
"""
... | python | def _function_add_node(self, cfg_node, function_addr):
"""
Adds node to function manager, converting address to CodeNode if
possible
:param CFGNode cfg_node: A CFGNode instance.
:param int function_addr: Address of the current function.
:return: None
"""
... | [
"def",
"_function_add_node",
"(",
"self",
",",
"cfg_node",
",",
"function_addr",
")",
":",
"snippet",
"=",
"self",
".",
"_to_snippet",
"(",
"cfg_node",
"=",
"cfg_node",
")",
"self",
".",
"kb",
".",
"functions",
".",
"_add_node",
"(",
"function_addr",
",",
... | Adds node to function manager, converting address to CodeNode if
possible
:param CFGNode cfg_node: A CFGNode instance.
:param int function_addr: Address of the current function.
:return: None | [
"Adds",
"node",
"to",
"function",
"manager",
"converting",
"address",
"to",
"CodeNode",
"if",
"possible"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2865-L2875 | train | Adds a node 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_fast.py | CFGFast._function_add_transition_edge | def _function_add_transition_edge(self, dst_addr, src_node, src_func_addr, to_outside=False, dst_func_addr=None,
stmt_idx=None, ins_addr=None):
"""
Add a transition edge to the function transiton map.
:param int dst_addr: Address that the control flow trans... | python | def _function_add_transition_edge(self, dst_addr, src_node, src_func_addr, to_outside=False, dst_func_addr=None,
stmt_idx=None, ins_addr=None):
"""
Add a transition edge to the function transiton map.
:param int dst_addr: Address that the control flow trans... | [
"def",
"_function_add_transition_edge",
"(",
"self",
",",
"dst_addr",
",",
"src_node",
",",
"src_func_addr",
",",
"to_outside",
"=",
"False",
",",
"dst_func_addr",
"=",
"None",
",",
"stmt_idx",
"=",
"None",
",",
"ins_addr",
"=",
"None",
")",
":",
"try",
":",... | Add a transition edge to the function transiton map.
:param int dst_addr: Address that the control flow transits to.
:param CFGNode src_node: The source node that the control flow transits from.
:param int src_func_addr: Function address.
:return: True if the edge is correctly added. Fa... | [
"Add",
"a",
"transition",
"edge",
"to",
"the",
"function",
"transiton",
"map",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2877-L2913 | train | Add a transition edge to the function transiton map. | 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_fast.py | CFGFast._function_add_call_edge | def _function_add_call_edge(self, addr, src_node, function_addr, syscall=False, stmt_idx=None, ins_addr=None):
"""
Add a call edge to the function transition map.
:param int addr: Address that is being called (callee).
:param CFGNode src_node: The source CFG node (caller).
:para... | python | def _function_add_call_edge(self, addr, src_node, function_addr, syscall=False, stmt_idx=None, ins_addr=None):
"""
Add a call edge to the function transition map.
:param int addr: Address that is being called (callee).
:param CFGNode src_node: The source CFG node (caller).
:para... | [
"def",
"_function_add_call_edge",
"(",
"self",
",",
"addr",
",",
"src_node",
",",
"function_addr",
",",
"syscall",
"=",
"False",
",",
"stmt_idx",
"=",
"None",
",",
"ins_addr",
"=",
"None",
")",
":",
"try",
":",
"if",
"src_node",
"is",
"None",
":",
"self"... | Add a call edge to the function transition map.
:param int addr: Address that is being called (callee).
:param CFGNode src_node: The source CFG node (caller).
:param int ret_addr: Address that returns to (in case the function returns).
:param int function_addr: Function address..
... | [
"Add",
"a",
"call",
"edge",
"to",
"the",
"function",
"transition",
"map",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2915-L2945 | train | Adds a call edge to the function transition map. | 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_fast.py | CFGFast._function_add_fakeret_edge | def _function_add_fakeret_edge(self, addr, src_node, src_func_addr, confirmed=None):
"""
Generate CodeNodes for target and source, if no source node add node
for function, otherwise creates fake return to in function manager
:param int addr: target address
:param angr.analyses.C... | python | def _function_add_fakeret_edge(self, addr, src_node, src_func_addr, confirmed=None):
"""
Generate CodeNodes for target and source, if no source node add node
for function, otherwise creates fake return to in function manager
:param int addr: target address
:param angr.analyses.C... | [
"def",
"_function_add_fakeret_edge",
"(",
"self",
",",
"addr",
",",
"src_node",
",",
"src_func_addr",
",",
"confirmed",
"=",
"None",
")",
":",
"target_node",
"=",
"self",
".",
"_nodes",
".",
"get",
"(",
"addr",
",",
"None",
")",
"if",
"target_node",
"is",
... | Generate CodeNodes for target and source, if no source node add node
for function, otherwise creates fake return to in function manager
:param int addr: target address
:param angr.analyses.CFGNode src_node: source node
:param int src_func_addr: address of function
:param confirm... | [
"Generate",
"CodeNodes",
"for",
"target",
"and",
"source",
"if",
"no",
"source",
"node",
"add",
"node",
"for",
"function",
"otherwise",
"creates",
"fake",
"return",
"to",
"in",
"function",
"manager"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2947-L2969 | train | Generate CodeNodes for target and source node add node to 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_fast.py | CFGFast._function_add_return_site | def _function_add_return_site(self, addr, function_addr):
"""
Generate CodeNodes for target address, registers node for function to
function manager as return site
:param int addr: target address
:param int function_addr: address of function
:return: None
"""
... | python | def _function_add_return_site(self, addr, function_addr):
"""
Generate CodeNodes for target address, registers node for function to
function manager as return site
:param int addr: target address
:param int function_addr: address of function
:return: None
"""
... | [
"def",
"_function_add_return_site",
"(",
"self",
",",
"addr",
",",
"function_addr",
")",
":",
"try",
":",
"target",
"=",
"self",
".",
"_to_snippet",
"(",
"self",
".",
"_nodes",
"[",
"addr",
"]",
")",
"except",
"KeyError",
":",
"target",
"=",
"addr",
"sel... | Generate CodeNodes for target address, registers node for function to
function manager as return site
:param int addr: target address
:param int function_addr: address of function
:return: None | [
"Generate",
"CodeNodes",
"for",
"target",
"address",
"registers",
"node",
"for",
"function",
"to",
"function",
"manager",
"as",
"return",
"site"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2971-L2985 | train | Generate CodeNodes for target address registers node for function to
function manager as return site | 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_fast.py | CFGFast._function_add_return_edge | def _function_add_return_edge(self, return_from_addr, return_to_addr, function_addr):
"""
Generate CodeNodes for return_to_addr, add this node for function to
function manager generating new edge
:param int return_from_addr: target address
:param int return_to_addr: target addre... | python | def _function_add_return_edge(self, return_from_addr, return_to_addr, function_addr):
"""
Generate CodeNodes for return_to_addr, add this node for function to
function manager generating new edge
:param int return_from_addr: target address
:param int return_to_addr: target addre... | [
"def",
"_function_add_return_edge",
"(",
"self",
",",
"return_from_addr",
",",
"return_to_addr",
",",
"function_addr",
")",
":",
"return_to_node",
"=",
"self",
".",
"_nodes",
".",
"get",
"(",
"return_to_addr",
",",
"None",
")",
"if",
"return_to_node",
"is",
"Non... | Generate CodeNodes for return_to_addr, add this node for function to
function manager generating new edge
:param int return_from_addr: target address
:param int return_to_addr: target address
:param int function_addr: address of function
:return: None | [
"Generate",
"CodeNodes",
"for",
"return_to_addr",
"add",
"this",
"node",
"for",
"function",
"to",
"function",
"manager",
"generating",
"new",
"edge"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L2987-L3007 | train | Add a return edge 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_fast.py | CFGFast._arm_track_lr_on_stack | def _arm_track_lr_on_stack(self, addr, irsb, function):
"""
At the beginning of the basic block, we check if the first instruction stores the LR register onto the stack.
If it does, we calculate the offset of that store, and record the offset in function.info.
For instance, here is the ... | python | def _arm_track_lr_on_stack(self, addr, irsb, function):
"""
At the beginning of the basic block, we check if the first instruction stores the LR register onto the stack.
If it does, we calculate the offset of that store, and record the offset in function.info.
For instance, here is the ... | [
"def",
"_arm_track_lr_on_stack",
"(",
"self",
",",
"addr",
",",
"irsb",
",",
"function",
")",
":",
"if",
"irsb",
".",
"statements",
"is",
"None",
":",
"return",
"if",
"'lr_saved_on_stack'",
"in",
"function",
".",
"info",
":",
"return",
"# if it does, we log it... | At the beginning of the basic block, we check if the first instruction stores the LR register onto the stack.
If it does, we calculate the offset of that store, and record the offset in function.info.
For instance, here is the disassembly of a THUMB mode function:
000007E4 STR.W LR,... | [
"At",
"the",
"beginning",
"of",
"the",
"basic",
"block",
"we",
"check",
"if",
"the",
"first",
"instruction",
"stores",
"the",
"LR",
"register",
"onto",
"the",
"stack",
".",
"If",
"it",
"does",
"we",
"calculate",
"the",
"offset",
"of",
"that",
"store",
"a... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L3013-L3099 | train | This method is used to track the LR register on the stack. | 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_fast.py | CFGFast._arm_track_read_lr_from_stack | def _arm_track_read_lr_from_stack(self, irsb, function): # pylint:disable=unused-argument
"""
At the end of a basic block, simulate the very last instruction to see if the return address is read from the
stack and written in PC. If so, the jumpkind of this IRSB will be set to Ijk_Ret. For detai... | python | def _arm_track_read_lr_from_stack(self, irsb, function): # pylint:disable=unused-argument
"""
At the end of a basic block, simulate the very last instruction to see if the return address is read from the
stack and written in PC. If so, the jumpkind of this IRSB will be set to Ijk_Ret. For detai... | [
"def",
"_arm_track_read_lr_from_stack",
"(",
"self",
",",
"irsb",
",",
"function",
")",
":",
"# pylint:disable=unused-argument",
"if",
"'lr_saved_on_stack'",
"not",
"in",
"function",
".",
"info",
"or",
"not",
"function",
".",
"info",
"[",
"'lr_saved_on_stack'",
"]",... | At the end of a basic block, simulate the very last instruction to see if the return address is read from the
stack and written in PC. If so, the jumpkind of this IRSB will be set to Ijk_Ret. For detailed explanations,
please see the documentation of _arm_track_lr_on_stack().
:param pyvex.IRSB ... | [
"At",
"the",
"end",
"of",
"a",
"basic",
"block",
"simulate",
"the",
"very",
"last",
"instruction",
"to",
"see",
"if",
"the",
"return",
"address",
"is",
"read",
"from",
"the",
"stack",
"and",
"written",
"in",
"PC",
".",
"If",
"so",
"the",
"jumpkind",
"o... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L3101-L3157 | train | Simulate the read from the stack and return the jumpkind of the last instruction. | 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_fast.py | CFGFast._generate_cfgnode | def _generate_cfgnode(self, cfg_job, current_function_addr):
"""
Generate a CFGNode that starts at `cfg_job.addr`.
Since lifting machine code to IRSBs is slow, self._nodes is used as a cache of CFGNodes.
If the current architecture is ARM, this method will try to lift the block in the ... | python | def _generate_cfgnode(self, cfg_job, current_function_addr):
"""
Generate a CFGNode that starts at `cfg_job.addr`.
Since lifting machine code to IRSBs is slow, self._nodes is used as a cache of CFGNodes.
If the current architecture is ARM, this method will try to lift the block in the ... | [
"def",
"_generate_cfgnode",
"(",
"self",
",",
"cfg_job",
",",
"current_function_addr",
")",
":",
"addr",
"=",
"cfg_job",
".",
"addr",
"try",
":",
"if",
"addr",
"in",
"self",
".",
"_nodes",
":",
"cfg_node",
"=",
"self",
".",
"_nodes",
"[",
"addr",
"]",
... | Generate a CFGNode that starts at `cfg_job.addr`.
Since lifting machine code to IRSBs is slow, self._nodes is used as a cache of CFGNodes.
If the current architecture is ARM, this method will try to lift the block in the mode specified by the address
(determined by the parity of the address: e... | [
"Generate",
"a",
"CFGNode",
"that",
"starts",
"at",
"cfg_job",
".",
"addr",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L3163-L3333 | train | Generate a CFGNode that starts at cfg_job. addr. | 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_fast.py | CFGFast._process_block_arch_specific | def _process_block_arch_specific(self, addr, irsb, func_addr): # pylint: disable=unused-argument
"""
According to arch types ['ARMEL', 'ARMHF', 'MIPS32'] does different
fixes
For ARM deals with link register on the stack
(see _arm_track_lr_on_stack)
For MIPS32 simulates... | python | def _process_block_arch_specific(self, addr, irsb, func_addr): # pylint: disable=unused-argument
"""
According to arch types ['ARMEL', 'ARMHF', 'MIPS32'] does different
fixes
For ARM deals with link register on the stack
(see _arm_track_lr_on_stack)
For MIPS32 simulates... | [
"def",
"_process_block_arch_specific",
"(",
"self",
",",
"addr",
",",
"irsb",
",",
"func_addr",
")",
":",
"# pylint: disable=unused-argument",
"if",
"is_arm_arch",
"(",
"self",
".",
"project",
".",
"arch",
")",
":",
"if",
"self",
".",
"_arch_options",
".",
"re... | According to arch types ['ARMEL', 'ARMHF', 'MIPS32'] does different
fixes
For ARM deals with link register on the stack
(see _arm_track_lr_on_stack)
For MIPS32 simulates a new state where the global pointer is 0xffffffff
from current address after three steps if the first succes... | [
"According",
"to",
"arch",
"types",
"[",
"ARMEL",
"ARMHF",
"MIPS32",
"]",
"does",
"different",
"fixes"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L3335-L3402 | train | Process the arch specific block. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | CFGFast.generate_code_cover | def generate_code_cover(self):
"""
Generate a list of all recovered basic blocks.
"""
lst = []
for cfg_node in self.graph.nodes():
size = cfg_node.size
lst.append((cfg_node.addr, size))
lst = sorted(lst, key=lambda x: x[0])
return lst | python | def generate_code_cover(self):
"""
Generate a list of all recovered basic blocks.
"""
lst = []
for cfg_node in self.graph.nodes():
size = cfg_node.size
lst.append((cfg_node.addr, size))
lst = sorted(lst, key=lambda x: x[0])
return lst | [
"def",
"generate_code_cover",
"(",
"self",
")",
":",
"lst",
"=",
"[",
"]",
"for",
"cfg_node",
"in",
"self",
".",
"graph",
".",
"nodes",
"(",
")",
":",
"size",
"=",
"cfg_node",
".",
"size",
"lst",
".",
"append",
"(",
"(",
"cfg_node",
".",
"addr",
",... | Generate a list of all recovered basic blocks. | [
"Generate",
"a",
"list",
"of",
"all",
"recovered",
"basic",
"blocks",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L3445-L3456 | train | Generate a list of all recovered 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/sim_state.py | SimState.se | def se(self):
"""
Deprecated alias for `solver`
"""
global _complained_se
if not _complained_se:
_complained_se = True
l.critical("The name state.se is deprecated; please use state.solver.")
return self.get_plugin('solver') | python | def se(self):
"""
Deprecated alias for `solver`
"""
global _complained_se
if not _complained_se:
_complained_se = True
l.critical("The name state.se is deprecated; please use state.solver.")
return self.get_plugin('solver') | [
"def",
"se",
"(",
"self",
")",
":",
"global",
"_complained_se",
"if",
"not",
"_complained_se",
":",
"_complained_se",
"=",
"True",
"l",
".",
"critical",
"(",
"\"The name state.se is deprecated; please use state.solver.\"",
")",
"return",
"self",
".",
"get_plugin",
"... | Deprecated alias for `solver` | [
"Deprecated",
"alias",
"for",
"solver"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L241-L249 | train | Deprecated alias for solver | 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/sim_state.py | SimState.addr | def addr(self):
"""
Get the concrete address of the instruction pointer, without triggering SimInspect breakpoints or generating
SimActions. An integer is returned, or an exception is raised if the instruction pointer is symbolic.
:return: an int
"""
ip = self.regs._ip
... | python | def addr(self):
"""
Get the concrete address of the instruction pointer, without triggering SimInspect breakpoints or generating
SimActions. An integer is returned, or an exception is raised if the instruction pointer is symbolic.
:return: an int
"""
ip = self.regs._ip
... | [
"def",
"addr",
"(",
"self",
")",
":",
"ip",
"=",
"self",
".",
"regs",
".",
"_ip",
"if",
"isinstance",
"(",
"ip",
",",
"SootAddressDescriptor",
")",
":",
"return",
"ip",
"return",
"self",
".",
"solver",
".",
"eval_one",
"(",
"self",
".",
"regs",
".",
... | Get the concrete address of the instruction pointer, without triggering SimInspect breakpoints or generating
SimActions. An integer is returned, or an exception is raised if the instruction pointer is symbolic.
:return: an int | [
"Get",
"the",
"concrete",
"address",
"of",
"the",
"instruction",
"pointer",
"without",
"triggering",
"SimInspect",
"breakpoints",
"or",
"generating",
"SimActions",
".",
"An",
"integer",
"is",
"returned",
"or",
"an",
"exception",
"is",
"raised",
"if",
"the",
"ins... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L286-L297 | train | Return the concrete address of the instruction pointer without triggering SimInspect breakpoints or generating
SimActions. | 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/sim_state.py | SimState.add_constraints | def add_constraints(self, *args, **kwargs):
"""
Add some constraints to the state.
You may pass in any number of symbolic booleans as variadic positional arguments.
"""
if len(args) > 0 and isinstance(args[0], (list, tuple)):
raise Exception("Tuple or list passed to ... | python | def add_constraints(self, *args, **kwargs):
"""
Add some constraints to the state.
You may pass in any number of symbolic booleans as variadic positional arguments.
"""
if len(args) > 0 and isinstance(args[0], (list, tuple)):
raise Exception("Tuple or list passed to ... | [
"def",
"add_constraints",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"len",
"(",
"args",
")",
">",
"0",
"and",
"isinstance",
"(",
"args",
"[",
"0",
"]",
",",
"(",
"list",
",",
"tuple",
")",
")",
":",
"raise",
"Excep... | Add some constraints to the state.
You may pass in any number of symbolic booleans as variadic positional arguments. | [
"Add",
"some",
"constraints",
"to",
"the",
"state",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L428-L507 | train | Add some constraints to the state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_state.py | SimState.satisfiable | def satisfiable(self, **kwargs):
"""
Whether the state's constraints are satisfiable
"""
if o.ABSTRACT_SOLVER in self.options or o.SYMBOLIC not in self.options:
extra_constraints = kwargs.pop('extra_constraints', ())
for e in extra_constraints:
if ... | python | def satisfiable(self, **kwargs):
"""
Whether the state's constraints are satisfiable
"""
if o.ABSTRACT_SOLVER in self.options or o.SYMBOLIC not in self.options:
extra_constraints = kwargs.pop('extra_constraints', ())
for e in extra_constraints:
if ... | [
"def",
"satisfiable",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"o",
".",
"ABSTRACT_SOLVER",
"in",
"self",
".",
"options",
"or",
"o",
".",
"SYMBOLIC",
"not",
"in",
"self",
".",
"options",
":",
"extra_constraints",
"=",
"kwargs",
".",
"pop",... | Whether the state's constraints are satisfiable | [
"Whether",
"the",
"state",
"s",
"constraints",
"are",
"satisfiable"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L509-L521 | train | Returns True if the state s constraints are satisfiable. | 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/sim_state.py | SimState.block | def block(self, *args, **kwargs):
"""
Represent the basic block at this state's instruction pointer.
Any arguments to `AngrObjectFactory.block` can ba passed to this.
:return: A Block object describing the basic block of code at this point.
"""
if not args and 'addr' not... | python | def block(self, *args, **kwargs):
"""
Represent the basic block at this state's instruction pointer.
Any arguments to `AngrObjectFactory.block` can ba passed to this.
:return: A Block object describing the basic block of code at this point.
"""
if not args and 'addr' not... | [
"def",
"block",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"args",
"and",
"'addr'",
"not",
"in",
"kwargs",
":",
"kwargs",
"[",
"'addr'",
"]",
"=",
"self",
".",
"addr",
"return",
"self",
".",
"project",
".",
"fa... | Represent the basic block at this state's instruction pointer.
Any arguments to `AngrObjectFactory.block` can ba passed to this.
:return: A Block object describing the basic block of code at this point. | [
"Represent",
"the",
"basic",
"block",
"at",
"this",
"state",
"s",
"instruction",
"pointer",
".",
"Any",
"arguments",
"to",
"AngrObjectFactory",
".",
"block",
"can",
"ba",
"passed",
"to",
"this",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L544-L553 | train | Returns a basic block at this point. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_state.py | SimState.copy | def copy(self):
"""
Returns a copy of the state.
"""
if self._global_condition is not None:
raise SimStateError("global condition was not cleared before state.copy().")
c_plugins = self._copy_plugins()
state = SimState(project=self.project, arch=self.arch, p... | python | def copy(self):
"""
Returns a copy of the state.
"""
if self._global_condition is not None:
raise SimStateError("global condition was not cleared before state.copy().")
c_plugins = self._copy_plugins()
state = SimState(project=self.project, arch=self.arch, p... | [
"def",
"copy",
"(",
"self",
")",
":",
"if",
"self",
".",
"_global_condition",
"is",
"not",
"None",
":",
"raise",
"SimStateError",
"(",
"\"global condition was not cleared before state.copy().\"",
")",
"c_plugins",
"=",
"self",
".",
"_copy_plugins",
"(",
")",
"stat... | Returns a copy of the state. | [
"Returns",
"a",
"copy",
"of",
"the",
"state",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L568-L587 | train | Returns a copy of the state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_state.py | SimState.merge | def merge(self, *others, **kwargs):
"""
Merges this state with the other states. Returns the merging result, merged state, and the merge flag.
:param states: the states to merge
:param merge_conditions: a tuple of the conditions under which each state holds
:param common_ancesto... | python | def merge(self, *others, **kwargs):
"""
Merges this state with the other states. Returns the merging result, merged state, and the merge flag.
:param states: the states to merge
:param merge_conditions: a tuple of the conditions under which each state holds
:param common_ancesto... | [
"def",
"merge",
"(",
"self",
",",
"*",
"others",
",",
"*",
"*",
"kwargs",
")",
":",
"merge_conditions",
"=",
"kwargs",
".",
"pop",
"(",
"'merge_conditions'",
",",
"None",
")",
"common_ancestor",
"=",
"kwargs",
".",
"pop",
"(",
"'common_ancestor'",
",",
"... | Merges this state with the other states. Returns the merging result, merged state, and the merge flag.
:param states: the states to merge
:param merge_conditions: a tuple of the conditions under which each state holds
:param common_ancestor: a state that represents the common history between t... | [
"Merges",
"this",
"state",
"with",
"the",
"other",
"states",
".",
"Returns",
"the",
"merging",
"result",
"merged",
"state",
"and",
"the",
"merge",
"flag",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L589-L680 | train | Merges this state with the other 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/sim_state.py | SimState.widen | def widen(self, *others):
"""
Perform a widening between self and other states
:param others:
:return:
"""
if len(set(frozenset(o.plugins.keys()) for o in others)) != 1:
raise SimMergeError("Unable to widen due to different sets of plugins.")
if len(s... | python | def widen(self, *others):
"""
Perform a widening between self and other states
:param others:
:return:
"""
if len(set(frozenset(o.plugins.keys()) for o in others)) != 1:
raise SimMergeError("Unable to widen due to different sets of plugins.")
if len(s... | [
"def",
"widen",
"(",
"self",
",",
"*",
"others",
")",
":",
"if",
"len",
"(",
"set",
"(",
"frozenset",
"(",
"o",
".",
"plugins",
".",
"keys",
"(",
")",
")",
"for",
"o",
"in",
"others",
")",
")",
"!=",
"1",
":",
"raise",
"SimMergeError",
"(",
"\"... | Perform a widening between self and other states
:param others:
:return: | [
"Perform",
"a",
"widening",
"between",
"self",
"and",
"other",
"states",
":",
"param",
"others",
":",
":",
"return",
":"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L682-L706 | train | Perform a widening between self and others. | 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/sim_state.py | SimState.reg_concrete | def reg_concrete(self, *args, **kwargs):
"""
Returns the contents of a register but, if that register is symbolic,
raises a SimValueError.
"""
e = self.registers.load(*args, **kwargs)
if self.solver.symbolic(e):
raise SimValueError("target of reg_concrete is s... | python | def reg_concrete(self, *args, **kwargs):
"""
Returns the contents of a register but, if that register is symbolic,
raises a SimValueError.
"""
e = self.registers.load(*args, **kwargs)
if self.solver.symbolic(e):
raise SimValueError("target of reg_concrete is s... | [
"def",
"reg_concrete",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"e",
"=",
"self",
".",
"registers",
".",
"load",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"if",
"self",
".",
"solver",
".",
"symbolic",
"(",
"e",
")... | Returns the contents of a register but, if that register is symbolic,
raises a SimValueError. | [
"Returns",
"the",
"contents",
"of",
"a",
"register",
"but",
"if",
"that",
"register",
"is",
"symbolic",
"raises",
"a",
"SimValueError",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L712-L720 | train | Returns the contents of a register but raises a SimValueError. | 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/sim_state.py | SimState.mem_concrete | def mem_concrete(self, *args, **kwargs):
"""
Returns the contents of a memory but, if the contents are symbolic,
raises a SimValueError.
"""
e = self.memory.load(*args, **kwargs)
if self.solver.symbolic(e):
raise SimValueError("target of mem_concrete is symbol... | python | def mem_concrete(self, *args, **kwargs):
"""
Returns the contents of a memory but, if the contents are symbolic,
raises a SimValueError.
"""
e = self.memory.load(*args, **kwargs)
if self.solver.symbolic(e):
raise SimValueError("target of mem_concrete is symbol... | [
"def",
"mem_concrete",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"e",
"=",
"self",
".",
"memory",
".",
"load",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"if",
"self",
".",
"solver",
".",
"symbolic",
"(",
"e",
")",
... | Returns the contents of a memory but, if the contents are symbolic,
raises a SimValueError. | [
"Returns",
"the",
"contents",
"of",
"a",
"memory",
"but",
"if",
"the",
"contents",
"are",
"symbolic",
"raises",
"a",
"SimValueError",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L722-L730 | train | Returns the contents of a memory object but raises a SimValueError if the contents are symbolic. | 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/sim_state.py | SimState.stack_push | def stack_push(self, thing):
"""
Push 'thing' to the stack, writing the thing to memory and adjusting the stack pointer.
"""
# increment sp
sp = self.regs.sp + self.arch.stack_change
self.regs.sp = sp
return self.memory.store(sp, thing, endness=self.arch.memory_en... | python | def stack_push(self, thing):
"""
Push 'thing' to the stack, writing the thing to memory and adjusting the stack pointer.
"""
# increment sp
sp = self.regs.sp + self.arch.stack_change
self.regs.sp = sp
return self.memory.store(sp, thing, endness=self.arch.memory_en... | [
"def",
"stack_push",
"(",
"self",
",",
"thing",
")",
":",
"# increment sp",
"sp",
"=",
"self",
".",
"regs",
".",
"sp",
"+",
"self",
".",
"arch",
".",
"stack_change",
"self",
".",
"regs",
".",
"sp",
"=",
"sp",
"return",
"self",
".",
"memory",
".",
"... | Push 'thing' to the stack, writing the thing to memory and adjusting the stack pointer. | [
"Push",
"thing",
"to",
"the",
"stack",
"writing",
"the",
"thing",
"to",
"memory",
"and",
"adjusting",
"the",
"stack",
"pointer",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L737-L744 | train | Push a thing onto the stack and adjust the stack 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/sim_state.py | SimState.stack_pop | def stack_pop(self):
"""
Pops from the stack and returns the popped thing. The length will be the architecture word size.
"""
sp = self.regs.sp
self.regs.sp = sp - self.arch.stack_change
return self.memory.load(sp, self.arch.bytes, endness=self.arch.memory_endness) | python | def stack_pop(self):
"""
Pops from the stack and returns the popped thing. The length will be the architecture word size.
"""
sp = self.regs.sp
self.regs.sp = sp - self.arch.stack_change
return self.memory.load(sp, self.arch.bytes, endness=self.arch.memory_endness) | [
"def",
"stack_pop",
"(",
"self",
")",
":",
"sp",
"=",
"self",
".",
"regs",
".",
"sp",
"self",
".",
"regs",
".",
"sp",
"=",
"sp",
"-",
"self",
".",
"arch",
".",
"stack_change",
"return",
"self",
".",
"memory",
".",
"load",
"(",
"sp",
",",
"self",
... | Pops from the stack and returns the popped thing. The length will be the architecture word size. | [
"Pops",
"from",
"the",
"stack",
"and",
"returns",
"the",
"popped",
"thing",
".",
"The",
"length",
"will",
"be",
"the",
"architecture",
"word",
"size",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L747-L753 | train | Pops from the stack and returns the popped thing. | 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/sim_state.py | SimState.stack_read | def stack_read(self, offset, length, bp=False):
"""
Reads length bytes, at an offset into the stack.
:param offset: The offset from the stack pointer.
:param length: The number of bytes to read.
:param bp: If True, offset from the BP instead of the SP. Default: False.
... | python | def stack_read(self, offset, length, bp=False):
"""
Reads length bytes, at an offset into the stack.
:param offset: The offset from the stack pointer.
:param length: The number of bytes to read.
:param bp: If True, offset from the BP instead of the SP. Default: False.
... | [
"def",
"stack_read",
"(",
"self",
",",
"offset",
",",
"length",
",",
"bp",
"=",
"False",
")",
":",
"sp",
"=",
"self",
".",
"regs",
".",
"bp",
"if",
"bp",
"else",
"self",
".",
"regs",
".",
"sp",
"return",
"self",
".",
"memory",
".",
"load",
"(",
... | Reads length bytes, at an offset into the stack.
:param offset: The offset from the stack pointer.
:param length: The number of bytes to read.
:param bp: If True, offset from the BP instead of the SP. Default: False. | [
"Reads",
"length",
"bytes",
"at",
"an",
"offset",
"into",
"the",
"stack",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L756-L765 | train | Reads length bytes at an offset into the stack. | 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/sim_state.py | SimState._stack_values_to_string | def _stack_values_to_string(self, stack_values):
"""
Convert each stack value to a string
:param stack_values: A list of values
:return: The converted string
"""
strings = [ ]
for stack_value in stack_values:
if self.solver.symbolic(stack_value):
... | python | def _stack_values_to_string(self, stack_values):
"""
Convert each stack value to a string
:param stack_values: A list of values
:return: The converted string
"""
strings = [ ]
for stack_value in stack_values:
if self.solver.symbolic(stack_value):
... | [
"def",
"_stack_values_to_string",
"(",
"self",
",",
"stack_values",
")",
":",
"strings",
"=",
"[",
"]",
"for",
"stack_value",
"in",
"stack_values",
":",
"if",
"self",
".",
"solver",
".",
"symbolic",
"(",
"stack_value",
")",
":",
"concretized_value",
"=",
"\"... | Convert each stack value to a string
:param stack_values: A list of values
:return: The converted string | [
"Convert",
"each",
"stack",
"value",
"to",
"a",
"string"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L788-L807 | train | Convert each stack value to a string | 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/sim_state.py | SimState.dbg_print_stack | def dbg_print_stack(self, depth=None, sp=None):
"""
Only used for debugging purposes.
Return the current stack info in formatted string. If depth is None, the
current stack frame (from sp to bp) will be printed out.
"""
var_size = self.arch.bytes
sp_sim = self.re... | python | def dbg_print_stack(self, depth=None, sp=None):
"""
Only used for debugging purposes.
Return the current stack info in formatted string. If depth is None, the
current stack frame (from sp to bp) will be printed out.
"""
var_size = self.arch.bytes
sp_sim = self.re... | [
"def",
"dbg_print_stack",
"(",
"self",
",",
"depth",
"=",
"None",
",",
"sp",
"=",
"None",
")",
":",
"var_size",
"=",
"self",
".",
"arch",
".",
"bytes",
"sp_sim",
"=",
"self",
".",
"regs",
".",
"_sp",
"bp_sim",
"=",
"self",
".",
"regs",
".",
"_bp",
... | Only used for debugging purposes.
Return the current stack info in formatted string. If depth is None, the
current stack frame (from sp to bp) will be printed out. | [
"Only",
"used",
"for",
"debugging",
"purposes",
".",
"Return",
"the",
"current",
"stack",
"info",
"in",
"formatted",
"string",
".",
"If",
"depth",
"is",
"None",
"the",
"current",
"stack",
"frame",
"(",
"from",
"sp",
"to",
"bp",
")",
"will",
"be",
"printe... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state.py#L809-L862 | train | Print the current stack frame in a string. | 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/heap/heap_base.py | SimHeapBase._conc_alloc_size | def _conc_alloc_size(self, sim_size):
"""
Concretizes a size argument, if necessary, to something that makes sense when allocating space. Here we just
maximize its potential size up to the maximum variable size specified in the libc plugin.
TODO:
Further consideration of the tra... | python | def _conc_alloc_size(self, sim_size):
"""
Concretizes a size argument, if necessary, to something that makes sense when allocating space. Here we just
maximize its potential size up to the maximum variable size specified in the libc plugin.
TODO:
Further consideration of the tra... | [
"def",
"_conc_alloc_size",
"(",
"self",
",",
"sim_size",
")",
":",
"if",
"self",
".",
"state",
".",
"solver",
".",
"symbolic",
"(",
"sim_size",
")",
":",
"size",
"=",
"self",
".",
"state",
".",
"solver",
".",
"max_int",
"(",
"sim_size",
")",
"if",
"s... | Concretizes a size argument, if necessary, to something that makes sense when allocating space. Here we just
maximize its potential size up to the maximum variable size specified in the libc plugin.
TODO:
Further consideration of the tradeoffs of this approach is probably warranted. SimHeapPTMa... | [
"Concretizes",
"a",
"size",
"argument",
"if",
"necessary",
"to",
"something",
"that",
"makes",
"sense",
"when",
"allocating",
"space",
".",
"Here",
"we",
"just",
"maximize",
"its",
"potential",
"size",
"up",
"to",
"the",
"maximum",
"variable",
"size",
"specifi... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_base.py#L33-L66 | train | Concretizes a size argument to something that makes sense when allocating space. This function is used to allocate a new size for a new entry in the heap. | 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/heap/heap_base.py | SimHeapBase._malloc | def _malloc(self, sim_size):
"""
Handler for any libc `malloc` SimProcedure call. If the heap has faithful support for `malloc`, it ought to be
implemented in a `malloc` function (as opposed to the `_malloc` function).
:param sim_size: the amount of memory (in bytes) to be allocated
... | python | def _malloc(self, sim_size):
"""
Handler for any libc `malloc` SimProcedure call. If the heap has faithful support for `malloc`, it ought to be
implemented in a `malloc` function (as opposed to the `_malloc` function).
:param sim_size: the amount of memory (in bytes) to be allocated
... | [
"def",
"_malloc",
"(",
"self",
",",
"sim_size",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"_malloc",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Handler for any libc `malloc` SimProcedure call. If the heap has faithful support for `malloc`, it ought to be
implemented in a `malloc` function (as opposed to the `_malloc` function).
:param sim_size: the amount of memory (in bytes) to be allocated | [
"Handler",
"for",
"any",
"libc",
"malloc",
"SimProcedure",
"call",
".",
"If",
"the",
"heap",
"has",
"faithful",
"support",
"for",
"malloc",
"it",
"ought",
"to",
"be",
"implemented",
"in",
"a",
"malloc",
"function",
"(",
"as",
"opposed",
"to",
"the",
"_mall... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_base.py#L68-L76 | train | Handler for any libc malloc SimProcedure call. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/heap/heap_base.py | SimHeapBase._free | def _free(self, ptr):
"""
Handler for any libc `free` SimProcedure call. If the heap has faithful support for `free`, it ought to be
implemented in a `free` function (as opposed to the `_free` function).
:param ptr: the location in memory to be freed
"""
raise NotImpleme... | python | def _free(self, ptr):
"""
Handler for any libc `free` SimProcedure call. If the heap has faithful support for `free`, it ought to be
implemented in a `free` function (as opposed to the `_free` function).
:param ptr: the location in memory to be freed
"""
raise NotImpleme... | [
"def",
"_free",
"(",
"self",
",",
"ptr",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"_free",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Handler for any libc `free` SimProcedure call. If the heap has faithful support for `free`, it ought to be
implemented in a `free` function (as opposed to the `_free` function).
:param ptr: the location in memory to be freed | [
"Handler",
"for",
"any",
"libc",
"free",
"SimProcedure",
"call",
".",
"If",
"the",
"heap",
"has",
"faithful",
"support",
"for",
"free",
"it",
"ought",
"to",
"be",
"implemented",
"in",
"a",
"free",
"function",
"(",
"as",
"opposed",
"to",
"the",
"_free",
"... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_base.py#L78-L86 | train | Handler for any libc free SimProcedure call. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/heap/heap_base.py | SimHeapBase._calloc | def _calloc(self, sim_nmemb, sim_size):
"""
Handler for any libc `calloc` SimProcedure call. If the heap has faithful support for `calloc`, it ought to be
implemented in a `calloc` function (as opposed to the `_calloc` function).
:param sim_nmemb: the number of elements to allocated
... | python | def _calloc(self, sim_nmemb, sim_size):
"""
Handler for any libc `calloc` SimProcedure call. If the heap has faithful support for `calloc`, it ought to be
implemented in a `calloc` function (as opposed to the `_calloc` function).
:param sim_nmemb: the number of elements to allocated
... | [
"def",
"_calloc",
"(",
"self",
",",
"sim_nmemb",
",",
"sim_size",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"_calloc",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__"... | Handler for any libc `calloc` SimProcedure call. If the heap has faithful support for `calloc`, it ought to be
implemented in a `calloc` function (as opposed to the `_calloc` function).
:param sim_nmemb: the number of elements to allocated
:param sim_size: the size of each element (in bytes) | [
"Handler",
"for",
"any",
"libc",
"calloc",
"SimProcedure",
"call",
".",
"If",
"the",
"heap",
"has",
"faithful",
"support",
"for",
"calloc",
"it",
"ought",
"to",
"be",
"implemented",
"in",
"a",
"calloc",
"function",
"(",
"as",
"opposed",
"to",
"the",
"_call... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_base.py#L88-L97 | train | Handler for any libc calloc SimProcedure call. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/heap/heap_base.py | SimHeapBase._realloc | def _realloc(self, ptr, size):
"""
Handler for any libc `realloc` SimProcedure call. If the heap has faithful support for `realloc`, it ought to be
implemented in a `realloc` function (as opposed to the `_realloc` function).
:param ptr: the location in memory to be reallocated
:... | python | def _realloc(self, ptr, size):
"""
Handler for any libc `realloc` SimProcedure call. If the heap has faithful support for `realloc`, it ought to be
implemented in a `realloc` function (as opposed to the `_realloc` function).
:param ptr: the location in memory to be reallocated
:... | [
"def",
"_realloc",
"(",
"self",
",",
"ptr",
",",
"size",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"_realloc",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",... | Handler for any libc `realloc` SimProcedure call. If the heap has faithful support for `realloc`, it ought to be
implemented in a `realloc` function (as opposed to the `_realloc` function).
:param ptr: the location in memory to be reallocated
:param size: the new size desired for the allocation | [
"Handler",
"for",
"any",
"libc",
"realloc",
"SimProcedure",
"call",
".",
"If",
"the",
"heap",
"has",
"faithful",
"support",
"for",
"realloc",
"it",
"ought",
"to",
"be",
"implemented",
"in",
"a",
"realloc",
"function",
"(",
"as",
"opposed",
"to",
"the",
"_r... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_base.py#L99-L108 | train | Handler for any libc realloc SimProcedure call. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/boyscout.py | BoyScout._reconnoiter | def _reconnoiter(self):
"""
The implementation here is simple - just perform a pattern matching of all different architectures we support,
and then perform a vote.
"""
# Retrieve the binary string of main binary
votes = defaultdict(int)
for arch in all_arches:
... | python | def _reconnoiter(self):
"""
The implementation here is simple - just perform a pattern matching of all different architectures we support,
and then perform a vote.
"""
# Retrieve the binary string of main binary
votes = defaultdict(int)
for arch in all_arches:
... | [
"def",
"_reconnoiter",
"(",
"self",
")",
":",
"# Retrieve the binary string of main binary",
"votes",
"=",
"defaultdict",
"(",
"int",
")",
"for",
"arch",
"in",
"all_arches",
":",
"regexes",
"=",
"set",
"(",
")",
"if",
"not",
"arch",
".",
"function_prologs",
":... | The implementation here is simple - just perform a pattern matching of all different architectures we support,
and then perform a vote. | [
"The",
"implementation",
"here",
"is",
"simple",
"-",
"just",
"perform",
"a",
"pattern",
"matching",
"of",
"all",
"different",
"architectures",
"we",
"support",
"and",
"then",
"perform",
"a",
"vote",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/boyscout.py#L22-L63 | train | This method is used to iterate over all the memory and the main binary of the current object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/variable_recovery/variable_recovery_base.py | parse_stack_pointer | def parse_stack_pointer(sp):
"""
Convert multiple supported forms of stack pointer representations into stack offsets.
:param sp: A stack pointer representation.
:return: A stack pointer offset.
:rtype: int
"""
if isinstance(sp, int):
return sp
if isinstance(sp, StackBa... | python | def parse_stack_pointer(sp):
"""
Convert multiple supported forms of stack pointer representations into stack offsets.
:param sp: A stack pointer representation.
:return: A stack pointer offset.
:rtype: int
"""
if isinstance(sp, int):
return sp
if isinstance(sp, StackBa... | [
"def",
"parse_stack_pointer",
"(",
"sp",
")",
":",
"if",
"isinstance",
"(",
"sp",
",",
"int",
")",
":",
"return",
"sp",
"if",
"isinstance",
"(",
"sp",
",",
"StackBaseOffset",
")",
":",
"return",
"sp",
".",
"offset",
"if",
"isinstance",
"(",
"sp",
",",
... | Convert multiple supported forms of stack pointer representations into stack offsets.
:param sp: A stack pointer representation.
:return: A stack pointer offset.
:rtype: int | [
"Convert",
"multiple",
"supported",
"forms",
"of",
"stack",
"pointer",
"representations",
"into",
"stack",
"offsets",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/variable_recovery/variable_recovery_base.py#L14-L37 | train | Converts multiple supported forms of stack pointer representations into stack offsets. | 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_base.py | VariableRecoveryBase.get_variable_definitions | def get_variable_definitions(self, block_addr):
"""
Get variables that are defined at the specified block.
:param int block_addr: Address of the block.
:return: A set of variables.
"""
if block_addr in self._outstates:
return self._outstates[... | python | def get_variable_definitions(self, block_addr):
"""
Get variables that are defined at the specified block.
:param int block_addr: Address of the block.
:return: A set of variables.
"""
if block_addr in self._outstates:
return self._outstates[... | [
"def",
"get_variable_definitions",
"(",
"self",
",",
"block_addr",
")",
":",
"if",
"block_addr",
"in",
"self",
".",
"_outstates",
":",
"return",
"self",
".",
"_outstates",
"[",
"block_addr",
"]",
".",
"variables",
"return",
"set",
"(",
")"
] | Get variables that are defined at the specified block.
:param int block_addr: Address of the block.
:return: A set of variables. | [
"Get",
"variables",
"that",
"are",
"defined",
"at",
"the",
"specified",
"block",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/variable_recovery/variable_recovery_base.py#L60-L70 | train | Get variables that are defined at the specified block. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/variable_recovery/variable_recovery_base.py | VariableRecoveryStateBase._phi_node_contains | def _phi_node_contains(self, phi_variable, variable):
"""
Checks if `phi_variable` is a phi variable, and if it contains `variable` as a sub-variable.
:param phi_variable:
:param variable:
:return:
"""
if self.variable_manager[self.function.addr].is_phi_variable... | python | def _phi_node_contains(self, phi_variable, variable):
"""
Checks if `phi_variable` is a phi variable, and if it contains `variable` as a sub-variable.
:param phi_variable:
:param variable:
:return:
"""
if self.variable_manager[self.function.addr].is_phi_variable... | [
"def",
"_phi_node_contains",
"(",
"self",
",",
"phi_variable",
",",
"variable",
")",
":",
"if",
"self",
".",
"variable_manager",
"[",
"self",
".",
"function",
".",
"addr",
"]",
".",
"is_phi_variable",
"(",
"phi_variable",
")",
":",
"return",
"variable",
"in"... | Checks if `phi_variable` is a phi variable, and if it contains `variable` as a sub-variable.
:param phi_variable:
:param variable:
:return: | [
"Checks",
"if",
"phi_variable",
"is",
"a",
"phi",
"variable",
"and",
"if",
"it",
"contains",
"variable",
"as",
"a",
"sub",
"-",
"variable",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/variable_recovery/variable_recovery_base.py#L185-L196 | train | Checks if the phi variable contains variable as a sub - 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/state_hierarchy.py | StateHierarchy.lineage | def lineage(self, h):
"""
Returns the lineage of histories leading up to `h`.
"""
lineage = [ ]
predecessors = list(self._graph.predecessors(h))
while len(predecessors):
lineage.append(predecessors[0])
predecessors = list(self._graph.predecessors... | python | def lineage(self, h):
"""
Returns the lineage of histories leading up to `h`.
"""
lineage = [ ]
predecessors = list(self._graph.predecessors(h))
while len(predecessors):
lineage.append(predecessors[0])
predecessors = list(self._graph.predecessors... | [
"def",
"lineage",
"(",
"self",
",",
"h",
")",
":",
"lineage",
"=",
"[",
"]",
"predecessors",
"=",
"list",
"(",
"self",
".",
"_graph",
".",
"predecessors",
"(",
"h",
")",
")",
"while",
"len",
"(",
"predecessors",
")",
":",
"lineage",
".",
"append",
... | Returns the lineage of histories leading up to `h`. | [
"Returns",
"the",
"lineage",
"of",
"histories",
"leading",
"up",
"to",
"h",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_hierarchy.py#L108-L121 | train | Returns the lineage of histories leading up to h. | 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_hierarchy.py | StateHierarchy.most_mergeable | def most_mergeable(self, states):
"""
Find the "most mergeable" set of states from those provided.
:param states: a list of states
:returns: a tuple of: (a list of states to merge, those states' common history, a list of states to not merge yet)
"""
histories = set(self... | python | def most_mergeable(self, states):
"""
Find the "most mergeable" set of states from those provided.
:param states: a list of states
:returns: a tuple of: (a list of states to merge, those states' common history, a list of states to not merge yet)
"""
histories = set(self... | [
"def",
"most_mergeable",
"(",
"self",
",",
"states",
")",
":",
"histories",
"=",
"set",
"(",
"self",
".",
"get_ref",
"(",
"s",
".",
"history",
")",
"for",
"s",
"in",
"states",
")",
"for",
"n",
"in",
"networkx",
".",
"algorithms",
".",
"dfs_postorder_no... | Find the "most mergeable" set of states from those provided.
:param states: a list of states
:returns: a tuple of: (a list of states to merge, those states' common history, a list of states to not merge yet) | [
"Find",
"the",
"most",
"mergeable",
"set",
"of",
"states",
"from",
"those",
"provided",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_hierarchy.py#L198-L218 | train | Find the most mergeable set of states from those provided. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/engines/engine.py | SimEngine.process | def process(self, state, *args, **kwargs):
"""
Perform execution with a state.
You should only override this method in a subclass in order to provide the correct method signature and
docstring. You should override the ``_process`` method to do your actual execution.
:param stat... | python | def process(self, state, *args, **kwargs):
"""
Perform execution with a state.
You should only override this method in a subclass in order to provide the correct method signature and
docstring. You should override the ``_process`` method to do your actual execution.
:param stat... | [
"def",
"process",
"(",
"self",
",",
"state",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"inline",
"=",
"kwargs",
".",
"pop",
"(",
"'inline'",
",",
"False",
")",
"force_addr",
"=",
"kwargs",
".",
"pop",
"(",
"'force_addr'",
",",
"None",
")... | Perform execution with a state.
You should only override this method in a subclass in order to provide the correct method signature and
docstring. You should override the ``_process`` method to do your actual execution.
:param state: The state with which to execute. This state will be co... | [
"Perform",
"execution",
"with",
"a",
"state",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/engine.py#L17-L84 | train | This method is called by the engine to process the state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/engines/engine.py | SimEngine.check | def check(self, state, *args, **kwargs):
"""
Check if this engine can be used for execution on the current state. A callback `check_failure` is called upon
failed checks. Note that the execution can still fail even if check() returns True.
You should only override this method in a subcl... | python | def check(self, state, *args, **kwargs):
"""
Check if this engine can be used for execution on the current state. A callback `check_failure` is called upon
failed checks. Note that the execution can still fail even if check() returns True.
You should only override this method in a subcl... | [
"def",
"check",
"(",
"self",
",",
"state",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_check",
"(",
"state",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Check if this engine can be used for execution on the current state. A callback `check_failure` is called upon
failed checks. Note that the execution can still fail even if check() returns True.
You should only override this method in a subclass in order to provide the correct method signature and
... | [
"Check",
"if",
"this",
"engine",
"can",
"be",
"used",
"for",
"execution",
"on",
"the",
"current",
"state",
".",
"A",
"callback",
"check_failure",
"is",
"called",
"upon",
"failed",
"checks",
".",
"Note",
"that",
"the",
"execution",
"can",
"still",
"fail",
"... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/engine.py#L86-L100 | train | Check if this engine can be used for execution on the current state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/indirect_jump_resolvers/resolver.py | IndirectJumpResolver._is_target_valid | def _is_target_valid(self, cfg, target): # pylint:disable=no-self-use
"""
Check if the resolved target is valid.
:param cfg: The CFG analysis object.
:param int target: The target to check.
:return: True if the target is valid. False otherwise.
:rtyp... | python | def _is_target_valid(self, cfg, target): # pylint:disable=no-self-use
"""
Check if the resolved target is valid.
:param cfg: The CFG analysis object.
:param int target: The target to check.
:return: True if the target is valid. False otherwise.
:rtyp... | [
"def",
"_is_target_valid",
"(",
"self",
",",
"cfg",
",",
"target",
")",
":",
"# pylint:disable=no-self-use",
"if",
"self",
".",
"base_state",
"is",
"not",
"None",
":",
"try",
":",
"if",
"self",
".",
"base_state",
".",
"solver",
".",
"is_true",
"(",
"(",
... | Check if the resolved target is valid.
:param cfg: The CFG analysis object.
:param int target: The target to check.
:return: True if the target is valid. False otherwise.
:rtype: bool | [
"Check",
"if",
"the",
"resolved",
"target",
"is",
"valid",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/indirect_jump_resolvers/resolver.py#L44-L68 | train | Check if the resolved target is valid. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/engines/unicorn.py | SimEngineUnicorn.process | def process(self, state,
step=None,
extra_stop_points=None,
inline=False,
force_addr=None,
**kwargs):
"""
:param state: The state with which to execute
:param step: How many basic blocks we want to execute
... | python | def process(self, state,
step=None,
extra_stop_points=None,
inline=False,
force_addr=None,
**kwargs):
"""
:param state: The state with which to execute
:param step: How many basic blocks we want to execute
... | [
"def",
"process",
"(",
"self",
",",
"state",
",",
"step",
"=",
"None",
",",
"extra_stop_points",
"=",
"None",
",",
"inline",
"=",
"False",
",",
"force_addr",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"SimEngineUnicorn",
",... | :param state: The state with which to execute
:param step: How many basic blocks we want to execute
:param extra_stop_points: A collection of addresses at which execution should halt
:param inline: This is an inline execution. Do not bother copying the... | [
":",
"param",
"state",
":",
"The",
"state",
"with",
"which",
"to",
"execute",
":",
"param",
"step",
":",
"How",
"many",
"basic",
"blocks",
"we",
"want",
"to",
"execute",
":",
"param",
"extra_stop_points",
":",
"A",
"collection",
"of",
"addresses",
"at",
... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/unicorn.py#L19-L39 | train | Execute the base execution of the base execution. | 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/heap/heap_freelist.py | Chunk.get_size | def get_size(self):
"""
Returns the actual size of a chunk (as opposed to the entire size field, which may include some flags).
"""
raise NotImplementedError("%s not implemented for %s" % (self.get_size.__func__.__name__,
s... | python | def get_size(self):
"""
Returns the actual size of a chunk (as opposed to the entire size field, which may include some flags).
"""
raise NotImplementedError("%s not implemented for %s" % (self.get_size.__func__.__name__,
s... | [
"def",
"get_size",
"(",
"self",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"get_size",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Returns the actual size of a chunk (as opposed to the entire size field, which may include some flags). | [
"Returns",
"the",
"actual",
"size",
"of",
"a",
"chunk",
"(",
"as",
"opposed",
"to",
"the",
"entire",
"size",
"field",
"which",
"may",
"include",
"some",
"flags",
")",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L31-L36 | train | Returns the actual size of a resource. | 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/heap/heap_freelist.py | Chunk.set_size | def set_size(self, size):
"""
Sets the size of the chunk, preserving any flags.
"""
raise NotImplementedError("%s not implemented for %s" % (self.set_size.__func__.__name__,
self.__class__.__name__)) | python | def set_size(self, size):
"""
Sets the size of the chunk, preserving any flags.
"""
raise NotImplementedError("%s not implemented for %s" % (self.set_size.__func__.__name__,
self.__class__.__name__)) | [
"def",
"set_size",
"(",
"self",
",",
"size",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"set_size",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Sets the size of the chunk, preserving any flags. | [
"Sets",
"the",
"size",
"of",
"the",
"chunk",
"preserving",
"any",
"flags",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L38-L43 | train | Sets the size of the chunk preserving any flags. | 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/heap/heap_freelist.py | Chunk.data_ptr | def data_ptr(self):
"""
Returns the address of the payload of the chunk.
"""
raise NotImplementedError("%s not implemented for %s" % (self.data_ptr.__func__.__name__,
self.__class__.__name__)) | python | def data_ptr(self):
"""
Returns the address of the payload of the chunk.
"""
raise NotImplementedError("%s not implemented for %s" % (self.data_ptr.__func__.__name__,
self.__class__.__name__)) | [
"def",
"data_ptr",
"(",
"self",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"data_ptr",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Returns the address of the payload of the chunk. | [
"Returns",
"the",
"address",
"of",
"the",
"payload",
"of",
"the",
"chunk",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L45-L50 | train | Returns the address of the payload of the chunk. | 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/heap/heap_freelist.py | Chunk.is_free | def is_free(self):
"""
Returns a concrete determination as to whether the chunk is free.
"""
raise NotImplementedError("%s not implemented for %s" % (self.is_free.__func__.__name__,
self.__class__.__name__)) | python | def is_free(self):
"""
Returns a concrete determination as to whether the chunk is free.
"""
raise NotImplementedError("%s not implemented for %s" % (self.is_free.__func__.__name__,
self.__class__.__name__)) | [
"def",
"is_free",
"(",
"self",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"is_free",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Returns a concrete determination as to whether the chunk is free. | [
"Returns",
"a",
"concrete",
"determination",
"as",
"to",
"whether",
"the",
"chunk",
"is",
"free",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L52-L57 | train | Returns a concrete determination as to whether the chunk is free. | 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/heap/heap_freelist.py | Chunk.next_chunk | def next_chunk(self):
"""
Returns the chunk immediately following (and adjacent to) this one.
"""
raise NotImplementedError("%s not implemented for %s" % (self.next_chunk.__func__.__name__,
self.__class__.__name__)) | python | def next_chunk(self):
"""
Returns the chunk immediately following (and adjacent to) this one.
"""
raise NotImplementedError("%s not implemented for %s" % (self.next_chunk.__func__.__name__,
self.__class__.__name__)) | [
"def",
"next_chunk",
"(",
"self",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"next_chunk",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Returns the chunk immediately following (and adjacent to) this one. | [
"Returns",
"the",
"chunk",
"immediately",
"following",
"(",
"and",
"adjacent",
"to",
")",
"this",
"one",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L59-L64 | train | Returns the next chunk in the sequence immediately following this 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/state_plugins/heap/heap_freelist.py | Chunk.prev_chunk | def prev_chunk(self):
"""
Returns the chunk immediately prior (and adjacent) to this one.
"""
raise NotImplementedError("%s not implemented for %s" % (self.prev_chunk.__func__.__name__,
self.__class__.__name__)) | python | def prev_chunk(self):
"""
Returns the chunk immediately prior (and adjacent) to this one.
"""
raise NotImplementedError("%s not implemented for %s" % (self.prev_chunk.__func__.__name__,
self.__class__.__name__)) | [
"def",
"prev_chunk",
"(",
"self",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"prev_chunk",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Returns the chunk immediately prior (and adjacent) to this one. | [
"Returns",
"the",
"chunk",
"immediately",
"prior",
"(",
"and",
"adjacent",
")",
"to",
"this",
"one",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L66-L71 | train | Returns the chunk immediately prior to this 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/state_plugins/heap/heap_freelist.py | Chunk.fwd_chunk | def fwd_chunk(self):
"""
Returns the chunk following this chunk in the list of free chunks.
"""
raise NotImplementedError("%s not implemented for %s" % (self.fwd_chunk.__func__.__name__,
self.__class__.__name__)) | python | def fwd_chunk(self):
"""
Returns the chunk following this chunk in the list of free chunks.
"""
raise NotImplementedError("%s not implemented for %s" % (self.fwd_chunk.__func__.__name__,
self.__class__.__name__)) | [
"def",
"fwd_chunk",
"(",
"self",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"fwd_chunk",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Returns the chunk following this chunk in the list of free chunks. | [
"Returns",
"the",
"chunk",
"following",
"this",
"chunk",
"in",
"the",
"list",
"of",
"free",
"chunks",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L73-L78 | train | Returns the next free chunk in the list of free chunks. | 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/heap/heap_freelist.py | Chunk.set_fwd_chunk | def set_fwd_chunk(self, fwd):
"""
Sets the chunk following this chunk in the list of free chunks.
:param fwd: the chunk to follow this chunk in the list of free chunks
"""
raise NotImplementedError("%s not implemented for %s" % (self.set_fwd_chunk.__func__.__name__,
... | python | def set_fwd_chunk(self, fwd):
"""
Sets the chunk following this chunk in the list of free chunks.
:param fwd: the chunk to follow this chunk in the list of free chunks
"""
raise NotImplementedError("%s not implemented for %s" % (self.set_fwd_chunk.__func__.__name__,
... | [
"def",
"set_fwd_chunk",
"(",
"self",
",",
"fwd",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"set_fwd_chunk",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
... | Sets the chunk following this chunk in the list of free chunks.
:param fwd: the chunk to follow this chunk in the list of free chunks | [
"Sets",
"the",
"chunk",
"following",
"this",
"chunk",
"in",
"the",
"list",
"of",
"free",
"chunks",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L80-L87 | train | Sets the chunk following this chunk in the free chunks 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/heap/heap_freelist.py | Chunk.bck_chunk | def bck_chunk(self):
"""
Returns the chunk backward from this chunk in the list of free chunks.
"""
raise NotImplementedError("%s not implemented for %s" % (self.bck_chunk.__func__.__name__,
self.__class__.__name__)) | python | def bck_chunk(self):
"""
Returns the chunk backward from this chunk in the list of free chunks.
"""
raise NotImplementedError("%s not implemented for %s" % (self.bck_chunk.__func__.__name__,
self.__class__.__name__)) | [
"def",
"bck_chunk",
"(",
"self",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"bck_chunk",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Returns the chunk backward from this chunk in the list of free chunks. | [
"Returns",
"the",
"chunk",
"backward",
"from",
"this",
"chunk",
"in",
"the",
"list",
"of",
"free",
"chunks",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L89-L94 | train | Returns the chunk backward from this chunk in the list of free chunks. | 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/heap/heap_freelist.py | Chunk.set_bck_chunk | def set_bck_chunk(self, bck):
"""
Sets the chunk backward from this chunk in the list of free chunks.
:param bck: the chunk to precede this chunk in the list of free chunks
"""
raise NotImplementedError("%s not implemented for %s" % (self.set_bck_chunk.__func__.__name__,
... | python | def set_bck_chunk(self, bck):
"""
Sets the chunk backward from this chunk in the list of free chunks.
:param bck: the chunk to precede this chunk in the list of free chunks
"""
raise NotImplementedError("%s not implemented for %s" % (self.set_bck_chunk.__func__.__name__,
... | [
"def",
"set_bck_chunk",
"(",
"self",
",",
"bck",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"set_bck_chunk",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
... | Sets the chunk backward from this chunk in the list of free chunks.
:param bck: the chunk to precede this chunk in the list of free chunks | [
"Sets",
"the",
"chunk",
"backward",
"from",
"this",
"chunk",
"in",
"the",
"list",
"of",
"free",
"chunks",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L96-L103 | train | Sets the chunk backward from this chunk in the free chunks 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/heap/heap_freelist.py | SimHeapFreelist.chunks | def chunks(self):
"""
Returns an iterator over all the chunks in the heap.
"""
raise NotImplementedError("%s not implemented for %s" % (self.chunks.__func__.__name__,
self.__class__.__name__)) | python | def chunks(self):
"""
Returns an iterator over all the chunks in the heap.
"""
raise NotImplementedError("%s not implemented for %s" % (self.chunks.__func__.__name__,
self.__class__.__name__)) | [
"def",
"chunks",
"(",
"self",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"chunks",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Returns an iterator over all the chunks in the heap. | [
"Returns",
"an",
"iterator",
"over",
"all",
"the",
"chunks",
"in",
"the",
"heap",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L159-L164 | train | Returns an iterator over all the chunks in the heap. | 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/heap/heap_freelist.py | SimHeapFreelist.allocated_chunks | def allocated_chunks(self):
"""
Returns an iterator over all the allocated chunks in the heap.
"""
raise NotImplementedError("%s not implemented for %s" % (self.allocated_chunks.__func__.__name__,
self.__class__.__name__)) | python | def allocated_chunks(self):
"""
Returns an iterator over all the allocated chunks in the heap.
"""
raise NotImplementedError("%s not implemented for %s" % (self.allocated_chunks.__func__.__name__,
self.__class__.__name__)) | [
"def",
"allocated_chunks",
"(",
"self",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"allocated_chunks",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Returns an iterator over all the allocated chunks in the heap. | [
"Returns",
"an",
"iterator",
"over",
"all",
"the",
"allocated",
"chunks",
"in",
"the",
"heap",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L166-L171 | train | Returns an iterator over all the allocated chunks in the heap. | 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/heap/heap_freelist.py | SimHeapFreelist.free_chunks | def free_chunks(self):
"""
Returns an iterator over all the free chunks in the heap.
"""
raise NotImplementedError("%s not implemented for %s" % (self.free_chunks.__func__.__name__,
self.__class__.__name__)) | python | def free_chunks(self):
"""
Returns an iterator over all the free chunks in the heap.
"""
raise NotImplementedError("%s not implemented for %s" % (self.free_chunks.__func__.__name__,
self.__class__.__name__)) | [
"def",
"free_chunks",
"(",
"self",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"free_chunks",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")"
] | Returns an iterator over all the free chunks in the heap. | [
"Returns",
"an",
"iterator",
"over",
"all",
"the",
"free",
"chunks",
"in",
"the",
"heap",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L173-L178 | train | Returns an iterator over all the free chunks in the heap. | 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/heap/heap_freelist.py | SimHeapFreelist.chunk_from_mem | def chunk_from_mem(self, ptr):
"""
Given a pointer to a user payload, return the chunk associated with that payload.
:param ptr: a pointer to the base of a user payload in the heap
:returns: the associated heap chunk
"""
raise NotImplementedError("%s not implemented for ... | python | def chunk_from_mem(self, ptr):
"""
Given a pointer to a user payload, return the chunk associated with that payload.
:param ptr: a pointer to the base of a user payload in the heap
:returns: the associated heap chunk
"""
raise NotImplementedError("%s not implemented for ... | [
"def",
"chunk_from_mem",
"(",
"self",
",",
"ptr",
")",
":",
"raise",
"NotImplementedError",
"(",
"\"%s not implemented for %s\"",
"%",
"(",
"self",
".",
"chunk_from_mem",
".",
"__func__",
".",
"__name__",
",",
"self",
".",
"__class__",
".",
"__name__",
")",
")... | Given a pointer to a user payload, return the chunk associated with that payload.
:param ptr: a pointer to the base of a user payload in the heap
:returns: the associated heap chunk | [
"Given",
"a",
"pointer",
"to",
"a",
"user",
"payload",
"return",
"the",
"chunk",
"associated",
"with",
"that",
"payload",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/heap_freelist.py#L180-L188 | train | Given a pointer to a user payload return the associated heap chunk. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/engines/hub.py | EngineHub.successors | def successors(self, state, addr=None, jumpkind=None, default_engine=False, procedure_engine=False,
engines=None, **kwargs):
"""
Perform execution using any applicable engine. Enumerate the current engines and use the
first one that works. Engines are enumerated in order, spec... | python | def successors(self, state, addr=None, jumpkind=None, default_engine=False, procedure_engine=False,
engines=None, **kwargs):
"""
Perform execution using any applicable engine. Enumerate the current engines and use the
first one that works. Engines are enumerated in order, spec... | [
"def",
"successors",
"(",
"self",
",",
"state",
",",
"addr",
"=",
"None",
",",
"jumpkind",
"=",
"None",
",",
"default_engine",
"=",
"False",
",",
"procedure_engine",
"=",
"False",
",",
"engines",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
... | Perform execution using any applicable engine. Enumerate the current engines and use the
first one that works. Engines are enumerated in order, specified by the ``order`` attribute.
:param state: The state to analyze
:param addr: optional, an address to execute at i... | [
"Perform",
"execution",
"using",
"any",
"applicable",
"engine",
".",
"Enumerate",
"the",
"current",
"engines",
"and",
"use",
"the",
"first",
"one",
"that",
"works",
".",
"Engines",
"are",
"enumerated",
"in",
"order",
"specified",
"by",
"the",
"order",
"attribu... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/hub.py#L92-L132 | train | Returns a SimSuccessors object representing the successors of the current state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/girlscout.py | GirlScout._get_next_code_addr | def _get_next_code_addr(self, initial_state):
"""
Besides calling _get_next_addr, we will check if data locates at that address seems to be code or not. If not,
we'll move on to request for next valid address.
"""
next_addr = self._get_next_addr_to_search()
if next_addr ... | python | def _get_next_code_addr(self, initial_state):
"""
Besides calling _get_next_addr, we will check if data locates at that address seems to be code or not. If not,
we'll move on to request for next valid address.
"""
next_addr = self._get_next_addr_to_search()
if next_addr ... | [
"def",
"_get_next_code_addr",
"(",
"self",
",",
"initial_state",
")",
":",
"next_addr",
"=",
"self",
".",
"_get_next_addr_to_search",
"(",
")",
"if",
"next_addr",
"is",
"None",
":",
"return",
"None",
"start_addr",
"=",
"next_addr",
"sz",
"=",
"\"\"",
"is_sz",
... | Besides calling _get_next_addr, we will check if data locates at that address seems to be code or not. If not,
we'll move on to request for next valid address. | [
"Besides",
"calling",
"_get_next_addr",
"we",
"will",
"check",
"if",
"data",
"locates",
"at",
"that",
"address",
"seems",
"to",
"be",
"code",
"or",
"not",
".",
"If",
"not",
"we",
"ll",
"move",
"on",
"to",
"request",
"for",
"next",
"valid",
"address",
"."... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/girlscout.py#L118-L172 | train | This function searches for the next code address in the memory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/girlscout.py | GirlScout._symbolic_reconnoiter | def _symbolic_reconnoiter(self, addr, target_addr, max_depth=10):
"""
When an IRSB has more than two exits (for example, a jumptable), we
cannot concretize their exits in concrete mode. Hence we statically
execute the function from beginning in this method, and then switch to
sym... | python | def _symbolic_reconnoiter(self, addr, target_addr, max_depth=10):
"""
When an IRSB has more than two exits (for example, a jumptable), we
cannot concretize their exits in concrete mode. Hence we statically
execute the function from beginning in this method, and then switch to
sym... | [
"def",
"_symbolic_reconnoiter",
"(",
"self",
",",
"addr",
",",
"target_addr",
",",
"max_depth",
"=",
"10",
")",
":",
"state",
"=",
"self",
".",
"project",
".",
"factory",
".",
"blank_state",
"(",
"addr",
"=",
"addr",
",",
"mode",
"=",
"\"symbolic\"",
","... | When an IRSB has more than two exits (for example, a jumptable), we
cannot concretize their exits in concrete mode. Hence we statically
execute the function from beginning in this method, and then switch to
symbolic mode for the final IRSB to get all possible exits of that
IRSB. | [
"When",
"an",
"IRSB",
"has",
"more",
"than",
"two",
"exits",
"(",
"for",
"example",
"a",
"jumptable",
")",
"we",
"cannot",
"concretize",
"their",
"exits",
"in",
"concrete",
"mode",
".",
"Hence",
"we",
"statically",
"execute",
"the",
"function",
"from",
"be... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/girlscout.py#L174-L196 | train | This method returns a list of all possible symbolic IRSBs that are at target_addr. | 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/girlscout.py | GirlScout._scan_function_prologues | def _scan_function_prologues(self, traced_address, function_exits, initial_state):
"""
Scan the entire program space for prologues, and start code scanning at those positions
:param traced_address:
:param function_exits:
:param initial_state:
:param next_addr:
:re... | python | def _scan_function_prologues(self, traced_address, function_exits, initial_state):
"""
Scan the entire program space for prologues, and start code scanning at those positions
:param traced_address:
:param function_exits:
:param initial_state:
:param next_addr:
:re... | [
"def",
"_scan_function_prologues",
"(",
"self",
",",
"traced_address",
",",
"function_exits",
",",
"initial_state",
")",
":",
"# Precompile all regexes",
"regexes",
"=",
"set",
"(",
")",
"for",
"ins_regex",
"in",
"self",
".",
"project",
".",
"arch",
".",
"functi... | Scan the entire program space for prologues, and start code scanning at those positions
:param traced_address:
:param function_exits:
:param initial_state:
:param next_addr:
:returns: | [
"Scan",
"the",
"entire",
"program",
"space",
"for",
"prologues",
"and",
"start",
"code",
"scanning",
"at",
"those",
"positions",
":",
"param",
"traced_address",
":",
":",
"param",
"function_exits",
":",
":",
"param",
"initial_state",
":",
":",
"param",
"next_a... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/girlscout.py#L434-L468 | train | Scan the entire program space for prologues and start code scanning at those positions. | 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/girlscout.py | GirlScout._process_indirect_jumps | def _process_indirect_jumps(self):
"""
Execute each basic block with an indeterminiable exit target
:returns:
"""
function_starts = set()
l.info("We have %d indirect jumps", len(self._indirect_jumps))
for jumpkind, irsb_addr in self._indirect_jumps:
... | python | def _process_indirect_jumps(self):
"""
Execute each basic block with an indeterminiable exit target
:returns:
"""
function_starts = set()
l.info("We have %d indirect jumps", len(self._indirect_jumps))
for jumpkind, irsb_addr in self._indirect_jumps:
... | [
"def",
"_process_indirect_jumps",
"(",
"self",
")",
":",
"function_starts",
"=",
"set",
"(",
")",
"l",
".",
"info",
"(",
"\"We have %d indirect jumps\"",
",",
"len",
"(",
"self",
".",
"_indirect_jumps",
")",
")",
"for",
"jumpkind",
",",
"irsb_addr",
"in",
"s... | Execute each basic block with an indeterminiable exit target
:returns: | [
"Execute",
"each",
"basic",
"block",
"with",
"an",
"indeterminiable",
"exit",
"target",
":",
"returns",
":"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/girlscout.py#L470-L557 | train | Execute each basic block with an indeterminiable exit target. | 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/girlscout.py | GirlScout._solve_forbase_address | def _solve_forbase_address(self, function_starts, functions):
"""
Voting for the most possible base address.
:param function_starts:
:param functions:
:returns:
"""
pseudo_base_addr = self.project.loader.main_object.min_addr
base_addr_ctr = { }
... | python | def _solve_forbase_address(self, function_starts, functions):
"""
Voting for the most possible base address.
:param function_starts:
:param functions:
:returns:
"""
pseudo_base_addr = self.project.loader.main_object.min_addr
base_addr_ctr = { }
... | [
"def",
"_solve_forbase_address",
"(",
"self",
",",
"function_starts",
",",
"functions",
")",
":",
"pseudo_base_addr",
"=",
"self",
".",
"project",
".",
"loader",
".",
"main_object",
".",
"min_addr",
"base_addr_ctr",
"=",
"{",
"}",
"for",
"s",
"in",
"function_s... | Voting for the most possible base address.
:param function_starts:
:param functions:
:returns: | [
"Voting",
"for",
"the",
"most",
"possible",
"base",
"address",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/girlscout.py#L559-L589 | train | Solve for the most possible base 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/girlscout.py | GirlScout._determinebase_address | def _determinebase_address(self):
"""
The basic idea is simple: start from a specific point, try to construct
functions as much as we can, and maintain a function distribution graph
and a call graph simultaneously. Repeat searching until we come to the
end that there is no new fu... | python | def _determinebase_address(self):
"""
The basic idea is simple: start from a specific point, try to construct
functions as much as we can, and maintain a function distribution graph
and a call graph simultaneously. Repeat searching until we come to the
end that there is no new fu... | [
"def",
"_determinebase_address",
"(",
"self",
")",
":",
"traced_address",
"=",
"set",
"(",
")",
"self",
".",
"functions",
"=",
"set",
"(",
")",
"self",
".",
"call_map",
"=",
"networkx",
".",
"DiGraph",
"(",
")",
"self",
".",
"cfg",
"=",
"networkx",
"."... | The basic idea is simple: start from a specific point, try to construct
functions as much as we can, and maintain a function distribution graph
and a call graph simultaneously. Repeat searching until we come to the
end that there is no new function to be found.
A function should start wi... | [
"The",
"basic",
"idea",
"is",
"simple",
":",
"start",
"from",
"a",
"specific",
"point",
"try",
"to",
"construct",
"functions",
"as",
"much",
"as",
"we",
"can",
"and",
"maintain",
"a",
"function",
"distribution",
"graph",
"and",
"a",
"call",
"graph",
"simul... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/girlscout.py#L600-L691 | train | Determine the base address of the function that we are going to be called. | 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/girlscout.py | GirlScout._full_code_scan | def _full_code_scan(self):
"""
Perform a full code scan on the target binary.
"""
# We gotta time this function
start_time = datetime.now()
traced_address = set()
self.functions = set()
self.call_map = networkx.DiGraph()
self.cfg = networkx.DiGra... | python | def _full_code_scan(self):
"""
Perform a full code scan on the target binary.
"""
# We gotta time this function
start_time = datetime.now()
traced_address = set()
self.functions = set()
self.call_map = networkx.DiGraph()
self.cfg = networkx.DiGra... | [
"def",
"_full_code_scan",
"(",
"self",
")",
":",
"# We gotta time this function",
"start_time",
"=",
"datetime",
".",
"now",
"(",
")",
"traced_address",
"=",
"set",
"(",
")",
"self",
".",
"functions",
"=",
"set",
"(",
")",
"self",
".",
"call_map",
"=",
"ne... | Perform a full code scan on the target binary. | [
"Perform",
"a",
"full",
"code",
"scan",
"on",
"the",
"target",
"binary",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/girlscout.py#L693-L746 | train | Perform a full code scan on the target binary. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/girlscout.py | GirlScout.genenare_callmap_sif | def genenare_callmap_sif(self, filepath):
"""
Generate a sif file from the call map
"""
graph = self.call_map
if graph is None:
raise AngrGirlScoutError('Please generate the call graph first.')
f = open(filepath, "wb")
for src, dst in graph.edges():... | python | def genenare_callmap_sif(self, filepath):
"""
Generate a sif file from the call map
"""
graph = self.call_map
if graph is None:
raise AngrGirlScoutError('Please generate the call graph first.')
f = open(filepath, "wb")
for src, dst in graph.edges():... | [
"def",
"genenare_callmap_sif",
"(",
"self",
",",
"filepath",
")",
":",
"graph",
"=",
"self",
".",
"call_map",
"if",
"graph",
"is",
"None",
":",
"raise",
"AngrGirlScoutError",
"(",
"'Please generate the call graph first.'",
")",
"f",
"=",
"open",
"(",
"filepath",... | Generate a sif file from the call map | [
"Generate",
"a",
"sif",
"file",
"from",
"the",
"call",
"map"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/girlscout.py#L771-L785 | train | Generate a sif file from the call map. | 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/girlscout.py | GirlScout.generate_code_cover | def generate_code_cover(self):
"""
Generate a list of all recovered basic blocks.
"""
lst = [ ]
for irsb_addr in self.cfg.nodes():
if irsb_addr not in self._block_size:
continue
irsb_size = self._block_size[irsb_addr]
lst.appen... | python | def generate_code_cover(self):
"""
Generate a list of all recovered basic blocks.
"""
lst = [ ]
for irsb_addr in self.cfg.nodes():
if irsb_addr not in self._block_size:
continue
irsb_size = self._block_size[irsb_addr]
lst.appen... | [
"def",
"generate_code_cover",
"(",
"self",
")",
":",
"lst",
"=",
"[",
"]",
"for",
"irsb_addr",
"in",
"self",
".",
"cfg",
".",
"nodes",
"(",
")",
":",
"if",
"irsb_addr",
"not",
"in",
"self",
".",
"_block_size",
":",
"continue",
"irsb_size",
"=",
"self",... | Generate a list of all recovered basic blocks. | [
"Generate",
"a",
"list",
"of",
"all",
"recovered",
"basic",
"blocks",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/girlscout.py#L787-L801 | train | Generate a list of all recovered 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/state_plugins/solver.py | SimSolver.reload_solver | def reload_solver(self, constraints=None):
"""
Reloads the solver. Useful when changing solver options.
:param list constraints: A new list of constraints to use in the reloaded solver instead of the current one
"""
if constraints is None:
constraints = self._sol... | python | def reload_solver(self, constraints=None):
"""
Reloads the solver. Useful when changing solver options.
:param list constraints: A new list of constraints to use in the reloaded solver instead of the current one
"""
if constraints is None:
constraints = self._sol... | [
"def",
"reload_solver",
"(",
"self",
",",
"constraints",
"=",
"None",
")",
":",
"if",
"constraints",
"is",
"None",
":",
"constraints",
"=",
"self",
".",
"_solver",
".",
"constraints",
"self",
".",
"_stored_solver",
"=",
"None",
"self",
".",
"_solver",
".",... | Reloads the solver. Useful when changing solver options.
:param list constraints: A new list of constraints to use in the reloaded solver instead of the current one | [
"Reloads",
"the",
"solver",
".",
"Useful",
"when",
"changing",
"solver",
"options",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L189-L199 | train | Reloads the solver. Useful when changing solver options. | 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/solver.py | SimSolver.get_variables | def get_variables(self, *keys):
"""
Iterate over all variables for which their tracking key is a prefix of the values provided.
Elements are a tuple, the first element is the full tracking key, the second is the symbol.
>>> list(s.solver.get_variables('mem'))
[(('mem', 0x1000),... | python | def get_variables(self, *keys):
"""
Iterate over all variables for which their tracking key is a prefix of the values provided.
Elements are a tuple, the first element is the full tracking key, the second is the symbol.
>>> list(s.solver.get_variables('mem'))
[(('mem', 0x1000),... | [
"def",
"get_variables",
"(",
"self",
",",
"*",
"keys",
")",
":",
"for",
"k",
",",
"v",
"in",
"self",
".",
"eternal_tracked_variables",
".",
"items",
"(",
")",
":",
"if",
"len",
"(",
"k",
")",
">=",
"len",
"(",
"keys",
")",
"and",
"all",
"(",
"x",... | Iterate over all variables for which their tracking key is a prefix of the values provided.
Elements are a tuple, the first element is the full tracking key, the second is the symbol.
>>> list(s.solver.get_variables('mem'))
[(('mem', 0x1000), <BV64 mem_1000_4_64>), (('mem', 0x1008), <BV64 mem_... | [
"Iterate",
"over",
"all",
"variables",
"for",
"which",
"their",
"tracking",
"key",
"is",
"a",
"prefix",
"of",
"the",
"values",
"provided",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L201-L226 | train | Iterate over all variables for which their tracking key is a prefix of the values provided. | 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/solver.py | SimSolver.register_variable | def register_variable(self, v, key, eternal=True):
"""
Register a value with the variable tracking system
:param v: The BVS to register
:param key: A tuple to register the variable under
:parma eternal: Whether this is an eternal variable, default True. If False, an in... | python | def register_variable(self, v, key, eternal=True):
"""
Register a value with the variable tracking system
:param v: The BVS to register
:param key: A tuple to register the variable under
:parma eternal: Whether this is an eternal variable, default True. If False, an in... | [
"def",
"register_variable",
"(",
"self",
",",
"v",
",",
"key",
",",
"eternal",
"=",
"True",
")",
":",
"if",
"type",
"(",
"key",
")",
"is",
"not",
"tuple",
":",
"raise",
"TypeError",
"(",
"\"Variable tracking key must be a tuple\"",
")",
"if",
"eternal",
":... | Register a value with the variable tracking system
:param v: The BVS to register
:param key: A tuple to register the variable under
:parma eternal: Whether this is an eternal variable, default True. If False, an incrementing counter will be
appended to the key. | [
"Register",
"a",
"value",
"with",
"the",
"variable",
"tracking",
"system"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L228-L247 | train | Register a value with the variable tracking system. | 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/solver.py | SimSolver.describe_variables | def describe_variables(self, v):
"""
Given an AST, iterate over all the keys of all the BVS leaves in the tree which are registered.
"""
reverse_mapping = {next(iter(var.variables)): k for k, var in self.eternal_tracked_variables.items()}
reverse_mapping.update({next(iter(var.var... | python | def describe_variables(self, v):
"""
Given an AST, iterate over all the keys of all the BVS leaves in the tree which are registered.
"""
reverse_mapping = {next(iter(var.variables)): k for k, var in self.eternal_tracked_variables.items()}
reverse_mapping.update({next(iter(var.var... | [
"def",
"describe_variables",
"(",
"self",
",",
"v",
")",
":",
"reverse_mapping",
"=",
"{",
"next",
"(",
"iter",
"(",
"var",
".",
"variables",
")",
")",
":",
"k",
"for",
"k",
",",
"var",
"in",
"self",
".",
"eternal_tracked_variables",
".",
"items",
"(",... | Given an AST, iterate over all the keys of all the BVS leaves in the tree which are registered. | [
"Given",
"an",
"AST",
"iterate",
"over",
"all",
"the",
"keys",
"of",
"all",
"the",
"BVS",
"leaves",
"in",
"the",
"tree",
"which",
"are",
"registered",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L249-L258 | train | Given an AST iterate over all the keys of all the BVS leaves in the tree which are registered. | 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/solver.py | SimSolver._solver | def _solver(self):
"""
Creates or gets a Claripy solver, based on the state options.
"""
if self._stored_solver is not None:
return self._stored_solver
track = o.CONSTRAINT_TRACKING_IN_SOLVER in self.state.options
approximate_first = o.APPROXIMATE_FIRST in se... | python | def _solver(self):
"""
Creates or gets a Claripy solver, based on the state options.
"""
if self._stored_solver is not None:
return self._stored_solver
track = o.CONSTRAINT_TRACKING_IN_SOLVER in self.state.options
approximate_first = o.APPROXIMATE_FIRST in se... | [
"def",
"_solver",
"(",
"self",
")",
":",
"if",
"self",
".",
"_stored_solver",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_stored_solver",
"track",
"=",
"o",
".",
"CONSTRAINT_TRACKING_IN_SOLVER",
"in",
"self",
".",
"state",
".",
"options",
"approximate... | Creates or gets a Claripy solver, based on the state options. | [
"Creates",
"or",
"gets",
"a",
"Claripy",
"solver",
"based",
"on",
"the",
"state",
"options",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L261-L301 | train | Creates or gets a Claripy solver based on the state options. | 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/solver.py | SimSolver.Unconstrained | def Unconstrained(self, name, bits, uninitialized=True, inspect=True, events=True, key=None, eternal=False, **kwargs):
"""
Creates an unconstrained symbol or a default concrete value (0), based on the state options.
:param name: The name of the symbol.
:param bits: ... | python | def Unconstrained(self, name, bits, uninitialized=True, inspect=True, events=True, key=None, eternal=False, **kwargs):
"""
Creates an unconstrained symbol or a default concrete value (0), based on the state options.
:param name: The name of the symbol.
:param bits: ... | [
"def",
"Unconstrained",
"(",
"self",
",",
"name",
",",
"bits",
",",
"uninitialized",
"=",
"True",
",",
"inspect",
"=",
"True",
",",
"events",
"=",
"True",
",",
"key",
"=",
"None",
",",
"eternal",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"if... | Creates an unconstrained symbol or a default concrete value (0), based on the state options.
:param name: The name of the symbol.
:param bits: The size (in bits) of the symbol.
:param uninitialized: Whether this value should be counted as an "uninitialized" value in the ... | [
"Creates",
"an",
"unconstrained",
"symbol",
"or",
"a",
"default",
"concrete",
"value",
"(",
"0",
")",
"based",
"on",
"the",
"state",
"options",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L306-L340 | train | Creates an unconstrained BV with the specified name and size. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/solver.py | SimSolver.BVS | def BVS(self, name, size,
min=None, max=None, stride=None,
uninitialized=False,
explicit_name=None, key=None, eternal=False,
inspect=True, events=True,
**kwargs): #pylint:disable=redefined-builtin
"""
Creates a bit-vector symbol (i.e., a variab... | python | def BVS(self, name, size,
min=None, max=None, stride=None,
uninitialized=False,
explicit_name=None, key=None, eternal=False,
inspect=True, events=True,
**kwargs): #pylint:disable=redefined-builtin
"""
Creates a bit-vector symbol (i.e., a variab... | [
"def",
"BVS",
"(",
"self",
",",
"name",
",",
"size",
",",
"min",
"=",
"None",
",",
"max",
"=",
"None",
",",
"stride",
"=",
"None",
",",
"uninitialized",
"=",
"False",
",",
"explicit_name",
"=",
"None",
",",
"key",
"=",
"None",
",",
"eternal",
"=",
... | Creates a bit-vector symbol (i.e., a variable). Other keyword parameters are passed directly on to the
constructor of claripy.ast.BV.
:param name: The name of the symbol.
:param size: The size (in bits) of the bit-vector.
:param min: The minimum value o... | [
"Creates",
"a",
"bit",
"-",
"vector",
"symbol",
"(",
"i",
".",
"e",
".",
"a",
"variable",
")",
".",
"Other",
"keyword",
"parameters",
"are",
"passed",
"directly",
"on",
"to",
"the",
"constructor",
"of",
"claripy",
".",
"ast",
".",
"BV",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L342-L390 | train | Creates a bit - vector symbol. | 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/solver.py | SimSolver.eval_to_ast | def eval_to_ast(self, e, n, extra_constraints=(), exact=None):
"""
Evaluate an expression, using the solver if necessary. Returns AST objects.
:param e: the expression
:param n: the number of desired solutions
:param extra_constraints: extra constraints to apply to the solver
... | python | def eval_to_ast(self, e, n, extra_constraints=(), exact=None):
"""
Evaluate an expression, using the solver if necessary. Returns AST objects.
:param e: the expression
:param n: the number of desired solutions
:param extra_constraints: extra constraints to apply to the solver
... | [
"def",
"eval_to_ast",
"(",
"self",
",",
"e",
",",
"n",
",",
"extra_constraints",
"=",
"(",
")",
",",
"exact",
"=",
"None",
")",
":",
"return",
"self",
".",
"_solver",
".",
"eval_to_ast",
"(",
"e",
",",
"n",
",",
"extra_constraints",
"=",
"self",
".",... | Evaluate an expression, using the solver if necessary. Returns AST objects.
:param e: the expression
:param n: the number of desired solutions
:param extra_constraints: extra constraints to apply to the solver
:param exact: if False, returns approximate solutions
:return: a tupl... | [
"Evaluate",
"an",
"expression",
"using",
"the",
"solver",
"if",
"necessary",
".",
"Returns",
"AST",
"objects",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L471-L482 | train | Evaluate an expression using the solver if necessary. Returns an AST 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.