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/state_plugins/solver.py
SimSolver._eval
def _eval(self, e, n, extra_constraints=(), exact=None): """ Evaluate an expression, using the solver if necessary. Returns primitives. :param e: the expression :param n: the number of desired solutions :param extra_constraints: extra constraints to apply to the solver :...
python
def _eval(self, e, n, extra_constraints=(), exact=None): """ Evaluate an expression, using the solver if necessary. Returns primitives. :param e: the expression :param n: the number of desired solutions :param extra_constraints: extra constraints to apply to the solver :...
[ "def", "_eval", "(", "self", ",", "e", ",", "n", ",", "extra_constraints", "=", "(", ")", ",", "exact", "=", "None", ")", ":", "return", "self", ".", "_solver", ".", "eval", "(", "e", ",", "n", ",", "extra_constraints", "=", "self", ".", "_adjust_c...
Evaluate an expression, using the solver if necessary. Returns primitives. :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 tuple...
[ "Evaluate", "an", "expression", "using", "the", "solver", "if", "necessary", ".", "Returns", "primitives", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L488-L499
train
Evaluate an expression using the solver if necessary. Returns a tuple of the solutions that are approximate.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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.max
def max(self, e, extra_constraints=(), exact=None): """ Return the maximum value of expression `e`. :param e : expression (an AST) to evaluate :param extra_constraints: extra constraints (as ASTs) to add to the solver for this solve :param exact : if Fa...
python
def max(self, e, extra_constraints=(), exact=None): """ Return the maximum value of expression `e`. :param e : expression (an AST) to evaluate :param extra_constraints: extra constraints (as ASTs) to add to the solver for this solve :param exact : if Fa...
[ "def", "max", "(", "self", ",", "e", ",", "extra_constraints", "=", "(", ")", ",", "exact", "=", "None", ")", ":", "if", "exact", "is", "False", "and", "o", ".", "VALIDATE_APPROXIMATIONS", "in", "self", ".", "state", ".", "options", ":", "ar", "=", ...
Return the maximum value of expression `e`. :param e : expression (an AST) to evaluate :param extra_constraints: extra constraints (as ASTs) to add to the solver for this solve :param exact : if False, return approximate solutions. :return: the maximum possible...
[ "Return", "the", "maximum", "value", "of", "expression", "e", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L505-L519
train
Return the maximum value of expression e.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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.solution
def solution(self, e, v, extra_constraints=(), exact=None): """ Return True if `v` is a solution of `expr` with the extra constraints, False otherwise. :param e: An expression (an AST) to evaluate :param v: The proposed solution (an AST) :para...
python
def solution(self, e, v, extra_constraints=(), exact=None): """ Return True if `v` is a solution of `expr` with the extra constraints, False otherwise. :param e: An expression (an AST) to evaluate :param v: The proposed solution (an AST) :para...
[ "def", "solution", "(", "self", ",", "e", ",", "v", ",", "extra_constraints", "=", "(", ")", ",", "exact", "=", "None", ")", ":", "if", "exact", "is", "False", "and", "o", ".", "VALIDATE_APPROXIMATIONS", "in", "self", ".", "state", ".", "options", ":...
Return True if `v` is a solution of `expr` with the extra constraints, False otherwise. :param e: An expression (an AST) to evaluate :param v: The proposed solution (an AST) :param extra_constraints: Extra constraints (as ASTs) to add to the solver for this...
[ "Return", "True", "if", "v", "is", "a", "solution", "of", "expr", "with", "the", "extra", "constraints", "False", "otherwise", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L544-L560
train
Return True if v is a solution of expr False otherwise.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/state_plugins/solver.py
SimSolver.unsat_core
def unsat_core(self, extra_constraints=()): """ This function returns the unsat core from the backend solver. :param extra_constraints: Extra constraints (as ASTs) to add to the solver for this solve. :return: The unsat core. """ if o.CONSTRAINT_TRACKING_IN_SOLVER not ...
python
def unsat_core(self, extra_constraints=()): """ This function returns the unsat core from the backend solver. :param extra_constraints: Extra constraints (as ASTs) to add to the solver for this solve. :return: The unsat core. """ if o.CONSTRAINT_TRACKING_IN_SOLVER not ...
[ "def", "unsat_core", "(", "self", ",", "extra_constraints", "=", "(", ")", ")", ":", "if", "o", ".", "CONSTRAINT_TRACKING_IN_SOLVER", "not", "in", "self", ".", "state", ".", "options", ":", "raise", "SimSolverOptionError", "(", "'CONSTRAINT_TRACKING_IN_SOLVER must...
This function returns the unsat core from the backend solver. :param extra_constraints: Extra constraints (as ASTs) to add to the solver for this solve. :return: The unsat core.
[ "This", "function", "returns", "the", "unsat", "core", "from", "the", "backend", "solver", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L611-L620
train
This function returns the unsatisfiable version of the current core.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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.satisfiable
def satisfiable(self, extra_constraints=(), exact=None): """ This function does a constraint check and checks if the solver is in a sat state. :param extra_constraints: Extra constraints (as ASTs) to add to s for this solve :param exact: If False, return approximate solu...
python
def satisfiable(self, extra_constraints=(), exact=None): """ This function does a constraint check and checks if the solver is in a sat state. :param extra_constraints: Extra constraints (as ASTs) to add to s for this solve :param exact: If False, return approximate solu...
[ "def", "satisfiable", "(", "self", ",", "extra_constraints", "=", "(", ")", ",", "exact", "=", "None", ")", ":", "if", "exact", "is", "False", "and", "o", ".", "VALIDATE_APPROXIMATIONS", "in", "self", ".", "state", ".", "options", ":", "er", "=", "self...
This function does a constraint check and checks if the solver is in a sat state. :param extra_constraints: Extra constraints (as ASTs) to add to s for this solve :param exact: If False, return approximate solutions. :return: True if sat, otherwise false
[ "This", "function", "does", "a", "constraint", "check", "and", "checks", "if", "the", "solver", "is", "in", "a", "sat", "state", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L625-L640
train
This function checks if the solver is in a sat 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/state_plugins/solver.py
SimSolver.add
def add(self, *constraints): """ Add some constraints to the solver. :param constraints: Pass any constraints that you want to add (ASTs) as varargs. """ cc = self._adjust_constraint_list(constraints) return self._solver.add(cc)
python
def add(self, *constraints): """ Add some constraints to the solver. :param constraints: Pass any constraints that you want to add (ASTs) as varargs. """ cc = self._adjust_constraint_list(constraints) return self._solver.add(cc)
[ "def", "add", "(", "self", ",", "*", "constraints", ")", ":", "cc", "=", "self", ".", "_adjust_constraint_list", "(", "constraints", ")", "return", "self", ".", "_solver", ".", "add", "(", "cc", ")" ]
Add some constraints to the solver. :param constraints: Pass any constraints that you want to add (ASTs) as varargs.
[ "Add", "some", "constraints", "to", "the", "solver", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L645-L652
train
Adds some constraints to the 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/state_plugins/solver.py
SimSolver._cast_to
def _cast_to(e, solution, cast_to): """ Casts a solution for the given expression to type `cast_to`. :param e: The expression `value` is a solution for :param value: The solution to be cast :param cast_to: The type `value` should be cast to. Must be one of the currently supporte...
python
def _cast_to(e, solution, cast_to): """ Casts a solution for the given expression to type `cast_to`. :param e: The expression `value` is a solution for :param value: The solution to be cast :param cast_to: The type `value` should be cast to. Must be one of the currently supporte...
[ "def", "_cast_to", "(", "e", ",", "solution", ",", "cast_to", ")", ":", "if", "cast_to", "is", "None", ":", "return", "solution", "if", "type", "(", "solution", ")", "is", "bool", ":", "if", "cast_to", "is", "bytes", ":", "return", "bytes", "(", "[",...
Casts a solution for the given expression to type `cast_to`. :param e: The expression `value` is a solution for :param value: The solution to be cast :param cast_to: The type `value` should be cast to. Must be one of the currently supported types (bytes|int) :raise ValueError: If cast_t...
[ "Casts", "a", "solution", "for", "the", "given", "expression", "to", "type", "cast_to", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L659-L688
train
Casts a solution for the given expression to type cast_to.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_upto
def eval_upto(self, e, n, cast_to=None, **kwargs): """ Evaluate an expression, using the solver if necessary. Returns primitives as specified by the `cast_to` parameter. Only certain primitives are supported, check the implementation of `_cast_to` to see which ones. :param e: the expres...
python
def eval_upto(self, e, n, cast_to=None, **kwargs): """ Evaluate an expression, using the solver if necessary. Returns primitives as specified by the `cast_to` parameter. Only certain primitives are supported, check the implementation of `_cast_to` to see which ones. :param e: the expres...
[ "def", "eval_upto", "(", "self", ",", "e", ",", "n", ",", "cast_to", "=", "None", ",", "*", "*", "kwargs", ")", ":", "concrete_val", "=", "_concrete_value", "(", "e", ")", "if", "concrete_val", "is", "not", "None", ":", "return", "[", "self", ".", ...
Evaluate an expression, using the solver if necessary. Returns primitives as specified by the `cast_to` parameter. Only certain primitives are supported, check the implementation of `_cast_to` to see which ones. :param e: the expression :param n: the number of desired solutions :param e...
[ "Evaluate", "an", "expression", "using", "the", "solver", "if", "necessary", ".", "Returns", "primitives", "as", "specified", "by", "the", "cast_to", "parameter", ".", "Only", "certain", "primitives", "are", "supported", "check", "the", "implementation", "of", "...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L690-L710
train
Evaluate an expression and return a list of possible values.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_one
def eval_one(self, e, **kwargs): """ Evaluate an expression to get the only possible solution. Errors if either no or more than one solution is returned. A kwarg parameter `default` can be specified to be returned instead of failure! :param e: the expression to get a solution for ...
python
def eval_one(self, e, **kwargs): """ Evaluate an expression to get the only possible solution. Errors if either no or more than one solution is returned. A kwarg parameter `default` can be specified to be returned instead of failure! :param e: the expression to get a solution for ...
[ "def", "eval_one", "(", "self", ",", "e", ",", "*", "*", "kwargs", ")", ":", "try", ":", "return", "self", ".", "eval_exact", "(", "e", ",", "1", ",", "*", "*", "{", "k", ":", "v", "for", "(", "k", ",", "v", ")", "in", "kwargs", ".", "items...
Evaluate an expression to get the only possible solution. Errors if either no or more than one solution is returned. A kwarg parameter `default` can be specified to be returned instead of failure! :param e: the expression to get a solution for :param default: A value can be passed as a kwarg he...
[ "Evaluate", "an", "expression", "to", "get", "the", "only", "possible", "solution", ".", "Errors", "if", "either", "no", "or", "more", "than", "one", "solution", "is", "returned", ".", "A", "kwarg", "parameter", "default", "can", "be", "specified", "to", "...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L726-L743
train
Evaluate an expression to get the only possible solution. Errors if either no or more than one solution is returned.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_atmost
def eval_atmost(self, e, n, **kwargs): """ Evaluate an expression to get at most `n` possible solutions. Errors if either none or more than `n` solutions are returned. :param e: the expression to get a solution for :param n: the inclusive upper limit on the number of solutions ...
python
def eval_atmost(self, e, n, **kwargs): """ Evaluate an expression to get at most `n` possible solutions. Errors if either none or more than `n` solutions are returned. :param e: the expression to get a solution for :param n: the inclusive upper limit on the number of solutions ...
[ "def", "eval_atmost", "(", "self", ",", "e", ",", "n", ",", "*", "*", "kwargs", ")", ":", "r", "=", "self", ".", "eval_upto", "(", "e", ",", "n", "+", "1", ",", "*", "*", "kwargs", ")", "if", "len", "(", "r", ")", ">", "n", ":", "raise", ...
Evaluate an expression to get at most `n` possible solutions. Errors if either none or more than `n` solutions are returned. :param e: the expression to get a solution for :param n: the inclusive upper limit on the number of solutions :param kwargs: Any additional kwargs will be passed ...
[ "Evaluate", "an", "expression", "to", "get", "at", "most", "n", "possible", "solutions", ".", "Errors", "if", "either", "none", "or", "more", "than", "n", "solutions", "are", "returned", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L745-L760
train
Evaluate an expression to get at most n possible solutions. Errors if either none or more than n solutions are returned.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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.unique
def unique(self, e, **kwargs): """ Returns True if the expression `e` has only one solution by querying the constraint solver. It does also add that unique solution to the solver's constraints. """ if not isinstance(e, claripy.ast.Base): return True #...
python
def unique(self, e, **kwargs): """ Returns True if the expression `e` has only one solution by querying the constraint solver. It does also add that unique solution to the solver's constraints. """ if not isinstance(e, claripy.ast.Base): return True #...
[ "def", "unique", "(", "self", ",", "e", ",", "*", "*", "kwargs", ")", ":", "if", "not", "isinstance", "(", "e", ",", "claripy", ".", "ast", ".", "Base", ")", ":", "return", "True", "# if we don't want to do symbolic checks, assume symbolic variables are multival...
Returns True if the expression `e` has only one solution by querying the constraint solver. It does also add that unique solution to the solver's constraints.
[ "Returns", "True", "if", "the", "expression", "e", "has", "only", "one", "solution", "by", "querying", "the", "constraint", "solver", ".", "It", "does", "also", "add", "that", "unique", "solution", "to", "the", "solver", "s", "constraints", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L804-L824
train
Returns True if the expression e has only one solution by querying the constraint solver. It does also add that unique solution to the constraints.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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.symbolic
def symbolic(self, e): # pylint:disable=R0201 """ Returns True if the expression `e` is symbolic. """ if type(e) in (int, bytes, float, bool): return False return e.symbolic
python
def symbolic(self, e): # pylint:disable=R0201 """ Returns True if the expression `e` is symbolic. """ if type(e) in (int, bytes, float, bool): return False return e.symbolic
[ "def", "symbolic", "(", "self", ",", "e", ")", ":", "# pylint:disable=R0201", "if", "type", "(", "e", ")", "in", "(", "int", ",", "bytes", ",", "float", ",", "bool", ")", ":", "return", "False", "return", "e", ".", "symbolic" ]
Returns True if the expression `e` is symbolic.
[ "Returns", "True", "if", "the", "expression", "e", "is", "symbolic", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L826-L832
train
Returns True if the expression e is 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/state_plugins/solver.py
SimSolver.single_valued
def single_valued(self, e): """ Returns True whether `e` is a concrete value or is a value set with only 1 possible value. This differs from `unique` in that this *does* not query the constraint solver. """ if self.state.mode == 'static': if type(e) in (int, b...
python
def single_valued(self, e): """ Returns True whether `e` is a concrete value or is a value set with only 1 possible value. This differs from `unique` in that this *does* not query the constraint solver. """ if self.state.mode == 'static': if type(e) in (int, b...
[ "def", "single_valued", "(", "self", ",", "e", ")", ":", "if", "self", ".", "state", ".", "mode", "==", "'static'", ":", "if", "type", "(", "e", ")", "in", "(", "int", ",", "bytes", ",", "float", ",", "bool", ")", ":", "return", "True", "else", ...
Returns True whether `e` is a concrete value or is a value set with only 1 possible value. This differs from `unique` in that this *does* not query the constraint solver.
[ "Returns", "True", "whether", "e", "is", "a", "concrete", "value", "or", "is", "a", "value", "set", "with", "only", "1", "possible", "value", ".", "This", "differs", "from", "unique", "in", "that", "this", "*", "does", "*", "not", "query", "the", "cons...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L834-L848
train
Returns True if e is a concrete value or is a value set with only 1 possible value.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/state_plugins/solver.py
SimSolver.simplify
def simplify(self, e=None): """ Simplifies `e`. If `e` is None, simplifies the constraints of this state. """ if e is None: return self._solver.simplify() elif isinstance(e, (int, float, bool)): return e elif isinstance(e, claripy.ast.Base)...
python
def simplify(self, e=None): """ Simplifies `e`. If `e` is None, simplifies the constraints of this state. """ if e is None: return self._solver.simplify() elif isinstance(e, (int, float, bool)): return e elif isinstance(e, claripy.ast.Base)...
[ "def", "simplify", "(", "self", ",", "e", "=", "None", ")", ":", "if", "e", "is", "None", ":", "return", "self", ".", "_solver", ".", "simplify", "(", ")", "elif", "isinstance", "(", "e", ",", "(", "int", ",", "float", ",", "bool", ")", ")", ":...
Simplifies `e`. If `e` is None, simplifies the constraints of this state.
[ "Simplifies", "e", ".", "If", "e", "is", "None", "simplifies", "the", "constraints", "of", "this", "state", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/solver.py#L850-L866
train
Simplifies the state of this object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/state_plugins/preconstrainer.py
SimStatePreconstrainer.preconstrain
def preconstrain(self, value, variable): """ Add a preconstraint that ``variable == value`` to the state. :param value: The concrete value. Can be a bitvector or a bytestring or an integer. :param variable: The BVS to preconstrain. """ if not isinstance(value, c...
python
def preconstrain(self, value, variable): """ Add a preconstraint that ``variable == value`` to the state. :param value: The concrete value. Can be a bitvector or a bytestring or an integer. :param variable: The BVS to preconstrain. """ if not isinstance(value, c...
[ "def", "preconstrain", "(", "self", ",", "value", ",", "variable", ")", ":", "if", "not", "isinstance", "(", "value", ",", "claripy", ".", "ast", ".", "Base", ")", ":", "value", "=", "self", ".", "state", ".", "solver", ".", "BVV", "(", "value", ",...
Add a preconstraint that ``variable == value`` to the state. :param value: The concrete value. Can be a bitvector or a bytestring or an integer. :param variable: The BVS to preconstrain.
[ "Add", "a", "preconstraint", "that", "variable", "==", "value", "to", "the", "state", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/preconstrainer.py#L46-L74
train
Add a preconstraint that variable == value 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/state_plugins/preconstrainer.py
SimStatePreconstrainer.preconstrain_file
def preconstrain_file(self, content, simfile, set_length=False): """ Preconstrain the contents of a file. :param content: The content to preconstrain the file to. Can be a bytestring or a list thereof. :param simfile: The actual simfile to preconstrain """ repair...
python
def preconstrain_file(self, content, simfile, set_length=False): """ Preconstrain the contents of a file. :param content: The content to preconstrain the file to. Can be a bytestring or a list thereof. :param simfile: The actual simfile to preconstrain """ repair...
[ "def", "preconstrain_file", "(", "self", ",", "content", ",", "simfile", ",", "set_length", "=", "False", ")", ":", "repair_entry_state_opts", "=", "False", "if", "o", ".", "TRACK_ACTION_HISTORY", "in", "self", ".", "state", ".", "options", ":", "repair_entry_...
Preconstrain the contents of a file. :param content: The content to preconstrain the file to. Can be a bytestring or a list thereof. :param simfile: The actual simfile to preconstrain
[ "Preconstrain", "the", "contents", "of", "a", "file", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/preconstrainer.py#L76-L108
train
Preconstrain the contents of a file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/preconstrainer.py
SimStatePreconstrainer.preconstrain_flag_page
def preconstrain_flag_page(self, magic_content): """ Preconstrain the data in the flag page. :param magic_content: The content of the magic page as a bytestring. """ for m, v in zip(magic_content, self.state.cgc.flag_bytes): self.preconstrain(m, v)
python
def preconstrain_flag_page(self, magic_content): """ Preconstrain the data in the flag page. :param magic_content: The content of the magic page as a bytestring. """ for m, v in zip(magic_content, self.state.cgc.flag_bytes): self.preconstrain(m, v)
[ "def", "preconstrain_flag_page", "(", "self", ",", "magic_content", ")", ":", "for", "m", ",", "v", "in", "zip", "(", "magic_content", ",", "self", ".", "state", ".", "cgc", ".", "flag_bytes", ")", ":", "self", ".", "preconstrain", "(", "m", ",", "v", ...
Preconstrain the data in the flag page. :param magic_content: The content of the magic page as a bytestring.
[ "Preconstrain", "the", "data", "in", "the", "flag", "page", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/preconstrainer.py#L110-L117
train
Preconstrain the data in the flag page.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/preconstrainer.py
SimStatePreconstrainer.remove_preconstraints
def remove_preconstraints(self, to_composite_solver=True, simplify=True): """ Remove the preconstraints from the state. If you are using the zen plugin, this will also use that to filter the constraints. :param to_composite_solver: Whether to convert the replacement solver to a com...
python
def remove_preconstraints(self, to_composite_solver=True, simplify=True): """ Remove the preconstraints from the state. If you are using the zen plugin, this will also use that to filter the constraints. :param to_composite_solver: Whether to convert the replacement solver to a com...
[ "def", "remove_preconstraints", "(", "self", ",", "to_composite_solver", "=", "True", ",", "simplify", "=", "True", ")", ":", "if", "not", "self", ".", "preconstraints", ":", "return", "# cache key set creation", "precon_cache_keys", "=", "set", "(", ")", "for",...
Remove the preconstraints from the state. If you are using the zen plugin, this will also use that to filter the constraints. :param to_composite_solver: Whether to convert the replacement solver to a composite solver. You probably want this if you're switch...
[ "Remove", "the", "preconstraints", "from", "the", "state", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/preconstrainer.py#L119-L158
train
Removes the preconstraints from 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/state_plugins/preconstrainer.py
SimStatePreconstrainer.reconstrain
def reconstrain(self): """ Split the solver. If any of the subsolvers time out after a short timeout (10 seconds), re-add the preconstraints associated with each of its variables. Hopefully these constraints still allow us to do meaningful things to the state. """ # test...
python
def reconstrain(self): """ Split the solver. If any of the subsolvers time out after a short timeout (10 seconds), re-add the preconstraints associated with each of its variables. Hopefully these constraints still allow us to do meaningful things to the state. """ # test...
[ "def", "reconstrain", "(", "self", ")", ":", "# test all solver splits", "subsolvers", "=", "self", ".", "state", ".", "solver", ".", "_solver", ".", "split", "(", ")", "for", "solver", "in", "subsolvers", ":", "solver", ".", "timeout", "=", "1000", "*", ...
Split the solver. If any of the subsolvers time out after a short timeout (10 seconds), re-add the preconstraints associated with each of its variables. Hopefully these constraints still allow us to do meaningful things to the state.
[ "Split", "the", "solver", ".", "If", "any", "of", "the", "subsolvers", "time", "out", "after", "a", "short", "timeout", "(", "10", "seconds", ")", "re", "-", "add", "the", "preconstraints", "associated", "with", "each", "of", "its", "variables", ".", "Ho...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/preconstrainer.py#L160-L177
train
Split the solver and re - add any preconstraints associated with each of the variables.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/knowledge_plugins/cfg/cfg_model.py
ReferenceManager.add_ref
def add_ref(self, ref): """ Add a reference to a memory data object. :param CodeReference ref: The reference. :return: None """ self.refs[ref.insn_addr].append(ref) self.data_addr_to_ref[ref.memory_data.addr].append(ref)
python
def add_ref(self, ref): """ Add a reference to a memory data object. :param CodeReference ref: The reference. :return: None """ self.refs[ref.insn_addr].append(ref) self.data_addr_to_ref[ref.memory_data.addr].append(ref)
[ "def", "add_ref", "(", "self", ",", "ref", ")", ":", "self", ".", "refs", "[", "ref", ".", "insn_addr", "]", ".", "append", "(", "ref", ")", "self", ".", "data_addr_to_ref", "[", "ref", ".", "memory_data", ".", "addr", "]", ".", "append", "(", "ref...
Add a reference to a memory data object. :param CodeReference ref: The reference. :return: None
[ "Add", "a", "reference", "to", "a", "memory", "data", "object", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/knowledge_plugins/cfg/cfg_model.py#L25-L34
train
Adds a reference to a memory data 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/knowledge_plugins/cfg/cfg_model.py
CFGModel.get_any_node
def get_any_node(self, addr, is_syscall=None, anyaddr=False, force_fastpath=False): """ Get an arbitrary CFGNode (without considering their contexts) from our graph. :param int addr: Address of the beginning of the basic block. Set anyaddr to True to support arbitrary ...
python
def get_any_node(self, addr, is_syscall=None, anyaddr=False, force_fastpath=False): """ Get an arbitrary CFGNode (without considering their contexts) from our graph. :param int addr: Address of the beginning of the basic block. Set anyaddr to True to support arbitrary ...
[ "def", "get_any_node", "(", "self", ",", "addr", ",", "is_syscall", "=", "None", ",", "anyaddr", "=", "False", ",", "force_fastpath", "=", "False", ")", ":", "# fastpath: directly look in the nodes list", "if", "not", "anyaddr", ":", "try", ":", "return", "sel...
Get an arbitrary CFGNode (without considering their contexts) from our graph. :param int addr: Address of the beginning of the basic block. Set anyaddr to True to support arbitrary address. :param bool is_syscall: Whether you want to get the syscall node or any ot...
[ "Get", "an", "arbitrary", "CFGNode", "(", "without", "considering", "their", "contexts", ")", "from", "our", "graph", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/knowledge_plugins/cfg/cfg_model.py#L213-L271
train
Get an arbitrary CFGNode from the segment tree.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/knowledge_plugins/cfg/cfg_model.py
CFGModel.get_all_nodes
def get_all_nodes(self, addr, is_syscall=None, anyaddr=False): """ Get all CFGNodes whose address is the specified one. :param addr: Address of the node :param is_syscall: True returns the syscall node, False returns the normal CFGNode, None returns both :return: ...
python
def get_all_nodes(self, addr, is_syscall=None, anyaddr=False): """ Get all CFGNodes whose address is the specified one. :param addr: Address of the node :param is_syscall: True returns the syscall node, False returns the normal CFGNode, None returns both :return: ...
[ "def", "get_all_nodes", "(", "self", ",", "addr", ",", "is_syscall", "=", "None", ",", "anyaddr", "=", "False", ")", ":", "results", "=", "[", "]", "for", "cfg_node", "in", "self", ".", "graph", ".", "nodes", "(", ")", ":", "if", "cfg_node", ".", "...
Get all CFGNodes whose address is the specified one. :param addr: Address of the node :param is_syscall: True returns the syscall node, False returns the normal CFGNode, None returns both :return: all CFGNodes
[ "Get", "all", "CFGNodes", "whose", "address", "is", "the", "specified", "one", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/knowledge_plugins/cfg/cfg_model.py#L273-L295
train
Get all CFGNodes whose address is the specified 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/knowledge_plugins/cfg/cfg_model.py
CFGModel.get_predecessors
def get_predecessors(self, cfgnode, excluding_fakeret=True, jumpkind=None): """ Get predecessors of a node in the control flow graph. :param CFGNode cfgnode: The node. :param bool excluding_fakeret: True if you want to exclude all predecessors that is connected to the n...
python
def get_predecessors(self, cfgnode, excluding_fakeret=True, jumpkind=None): """ Get predecessors of a node in the control flow graph. :param CFGNode cfgnode: The node. :param bool excluding_fakeret: True if you want to exclude all predecessors that is connected to the n...
[ "def", "get_predecessors", "(", "self", ",", "cfgnode", ",", "excluding_fakeret", "=", "True", ",", "jumpkind", "=", "None", ")", ":", "if", "excluding_fakeret", "and", "jumpkind", "==", "'Ijk_FakeRet'", ":", "return", "[", "]", "if", "not", "excluding_fakeret...
Get predecessors of a node in the control flow graph. :param CFGNode cfgnode: The node. :param bool excluding_fakeret: True if you want to exclude all predecessors that is connected to the node with a fakeret edge. :param str or None ...
[ "Get", "predecessors", "of", "a", "node", "in", "the", "control", "flow", "graph", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/knowledge_plugins/cfg/cfg_model.py#L307-L340
train
Returns a list of predecessors of a CFGNode.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/knowledge_plugins/cfg/cfg_model.py
CFGModel.get_successors
def get_successors(self, node, excluding_fakeret=True, jumpkind=None): """ Get successors of a node in the control flow graph. :param CFGNode node: The node. :param bool excluding_fakeret: True if you want to exclude all successors that is connected to the node ...
python
def get_successors(self, node, excluding_fakeret=True, jumpkind=None): """ Get successors of a node in the control flow graph. :param CFGNode node: The node. :param bool excluding_fakeret: True if you want to exclude all successors that is connected to the node ...
[ "def", "get_successors", "(", "self", ",", "node", ",", "excluding_fakeret", "=", "True", ",", "jumpkind", "=", "None", ")", ":", "if", "jumpkind", "is", "not", "None", ":", "if", "excluding_fakeret", "and", "jumpkind", "==", "'Ijk_FakeRet'", ":", "return", ...
Get successors of a node in the control flow graph. :param CFGNode node: The node. :param bool excluding_fakeret: True if you want to exclude all successors that is connected to the node with a fakeret edge. :param str or None jump...
[ "Get", "successors", "of", "a", "node", "in", "the", "control", "flow", "graph", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/knowledge_plugins/cfg/cfg_model.py#L342-L376
train
Get successors of a node in the control flow graph.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/knowledge_plugins/cfg/cfg_model.py
CFGModel.get_successors_and_jumpkind
def get_successors_and_jumpkind(self, node, excluding_fakeret=True): """ Get a list of tuples where the first element is the successor of the CFG node and the second element is the jumpkind of the successor. :param CFGNode node: The node. :param bool excluding_fakeret...
python
def get_successors_and_jumpkind(self, node, excluding_fakeret=True): """ Get a list of tuples where the first element is the successor of the CFG node and the second element is the jumpkind of the successor. :param CFGNode node: The node. :param bool excluding_fakeret...
[ "def", "get_successors_and_jumpkind", "(", "self", ",", "node", ",", "excluding_fakeret", "=", "True", ")", ":", "successors", "=", "[", "]", "for", "_", ",", "suc", ",", "data", "in", "self", ".", "graph", ".", "out_edges", "(", "[", "node", "]", ",",...
Get a list of tuples where the first element is the successor of the CFG node and the second element is the jumpkind of the successor. :param CFGNode node: The node. :param bool excluding_fakeret: True if you want to exclude all successors that are fall-through successors. :...
[ "Get", "a", "list", "of", "tuples", "where", "the", "first", "element", "is", "the", "successor", "of", "the", "CFG", "node", "and", "the", "second", "element", "is", "the", "jumpkind", "of", "the", "successor", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/knowledge_plugins/cfg/cfg_model.py#L378-L393
train
Get a list of tuples where the first element is the successor of the node and the second element is the jumpkind of the successor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/knowledge_plugins/cfg/cfg_model.py
CFGModel.get_all_predecessors
def get_all_predecessors(self, cfgnode): """ Get all predecessors of a specific node on the control flow graph. :param CFGNode cfgnode: The CFGNode object :return: A list of predecessors in the CFG :rtype: list """ s = set() for child, parent in networkx....
python
def get_all_predecessors(self, cfgnode): """ Get all predecessors of a specific node on the control flow graph. :param CFGNode cfgnode: The CFGNode object :return: A list of predecessors in the CFG :rtype: list """ s = set() for child, parent in networkx....
[ "def", "get_all_predecessors", "(", "self", ",", "cfgnode", ")", ":", "s", "=", "set", "(", ")", "for", "child", ",", "parent", "in", "networkx", ".", "dfs_predecessors", "(", "self", ".", "graph", ",", "cfgnode", ")", ".", "items", "(", ")", ":", "s...
Get all predecessors of a specific node on the control flow graph. :param CFGNode cfgnode: The CFGNode object :return: A list of predecessors in the CFG :rtype: list
[ "Get", "all", "predecessors", "of", "a", "specific", "node", "on", "the", "control", "flow", "graph", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/knowledge_plugins/cfg/cfg_model.py#L395-L407
train
Get all predecessors of a specific node on the control flow graph.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/knowledge_plugins/cfg/cfg_model.py
CFGModel.get_branching_nodes
def get_branching_nodes(self): """ Returns all nodes that has an out degree >= 2 """ nodes = set() for n in self.graph.nodes(): if self.graph.out_degree(n) >= 2: nodes.add(n) return nodes
python
def get_branching_nodes(self): """ Returns all nodes that has an out degree >= 2 """ nodes = set() for n in self.graph.nodes(): if self.graph.out_degree(n) >= 2: nodes.add(n) return nodes
[ "def", "get_branching_nodes", "(", "self", ")", ":", "nodes", "=", "set", "(", ")", "for", "n", "in", "self", ".", "graph", ".", "nodes", "(", ")", ":", "if", "self", ".", "graph", ".", "out_degree", "(", "n", ")", ">=", "2", ":", "nodes", ".", ...
Returns all nodes that has an out degree >= 2
[ "Returns", "all", "nodes", "that", "has", "an", "out", "degree", ">", "=", "2" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/knowledge_plugins/cfg/cfg_model.py#L416-L424
train
Returns all nodes that have an out degree > = 2
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/knowledge_plugins/cfg/cfg_model.py
CFGModel.get_exit_stmt_idx
def get_exit_stmt_idx(self, src_block, dst_block): """ Get the corresponding exit statement ID for control flow to reach destination block from source block. The exit statement ID was put on the edge when creating the CFG. Note that there must be a direct edge between the two blocks, oth...
python
def get_exit_stmt_idx(self, src_block, dst_block): """ Get the corresponding exit statement ID for control flow to reach destination block from source block. The exit statement ID was put on the edge when creating the CFG. Note that there must be a direct edge between the two blocks, oth...
[ "def", "get_exit_stmt_idx", "(", "self", ",", "src_block", ",", "dst_block", ")", ":", "if", "not", "self", ".", "graph", ".", "has_edge", "(", "src_block", ",", "dst_block", ")", ":", "raise", "AngrCFGError", "(", "'Edge (%s, %s) does not exist in CFG'", "%", ...
Get the corresponding exit statement ID for control flow to reach destination block from source block. The exit statement ID was put on the edge when creating the CFG. Note that there must be a direct edge between the two blocks, otherwise an exception will be raised. :return: The exit statemen...
[ "Get", "the", "corresponding", "exit", "statement", "ID", "for", "control", "flow", "to", "reach", "destination", "block", "from", "source", "block", ".", "The", "exit", "statement", "ID", "was", "put", "on", "the", "edge", "when", "creating", "the", "CFG", ...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/knowledge_plugins/cfg/cfg_model.py#L426-L438
train
Get the exit statement ID for control flow to reach source block from destination 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/engines/soot/engine.py
SimEngineSoot.prepare_native_return_state
def prepare_native_return_state(native_state): """ Hook target for native function call returns. Recovers and stores the return value from native memory and toggles the state, s.t. execution continues in the Soot engine. """ javavm_simos = native_state.project.simos ...
python
def prepare_native_return_state(native_state): """ Hook target for native function call returns. Recovers and stores the return value from native memory and toggles the state, s.t. execution continues in the Soot engine. """ javavm_simos = native_state.project.simos ...
[ "def", "prepare_native_return_state", "(", "native_state", ")", ":", "javavm_simos", "=", "native_state", ".", "project", ".", "simos", "ret_state", "=", "native_state", ".", "copy", "(", ")", "# set successor flags", "ret_state", ".", "regs", ".", "_ip", "=", "...
Hook target for native function call returns. Recovers and stores the return value from native memory and toggles the state, s.t. execution continues in the Soot engine.
[ "Hook", "target", "for", "native", "function", "call", "returns", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/soot/engine.py#L334-L378
train
Prepare the state for a native function call returns.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/storage/file.py
SimFile.concretize
def concretize(self, **kwargs): """ Return a concretization of the contents of the file, as a flat bytestring. """ size = self.state.solver.min(self._size, **kwargs) data = self.load(0, size) kwargs['cast_to'] = kwargs.get('cast_to', bytes) kwargs['extra_constrai...
python
def concretize(self, **kwargs): """ Return a concretization of the contents of the file, as a flat bytestring. """ size = self.state.solver.min(self._size, **kwargs) data = self.load(0, size) kwargs['cast_to'] = kwargs.get('cast_to', bytes) kwargs['extra_constrai...
[ "def", "concretize", "(", "self", ",", "*", "*", "kwargs", ")", ":", "size", "=", "self", ".", "state", ".", "solver", ".", "min", "(", "self", ".", "_size", ",", "*", "*", "kwargs", ")", "data", "=", "self", ".", "load", "(", "0", ",", "size",...
Return a concretization of the contents of the file, as a flat bytestring.
[ "Return", "a", "concretization", "of", "the", "contents", "of", "the", "file", "as", "a", "flat", "bytestring", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/file.py#L215-L224
train
Return a concretization of the contents of the file as a flat bytestring.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/storage/file.py
SimPackets.concretize
def concretize(self, **kwargs): """ Returns a list of the packets read or written as bytestrings. """ lengths = [self.state.solver.eval(x[1], **kwargs) for x in self.content] kwargs['cast_to'] = bytes return [b'' if i == 0 else self.state.solver.eval(x[0][i*self.state.arc...
python
def concretize(self, **kwargs): """ Returns a list of the packets read or written as bytestrings. """ lengths = [self.state.solver.eval(x[1], **kwargs) for x in self.content] kwargs['cast_to'] = bytes return [b'' if i == 0 else self.state.solver.eval(x[0][i*self.state.arc...
[ "def", "concretize", "(", "self", ",", "*", "*", "kwargs", ")", ":", "lengths", "=", "[", "self", ".", "state", ".", "solver", ".", "eval", "(", "x", "[", "1", "]", ",", "*", "*", "kwargs", ")", "for", "x", "in", "self", ".", "content", "]", ...
Returns a list of the packets read or written as bytestrings.
[ "Returns", "a", "list", "of", "the", "packets", "read", "or", "written", "as", "bytestrings", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/file.py#L405-L411
train
Returns a list of the packets read or written as bytestrings.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/storage/file.py
SimPackets.read
def read(self, pos, size, **kwargs): """ Read a packet from the stream. :param int pos: The packet number to read from the sequence of the stream. May be None to append to the stream. :param size: The size to read. May be symbolic. :param short_reads: Whether to repla...
python
def read(self, pos, size, **kwargs): """ Read a packet from the stream. :param int pos: The packet number to read from the sequence of the stream. May be None to append to the stream. :param size: The size to read. May be symbolic. :param short_reads: Whether to repla...
[ "def", "read", "(", "self", ",", "pos", ",", "size", ",", "*", "*", "kwargs", ")", ":", "short_reads", "=", "kwargs", ".", "pop", "(", "'short_reads'", ",", "None", ")", "# sanity check on read/write modes", "if", "self", ".", "write_mode", "is", "None", ...
Read a packet from the stream. :param int pos: The packet number to read from the sequence of the stream. May be None to append to the stream. :param size: The size to read. May be symbolic. :param short_reads: Whether to replace the size with a symbolic value constrained to less tha...
[ "Read", "a", "packet", "from", "the", "stream", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/file.py#L413-L477
train
Read a single entry from the stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/storage/file.py
SimPackets.write
def write(self, pos, data, size=None, events=True, **kwargs): """ Write a packet to the stream. :param int pos: The packet number to write in the sequence of the stream. May be None to append to the stream. :param data: The data to write, as a string or bitvector. :pa...
python
def write(self, pos, data, size=None, events=True, **kwargs): """ Write a packet to the stream. :param int pos: The packet number to write in the sequence of the stream. May be None to append to the stream. :param data: The data to write, as a string or bitvector. :pa...
[ "def", "write", "(", "self", ",", "pos", ",", "data", ",", "size", "=", "None", ",", "events", "=", "True", ",", "*", "*", "kwargs", ")", ":", "if", "events", ":", "self", ".", "state", ".", "history", ".", "add_event", "(", "'fs_write'", ",", "f...
Write a packet to the stream. :param int pos: The packet number to write in the sequence of the stream. May be None to append to the stream. :param data: The data to write, as a string or bitvector. :param size: The optional size to write. May be symbolic; must be constrained ...
[ "Write", "a", "packet", "to", "the", "stream", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/file.py#L479-L521
train
Writes a packet to the stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/storage/file.py
SimFileDescriptorBase.read
def read(self, pos, size, **kwargs): """ Reads some data from the file, storing it into memory. :param pos: The address to write the read data into memory :param size: The requested length of the read :return: The real length of the read """ data, r...
python
def read(self, pos, size, **kwargs): """ Reads some data from the file, storing it into memory. :param pos: The address to write the read data into memory :param size: The requested length of the read :return: The real length of the read """ data, r...
[ "def", "read", "(", "self", ",", "pos", ",", "size", ",", "*", "*", "kwargs", ")", ":", "data", ",", "realsize", "=", "self", ".", "read_data", "(", "size", ",", "*", "*", "kwargs", ")", "if", "not", "self", ".", "state", ".", "solver", ".", "i...
Reads some data from the file, storing it into memory. :param pos: The address to write the read data into memory :param size: The requested length of the read :return: The real length of the read
[ "Reads", "some", "data", "from", "the", "file", "storing", "it", "into", "memory", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/file.py#L605-L616
train
Reads some data from the file and stores it into 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/storage/file.py
SimFileDescriptorBase.write
def write(self, pos, size, **kwargs): """ Writes some data, loaded from the state, into the file. :param pos: The address to read the data to write from in memory :param size: The requested size of the write :return: The real length of the write """ ...
python
def write(self, pos, size, **kwargs): """ Writes some data, loaded from the state, into the file. :param pos: The address to read the data to write from in memory :param size: The requested size of the write :return: The real length of the write """ ...
[ "def", "write", "(", "self", ",", "pos", ",", "size", ",", "*", "*", "kwargs", ")", ":", "if", "type", "(", "pos", ")", "is", "str", ":", "raise", "TypeError", "(", "\"SimFileDescriptor.write takes an address and size. Did you mean write_data?\"", ")", "# Find a...
Writes some data, loaded from the state, into the file. :param pos: The address to read the data to write from in memory :param size: The requested size of the write :return: The real length of the write
[ "Writes", "some", "data", "loaded", "from", "the", "state", "into", "the", "file", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/file.py#L618-L645
train
Writes some data from the state memory into the file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/storage/file.py
SimFileDescriptorDuplex.concretize
def concretize(self, **kwargs): """ Return a concretization of the underlying files, as a tuple of (read file, write file). """ return (self._read_file.concretize(**kwargs), self._write_file.concretize(**kwargs))
python
def concretize(self, **kwargs): """ Return a concretization of the underlying files, as a tuple of (read file, write file). """ return (self._read_file.concretize(**kwargs), self._write_file.concretize(**kwargs))
[ "def", "concretize", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "(", "self", ".", "_read_file", ".", "concretize", "(", "*", "*", "kwargs", ")", ",", "self", ".", "_write_file", ".", "concretize", "(", "*", "*", "kwargs", ")", ")" ]
Return a concretization of the underlying files, as a tuple of (read file, write file).
[ "Return", "a", "concretization", "of", "the", "underlying", "files", "as", "a", "tuple", "of", "(", "read", "file", "write", "file", ")", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/file.py#L933-L937
train
Return a concretization of the underlying files as a tuple of read file and write file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/cgc.py
SimStateCGC.get_max_sinkhole
def get_max_sinkhole(self, length): """ Find a sinkhole which is large enough to support `length` bytes. This uses first-fit. The first sinkhole (ordered in descending order by their address) which can hold `length` bytes is chosen. If there are more than `length` bytes in the s...
python
def get_max_sinkhole(self, length): """ Find a sinkhole which is large enough to support `length` bytes. This uses first-fit. The first sinkhole (ordered in descending order by their address) which can hold `length` bytes is chosen. If there are more than `length` bytes in the s...
[ "def", "get_max_sinkhole", "(", "self", ",", "length", ")", ":", "ordered_sinks", "=", "sorted", "(", "list", "(", "self", ".", "sinkholes", ")", ",", "key", "=", "operator", ".", "itemgetter", "(", "0", ")", ",", "reverse", "=", "True", ")", "max_pair...
Find a sinkhole which is large enough to support `length` bytes. This uses first-fit. The first sinkhole (ordered in descending order by their address) which can hold `length` bytes is chosen. If there are more than `length` bytes in the sinkhole, a new sinkhole is created representing the rema...
[ "Find", "a", "sinkhole", "which", "is", "large", "enough", "to", "support", "length", "bytes", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/cgc.py#L101-L130
train
Find a sinkhole which can hold length bytes.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/plugin.py
SimStatePlugin.memo
def memo(f): """ A decorator function you should apply to ``copy`` """ def inner(self, memo=None, **kwargs): if memo is None: memo = {} if id(self) in memo: return memo[id(self)] else: c = f(self, memo, *...
python
def memo(f): """ A decorator function you should apply to ``copy`` """ def inner(self, memo=None, **kwargs): if memo is None: memo = {} if id(self) in memo: return memo[id(self)] else: c = f(self, memo, *...
[ "def", "memo", "(", "f", ")", ":", "def", "inner", "(", "self", ",", "memo", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "memo", "is", "None", ":", "memo", "=", "{", "}", "if", "id", "(", "self", ")", "in", "memo", ":", "return", ...
A decorator function you should apply to ``copy``
[ "A", "decorator", "function", "you", "should", "apply", "to", "copy" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/plugin.py#L48-L61
train
A decorator to memoize the result of a 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/vfg.py
VFGNode.append_state
def append_state(self, s, is_widened_state=False): """ Appended a new state to this VFGNode. :param s: The new state to append :param is_widened_state: Whether it is a widened state or not. """ if not is_widened_state: self.all_states.append(s) se...
python
def append_state(self, s, is_widened_state=False): """ Appended a new state to this VFGNode. :param s: The new state to append :param is_widened_state: Whether it is a widened state or not. """ if not is_widened_state: self.all_states.append(s) se...
[ "def", "append_state", "(", "self", ",", "s", ",", "is_widened_state", "=", "False", ")", ":", "if", "not", "is_widened_state", ":", "self", ".", "all_states", ".", "append", "(", "s", ")", "self", ".", "state", "=", "s", "else", ":", "self", ".", "w...
Appended a new state to this VFGNode. :param s: The new state to append :param is_widened_state: Whether it is a widened state or not.
[ "Appended", "a", "new", "state", "to", "this", "VFGNode", ".", ":", "param", "s", ":", "The", "new", "state", "to", "append", ":", "param", "is_widened_state", ":", "Whether", "it", "is", "a", "widened", "state", "or", "not", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L222-L234
train
Appends a new state to this VFGNode.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vfg.py
VFG._top_function_analysis_task
def _top_function_analysis_task(self): """ Get the first FunctionAnalysis task in the stack. :return: The top function analysis task in the stack, or None if there isn't any. :rtype: FunctionAnalysis """ for r in reversed(self._task_stack): if isinstance(r, ...
python
def _top_function_analysis_task(self): """ Get the first FunctionAnalysis task in the stack. :return: The top function analysis task in the stack, or None if there isn't any. :rtype: FunctionAnalysis """ for r in reversed(self._task_stack): if isinstance(r, ...
[ "def", "_top_function_analysis_task", "(", "self", ")", ":", "for", "r", "in", "reversed", "(", "self", ".", "_task_stack", ")", ":", "if", "isinstance", "(", "r", ",", "FunctionAnalysis", ")", ":", "return", "r", "return", "None" ]
Get the first FunctionAnalysis task in the stack. :return: The top function analysis task in the stack, or None if there isn't any. :rtype: FunctionAnalysis
[ "Get", "the", "first", "FunctionAnalysis", "task", "in", "the", "stack", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L384-L395
train
Return the first FunctionAnalysis task in the stack or None if there isn t any.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vfg.py
VFG.get_any_node
def get_any_node(self, addr): """ Get any VFG node corresponding to the basic block at @addr. Note that depending on the context sensitivity level, there might be multiple nodes corresponding to different contexts. This function will return the first one it encounters, which migh...
python
def get_any_node(self, addr): """ Get any VFG node corresponding to the basic block at @addr. Note that depending on the context sensitivity level, there might be multiple nodes corresponding to different contexts. This function will return the first one it encounters, which migh...
[ "def", "get_any_node", "(", "self", ",", "addr", ")", ":", "for", "n", "in", "self", ".", "graph", ".", "nodes", "(", ")", ":", "if", "n", ".", "addr", "==", "addr", ":", "return", "n" ]
Get any VFG node corresponding to the basic block at @addr. Note that depending on the context sensitivity level, there might be multiple nodes corresponding to different contexts. This function will return the first one it encounters, which might not be what you want.
[ "Get", "any", "VFG", "node", "corresponding", "to", "the", "basic", "block", "at" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L409-L418
train
Get any VFG node corresponding to the basic block at 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/vfg.py
VFG._pre_analysis
def _pre_analysis(self): """ Executed before analysis starts. Necessary initializations are performed here. :return: None """ l.debug("Starting from %#x", self._start) # initialize the task stack self._task_stack = [ ] # initialize the execution counte...
python
def _pre_analysis(self): """ Executed before analysis starts. Necessary initializations are performed here. :return: None """ l.debug("Starting from %#x", self._start) # initialize the task stack self._task_stack = [ ] # initialize the execution counte...
[ "def", "_pre_analysis", "(", "self", ")", ":", "l", ".", "debug", "(", "\"Starting from %#x\"", ",", "self", ".", "_start", ")", "# initialize the task stack", "self", ".", "_task_stack", "=", "[", "]", "# initialize the execution counter dict", "self", ".", "_exe...
Executed before analysis starts. Necessary initializations are performed here. :return: None
[ "Executed", "before", "analysis", "starts", ".", "Necessary", "initializations", "are", "performed", "here", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L446-L511
train
Called before the analysis starts.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vfg.py
VFG._job_sorting_key
def _job_sorting_key(self, job): """ Get the sorting key of a VFGJob instance. :param VFGJob job: the VFGJob object. :return: An integer that determines the order of this job in the queue. :rtype: int """ MAX_BLOCKS_PER_FUNCTION = 1000000 task_functions...
python
def _job_sorting_key(self, job): """ Get the sorting key of a VFGJob instance. :param VFGJob job: the VFGJob object. :return: An integer that determines the order of this job in the queue. :rtype: int """ MAX_BLOCKS_PER_FUNCTION = 1000000 task_functions...
[ "def", "_job_sorting_key", "(", "self", ",", "job", ")", ":", "MAX_BLOCKS_PER_FUNCTION", "=", "1000000", "task_functions", "=", "list", "(", "reversed", "(", "list", "(", "task", ".", "function_address", "for", "task", "in", "self", ".", "_task_stack", "if", ...
Get the sorting key of a VFGJob instance. :param VFGJob job: the VFGJob object. :return: An integer that determines the order of this job in the queue. :rtype: int
[ "Get", "the", "sorting", "key", "of", "a", "VFGJob", "instance", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L513-L542
train
Get the sorting key of a VFGJob instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/vfg.py
VFG._pre_job_handling
def _pre_job_handling(self, job): """ Some code executed before actually processing the job. :param VFGJob job: the VFGJob object. :return: None """ # did we reach the final address? if self._final_address is not None and job.addr == self._final_address: ...
python
def _pre_job_handling(self, job): """ Some code executed before actually processing the job. :param VFGJob job: the VFGJob object. :return: None """ # did we reach the final address? if self._final_address is not None and job.addr == self._final_address: ...
[ "def", "_pre_job_handling", "(", "self", ",", "job", ")", ":", "# did we reach the final address?", "if", "self", ".", "_final_address", "is", "not", "None", "and", "job", ".", "addr", "==", "self", ".", "_final_address", ":", "# our analysis should be termianted he...
Some code executed before actually processing the job. :param VFGJob job: the VFGJob object. :return: None
[ "Some", "code", "executed", "before", "actually", "processing", "the", "job", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L557-L671
train
This function is called before actually processing the job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/vfg.py
VFG._handle_successor
def _handle_successor(self, job, successor, all_successors): """ Process each successor generated by the job, and return a new list of succeeding jobs. :param VFGJob job: The VFGJob instance. :param SimState successor: The succeeding state. :param list all_successors: A list of...
python
def _handle_successor(self, job, successor, all_successors): """ Process each successor generated by the job, and return a new list of succeeding jobs. :param VFGJob job: The VFGJob instance. :param SimState successor: The succeeding state. :param list all_successors: A list of...
[ "def", "_handle_successor", "(", "self", ",", "job", ",", "successor", ",", "all_successors", ")", ":", "# Initialize parameters", "addr", "=", "job", ".", "addr", "jumpkind", "=", "successor", ".", "history", ".", "jumpkind", "#", "# Get instruction pointer", "...
Process each successor generated by the job, and return a new list of succeeding jobs. :param VFGJob job: The VFGJob instance. :param SimState successor: The succeeding state. :param list all_successors: A list of all successors. :return: A list of newly created jobs from the successor...
[ "Process", "each", "successor", "generated", "by", "the", "job", "and", "return", "a", "new", "list", "of", "succeeding", "jobs", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L729-L864
train
Process each successor generated by the job and return a list of new jobs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vfg.py
VFG._handle_successor_multitargets
def _handle_successor_multitargets(self, job, successor, all_successors): """ Generate new jobs for all possible successor targets when there are more than one possible concrete value for successor.ip :param VFGJob job: The VFGJob instance. :param SimState successor: The succeed...
python
def _handle_successor_multitargets(self, job, successor, all_successors): """ Generate new jobs for all possible successor targets when there are more than one possible concrete value for successor.ip :param VFGJob job: The VFGJob instance. :param SimState successor: The succeed...
[ "def", "_handle_successor_multitargets", "(", "self", ",", "job", ",", "successor", ",", "all_successors", ")", ":", "new_jobs", "=", "[", "]", "# Currently we assume a legit jumping target cannot have more than 256 concrete values", "# TODO: make it a setting on VFG", "MAX_NUMBE...
Generate new jobs for all possible successor targets when there are more than one possible concrete value for successor.ip :param VFGJob job: The VFGJob instance. :param SimState successor: The succeeding state. :param list all_successors: All succeeding states from the same VFGJob. ...
[ "Generate", "new", "jobs", "for", "all", "possible", "successor", "targets", "when", "there", "are", "more", "than", "one", "possible", "concrete", "value", "for", "successor", ".", "ip" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L866-L912
train
This function generates new jobs for all possible successor targets when there are more than one possible concrete value for the successor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vfg.py
VFG._merge_states
def _merge_states(self, old_state, new_state): """ Merge two given states, and return a new one. :param old_state: :param new_state: :returns: The merged state, and whether a merging has occurred """ # print old_state.dbg_print_stack() # print new_state....
python
def _merge_states(self, old_state, new_state): """ Merge two given states, and return a new one. :param old_state: :param new_state: :returns: The merged state, and whether a merging has occurred """ # print old_state.dbg_print_stack() # print new_state....
[ "def", "_merge_states", "(", "self", ",", "old_state", ",", "new_state", ")", ":", "# print old_state.dbg_print_stack()", "# print new_state.dbg_print_stack()", "merged_state", ",", "_", ",", "merging_occurred", "=", "old_state", ".", "merge", "(", "new_state", ",", "...
Merge two given states, and return a new one. :param old_state: :param new_state: :returns: The merged state, and whether a merging has occurred
[ "Merge", "two", "given", "states", "and", "return", "a", "new", "one", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1088-L1105
train
Merge two given states and return a new one.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/vfg.py
VFG._widen_states
def _widen_states(old_state, new_state): """ Perform widen operation on the given states, and return a new one. :param old_state: :param new_state: :returns: The widened state, and whether widening has occurred """ # print old_state.dbg_print_stack() # p...
python
def _widen_states(old_state, new_state): """ Perform widen operation on the given states, and return a new one. :param old_state: :param new_state: :returns: The widened state, and whether widening has occurred """ # print old_state.dbg_print_stack() # p...
[ "def", "_widen_states", "(", "old_state", ",", "new_state", ")", ":", "# print old_state.dbg_print_stack()", "# print new_state.dbg_print_stack()", "l", ".", "debug", "(", "'Widening state at IP %s'", ",", "old_state", ".", "ip", ")", "widened_state", ",", "widening_occur...
Perform widen operation on the given states, and return a new one. :param old_state: :param new_state: :returns: The widened state, and whether widening has occurred
[ "Perform", "widen", "operation", "on", "the", "given", "states", "and", "return", "a", "new", "one", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1108-L1127
train
Perform widen operation on the given states and return a new 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/vfg.py
VFG._narrow_states
def _narrow_states(node, old_state, new_state, previously_widened_state): # pylint:disable=unused-argument,no-self-use """ Try to narrow the state! :param old_state: :param new_state: :param previously_widened_state: :returns: The narrowed state, and whether a narrowing...
python
def _narrow_states(node, old_state, new_state, previously_widened_state): # pylint:disable=unused-argument,no-self-use """ Try to narrow the state! :param old_state: :param new_state: :param previously_widened_state: :returns: The narrowed state, and whether a narrowing...
[ "def", "_narrow_states", "(", "node", ",", "old_state", ",", "new_state", ",", "previously_widened_state", ")", ":", "# pylint:disable=unused-argument,no-self-use", "l", ".", "debug", "(", "'Narrowing state at IP %s'", ",", "previously_widened_state", ".", "ip", ")", "s...
Try to narrow the state! :param old_state: :param new_state: :param previously_widened_state: :returns: The narrowed state, and whether a narrowing has occurred
[ "Try", "to", "narrow", "the", "state!" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1130-L1148
train
Narrow the state of a node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/vfg.py
VFG._prepare_initial_state
def _prepare_initial_state(self, function_start, state): """ Get the state to start the analysis for function. :param int function_start: Address of the function :param SimState state: The program state to base on. """ if state is None: state = self.project....
python
def _prepare_initial_state(self, function_start, state): """ Get the state to start the analysis for function. :param int function_start: Address of the function :param SimState state: The program state to base on. """ if state is None: state = self.project....
[ "def", "_prepare_initial_state", "(", "self", ",", "function_start", ",", "state", ")", ":", "if", "state", "is", "None", ":", "state", "=", "self", ".", "project", ".", "factory", ".", "blank_state", "(", "mode", "=", "\"static\"", ",", "remove_options", ...
Get the state to start the analysis for function. :param int function_start: Address of the function :param SimState state: The program state to base on.
[ "Get", "the", "state", "to", "start", "the", "analysis", "for", "function", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1154-L1185
train
Prepare the initial state for the analysis of 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/vfg.py
VFG._set_return_address
def _set_return_address(self, state, ret_addr): """ Set the return address of the current state to a specific address. We assume we are at the beginning of a function, or in other words, we are about to execute the very first instruction of the function. :param SimState state: The progr...
python
def _set_return_address(self, state, ret_addr): """ Set the return address of the current state to a specific address. We assume we are at the beginning of a function, or in other words, we are about to execute the very first instruction of the function. :param SimState state: The progr...
[ "def", "_set_return_address", "(", "self", ",", "state", ",", "ret_addr", ")", ":", "# TODO: the following code is totally untested other than X86 and AMD64. Don't freak out if you find bugs :)", "# TODO: Test it", "ret_bvv", "=", "state", ".", "solver", ".", "BVV", "(", "ret...
Set the return address of the current state to a specific address. We assume we are at the beginning of a function, or in other words, we are about to execute the very first instruction of the function. :param SimState state: The program state :param int ret_addr: The return address :re...
[ "Set", "the", "return", "address", "of", "the", "current", "state", "to", "a", "specific", "address", ".", "We", "assume", "we", "are", "at", "the", "beginning", "of", "a", "function", "or", "in", "other", "words", "we", "are", "about", "to", "execute", ...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1187-L1213
train
Set the return address of the current state to 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/vfg.py
VFG._create_graph
def _create_graph(self, return_target_sources=None): """ Create a DiGraph out of the existing edge map. :param return_target_sources: Used for making up those missing returns :returns: A networkx.DiGraph() object """ if return_target_sources is None: # We set ...
python
def _create_graph(self, return_target_sources=None): """ Create a DiGraph out of the existing edge map. :param return_target_sources: Used for making up those missing returns :returns: A networkx.DiGraph() object """ if return_target_sources is None: # We set ...
[ "def", "_create_graph", "(", "self", ",", "return_target_sources", "=", "None", ")", ":", "if", "return_target_sources", "is", "None", ":", "# We set it to a defaultdict in order to be consistent with the", "# actual parameter.", "return_target_sources", "=", "defaultdict", "...
Create a DiGraph out of the existing edge map. :param return_target_sources: Used for making up those missing returns :returns: A networkx.DiGraph() object
[ "Create", "a", "DiGraph", "out", "of", "the", "existing", "edge", "map", ".", ":", "param", "return_target_sources", ":", "Used", "for", "making", "up", "those", "missing", "returns", ":", "returns", ":", "A", "networkx", ".", "DiGraph", "()", "object" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1215-L1259
train
Create a DiGraph out of the existing edge 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/vfg.py
VFG._graph_get_node
def _graph_get_node(self, block_id, terminator_for_nonexistent_node=False): """ Get an existing VFGNode instance from the graph. :param BlockID block_id: The block ID for the node to get. :param bool terminator_for_nonexistent_node: True if a Terminator (which is a S...
python
def _graph_get_node(self, block_id, terminator_for_nonexistent_node=False): """ Get an existing VFGNode instance from the graph. :param BlockID block_id: The block ID for the node to get. :param bool terminator_for_nonexistent_node: True if a Terminator (which is a S...
[ "def", "_graph_get_node", "(", "self", ",", "block_id", ",", "terminator_for_nonexistent_node", "=", "False", ")", ":", "if", "block_id", "not", "in", "self", ".", "_nodes", ":", "l", ".", "error", "(", "\"Trying to look up a node that we don't have yet. Is this okay?...
Get an existing VFGNode instance from the graph. :param BlockID block_id: The block ID for the node to get. :param bool terminator_for_nonexistent_node: True if a Terminator (which is a SimProcedure stub) should be created when th...
[ "Get", "an", "existing", "VFGNode", "instance", "from", "the", "graph", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1265-L1301
train
Get an existing VFGNode instance from the graph.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/vfg.py
VFG._graph_add_edge
def _graph_add_edge(self, src_block_id, dst_block_id, **kwargs): """ Add an edge onto the graph. :param BlockID src_block_id: The block ID for source node. :param BlockID dst_block_id: The block Id for destination node. :param str jumpkind: The jumpkind of the edge. ...
python
def _graph_add_edge(self, src_block_id, dst_block_id, **kwargs): """ Add an edge onto the graph. :param BlockID src_block_id: The block ID for source node. :param BlockID dst_block_id: The block Id for destination node. :param str jumpkind: The jumpkind of the edge. ...
[ "def", "_graph_add_edge", "(", "self", ",", "src_block_id", ",", "dst_block_id", ",", "*", "*", "kwargs", ")", ":", "dst_node", "=", "self", ".", "_graph_get_node", "(", "dst_block_id", ",", "terminator_for_nonexistent_node", "=", "True", ")", "if", "src_block_i...
Add an edge onto the graph. :param BlockID src_block_id: The block ID for source node. :param BlockID dst_block_id: The block Id for destination node. :param str jumpkind: The jumpkind of the edge. :param exit_stmt_idx: ID of the statement in the source IRSB where this ed...
[ "Add", "an", "edge", "onto", "the", "graph", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1303-L1322
train
Adds an edge from one source IRSB to another.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vfg.py
VFG._create_new_jobs
def _create_new_jobs(self, job, successor, new_block_id, new_call_stack): """ Create a list of new VFG jobs for the successor state. :param VFGJob job: The VFGJob instance. :param SimState successor: The succeeding state. :param BlockID new_block_id: Block ...
python
def _create_new_jobs(self, job, successor, new_block_id, new_call_stack): """ Create a list of new VFG jobs for the successor state. :param VFGJob job: The VFGJob instance. :param SimState successor: The succeeding state. :param BlockID new_block_id: Block ...
[ "def", "_create_new_jobs", "(", "self", ",", "job", ",", "successor", ",", "new_block_id", ",", "new_call_stack", ")", ":", "# TODO: basic block stack is probably useless", "jumpkind", "=", "successor", ".", "history", ".", "jumpkind", "stmt_idx", "=", "successor", ...
Create a list of new VFG jobs for the successor state. :param VFGJob job: The VFGJob instance. :param SimState successor: The succeeding state. :param BlockID new_block_id: Block ID for the new VFGJob :param new_call_stack: The new callstack. :r...
[ "Create", "a", "list", "of", "new", "VFG", "jobs", "for", "the", "successor", "state", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1375-L1535
train
Create a list of new VFG jobs for the successor 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/vfg.py
VFG._remove_pending_return
def _remove_pending_return(self, job, pending_returns): """ Remove all pending returns that are related to the current job. """ # Build the tuples that we want to remove from the dict fake_func_retn_exits tpls_to_remove = [ ] call_stack_copy = job.call_stack_copy() ...
python
def _remove_pending_return(self, job, pending_returns): """ Remove all pending returns that are related to the current job. """ # Build the tuples that we want to remove from the dict fake_func_retn_exits tpls_to_remove = [ ] call_stack_copy = job.call_stack_copy() ...
[ "def", "_remove_pending_return", "(", "self", ",", "job", ",", "pending_returns", ")", ":", "# Build the tuples that we want to remove from the dict fake_func_retn_exits", "tpls_to_remove", "=", "[", "]", "call_stack_copy", "=", "job", ".", "call_stack_copy", "(", ")", "w...
Remove all pending returns that are related to the current job.
[ "Remove", "all", "pending", "returns", "that", "are", "related", "to", "the", "current", "job", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1537-L1558
train
Remove all pending returns that are related to the current job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/vfg.py
VFG._post_job_handling_debug
def _post_job_handling_debug(self, job, successors): """ Print out debugging information after handling a VFGJob and generating the succeeding jobs. :param VFGJob job: The VFGJob instance. :param list successors: A list of succeeding states. :return: None """ fu...
python
def _post_job_handling_debug(self, job, successors): """ Print out debugging information after handling a VFGJob and generating the succeeding jobs. :param VFGJob job: The VFGJob instance. :param list successors: A list of succeeding states. :return: None """ fu...
[ "def", "_post_job_handling_debug", "(", "self", ",", "job", ",", "successors", ")", ":", "func", "=", "self", ".", "project", ".", "loader", ".", "find_symbol", "(", "job", ".", "addr", ")", "function_name", "=", "func", ".", "name", "if", "func", "is", ...
Print out debugging information after handling a VFGJob and generating the succeeding jobs. :param VFGJob job: The VFGJob instance. :param list successors: A list of succeeding states. :return: None
[ "Print", "out", "debugging", "information", "after", "handling", "a", "VFGJob", "and", "generating", "the", "succeeding", "jobs", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1560-L1590
train
Print out debugging information after handling a VFGJob and generating the succeeding jobs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vfg.py
VFG._save_function_initial_state
def _save_function_initial_state(self, function_key, function_address, state): """ Save the initial state of a function, and merge it with existing ones if there are any. :param FunctionKey function_key: The key to this function. :param int function_address: Address of the function. ...
python
def _save_function_initial_state(self, function_key, function_address, state): """ Save the initial state of a function, and merge it with existing ones if there are any. :param FunctionKey function_key: The key to this function. :param int function_address: Address of the function. ...
[ "def", "_save_function_initial_state", "(", "self", ",", "function_key", ",", "function_address", ",", "state", ")", ":", "l", ".", "debug", "(", "'Saving the initial state for function %#08x with function key %s'", ",", "function_address", ",", "function_key", ")", "if",...
Save the initial state of a function, and merge it with existing ones if there are any. :param FunctionKey function_key: The key to this function. :param int function_address: Address of the function. :param SimState state: Initial state of the function. :return: None
[ "Save", "the", "initial", "state", "of", "a", "function", "and", "merge", "it", "with", "existing", "ones", "if", "there", "are", "any", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1660-L1680
train
Save the initial state of a 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/vfg.py
VFG._save_function_final_state
def _save_function_final_state(self, function_key, function_address, state): """ Save the final state of a function, and merge it with existing ones if there are any. :param FunctionKey function_key: The key to this function. :param int function_address: Address of the function. ...
python
def _save_function_final_state(self, function_key, function_address, state): """ Save the final state of a function, and merge it with existing ones if there are any. :param FunctionKey function_key: The key to this function. :param int function_address: Address of the function. ...
[ "def", "_save_function_final_state", "(", "self", ",", "function_key", ",", "function_address", ",", "state", ")", ":", "l", ".", "debug", "(", "'Saving the final state for function %#08x with function key %s'", ",", "function_address", ",", "function_key", ")", "if", "...
Save the final state of a function, and merge it with existing ones if there are any. :param FunctionKey function_key: The key to this function. :param int function_address: Address of the function. :param SimState state: Initial state of the function. :return: None
[ "Save", "the", "final", "state", "of", "a", "function", "and", "merge", "it", "with", "existing", "ones", "if", "there", "are", "any", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1682-L1703
train
Save the final state of a 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/vfg.py
VFG._get_nx_paths
def _get_nx_paths(self, begin, end): """ Get the possible (networkx) simple paths between two nodes or addresses corresponding to nodes. Input: addresses or node instances Return: a list of lists of nodes representing paths. """ if type(begin) is int and type(end)...
python
def _get_nx_paths(self, begin, end): """ Get the possible (networkx) simple paths between two nodes or addresses corresponding to nodes. Input: addresses or node instances Return: a list of lists of nodes representing paths. """ if type(begin) is int and type(end)...
[ "def", "_get_nx_paths", "(", "self", ",", "begin", ",", "end", ")", ":", "if", "type", "(", "begin", ")", "is", "int", "and", "type", "(", "end", ")", "is", "int", ":", "# pylint:disable=unidiomatic-typecheck", "n_begin", "=", "self", ".", "get_any_node", ...
Get the possible (networkx) simple paths between two nodes or addresses corresponding to nodes. Input: addresses or node instances Return: a list of lists of nodes representing paths.
[ "Get", "the", "possible", "(", "networkx", ")", "simple", "paths", "between", "two", "nodes", "or", "addresses", "corresponding", "to", "nodes", ".", "Input", ":", "addresses", "or", "node", "instances", "Return", ":", "a", "list", "of", "lists", "of", "no...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1746-L1763
train
Get the possible simple paths between two addresses or node instances.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/vfg.py
VFG._merge_points
def _merge_points(self, function_address): """ Return the ordered merge points for a specific function. :param int function_address: Address of the querying function. :return: A list of sorted merge points (addresses). :rtype: list """ # we are entering a new fu...
python
def _merge_points(self, function_address): """ Return the ordered merge points for a specific function. :param int function_address: Address of the querying function. :return: A list of sorted merge points (addresses). :rtype: list """ # we are entering a new fu...
[ "def", "_merge_points", "(", "self", ",", "function_address", ")", ":", "# we are entering a new function. now it's time to figure out how to optimally traverse the control flow", "# graph by generating the sorted merge points", "try", ":", "new_function", "=", "self", ".", "kb", "...
Return the ordered merge points for a specific function. :param int function_address: Address of the querying function. :return: A list of sorted merge points (addresses). :rtype: list
[ "Return", "the", "ordered", "merge", "points", "for", "a", "specific", "function", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1765-L1787
train
Return the ordered merge points for a specific function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/vfg.py
VFG._widening_points
def _widening_points(self, function_address): """ Return the ordered widening points for a specific function. :param int function_address: Address of the querying function. :return: A list of sorted merge points (addresses). :rtype: list """ # we are entering a ...
python
def _widening_points(self, function_address): """ Return the ordered widening points for a specific function. :param int function_address: Address of the querying function. :return: A list of sorted merge points (addresses). :rtype: list """ # we are entering a ...
[ "def", "_widening_points", "(", "self", ",", "function_address", ")", ":", "# we are entering a new function. now it's time to figure out how to optimally traverse the control flow", "# graph by generating the sorted merge points", "try", ":", "new_function", "=", "self", ".", "kb", ...
Return the ordered widening points for a specific function. :param int function_address: Address of the querying function. :return: A list of sorted merge points (addresses). :rtype: list
[ "Return", "the", "ordered", "widening", "points", "for", "a", "specific", "function", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1789-L1813
train
Return the ordered widening points for a specific function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/vfg.py
VFG._ordered_node_addrs
def _ordered_node_addrs(self, function_address): """ For a given function, return all nodes in an optimal traversal order. If the function does not exist, return an empty list. :param int function_address: Address of the function. :return: A ordered list of the nodes. :r...
python
def _ordered_node_addrs(self, function_address): """ For a given function, return all nodes in an optimal traversal order. If the function does not exist, return an empty list. :param int function_address: Address of the function. :return: A ordered list of the nodes. :r...
[ "def", "_ordered_node_addrs", "(", "self", ",", "function_address", ")", ":", "try", ":", "function", "=", "self", ".", "kb", ".", "functions", "[", "function_address", "]", "except", "KeyError", ":", "# the function does not exist", "return", "[", "]", "if", ...
For a given function, return all nodes in an optimal traversal order. If the function does not exist, return an empty list. :param int function_address: Address of the function. :return: A ordered list of the nodes. :rtype: list
[ "For", "a", "given", "function", "return", "all", "nodes", "in", "an", "optimal", "traversal", "order", ".", "If", "the", "function", "does", "not", "exist", "return", "an", "empty", "list", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vfg.py#L1815-L1835
train
Returns a list of all nodes in an optimal traversal order.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/uc_manager.py
SimUCManager.assign
def assign(self, dst_addr_ast): """ Assign a new region for under-constrained symbolic execution. :param dst_addr_ast: the symbolic AST which address of the new allocated region will be assigned to. :return: as ast of memory address that points to a new region """ if ds...
python
def assign(self, dst_addr_ast): """ Assign a new region for under-constrained symbolic execution. :param dst_addr_ast: the symbolic AST which address of the new allocated region will be assigned to. :return: as ast of memory address that points to a new region """ if ds...
[ "def", "assign", "(", "self", ",", "dst_addr_ast", ")", ":", "if", "dst_addr_ast", ".", "uc_alloc_depth", ">", "self", ".", "_max_alloc_depth", ":", "raise", "SimUCManagerAllocationError", "(", "'Current allocation depth %d is greater than the cap (%d)'", "%", "(", "dst...
Assign a new region for under-constrained symbolic execution. :param dst_addr_ast: the symbolic AST which address of the new allocated region will be assigned to. :return: as ast of memory address that points to a new region
[ "Assign", "a", "new", "region", "for", "under", "-", "constrained", "symbolic", "execution", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/uc_manager.py#L33-L52
train
Assign a new region for under - constrained symbolic 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/uc_manager.py
SimUCManager.is_bounded
def is_bounded(self, ast): """ Test whether an AST is bounded by any existing constraint in the related solver. :param ast: an claripy.AST object :return: True if there is at least one related constraint, False otherwise """ return len(ast.variables.intersection(self.st...
python
def is_bounded(self, ast): """ Test whether an AST is bounded by any existing constraint in the related solver. :param ast: an claripy.AST object :return: True if there is at least one related constraint, False otherwise """ return len(ast.variables.intersection(self.st...
[ "def", "is_bounded", "(", "self", ",", "ast", ")", ":", "return", "len", "(", "ast", ".", "variables", ".", "intersection", "(", "self", ".", "state", ".", "solver", ".", "_solver", ".", "variables", ")", ")", "!=", "0" ]
Test whether an AST is bounded by any existing constraint in the related solver. :param ast: an claripy.AST object :return: True if there is at least one related constraint, False otherwise
[ "Test", "whether", "an", "AST", "is", "bounded", "by", "any", "existing", "constraint", "in", "the", "related", "solver", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/uc_manager.py#L66-L74
train
Test whether an AST is bounded by any existing constraint in the related 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/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py
MipsElfFastResolver.resolve
def resolve(self, cfg, addr, func_addr, block, jumpkind): """ Resolves the indirect jump in MIPS ELF binaries where all external function calls are indexed using gp. :param cfg: A CFG instance. :param int addr: IRSB address. :param int func_addr: The function address. :p...
python
def resolve(self, cfg, addr, func_addr, block, jumpkind): """ Resolves the indirect jump in MIPS ELF binaries where all external function calls are indexed using gp. :param cfg: A CFG instance. :param int addr: IRSB address. :param int func_addr: The function address. :p...
[ "def", "resolve", "(", "self", ",", "cfg", ",", "addr", ",", "func_addr", ",", "block", ",", "jumpkind", ")", ":", "project", "=", "self", ".", "project", "b", "=", "Blade", "(", "cfg", ".", "graph", ",", "addr", ",", "-", "1", ",", "cfg", "=", ...
Resolves the indirect jump in MIPS ELF binaries where all external function calls are indexed using gp. :param cfg: A CFG instance. :param int addr: IRSB address. :param int func_addr: The function address. :param pyvex.IRSB block: The IRSB. :param str jumpkind: The jumpkind. ...
[ "Resolves", "the", "indirect", "jump", "in", "MIPS", "ELF", "binaries", "where", "all", "external", "function", "calls", "are", "indexed", "using", "gp", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py#L28-L110
train
Resolves the indirect jump in MIPS ELF binaries where all external function calls are indexed using gp.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/hook.py
SimEngineHook.process
def process(self, state, procedure=None, force_addr=None, **kwargs): """ Perform execution with a state. :param state: The state with which to execute :param procedure: An instance of a SimProcedure to run, optional :param ret_to: The address to return to when this ...
python
def process(self, state, procedure=None, force_addr=None, **kwargs): """ Perform execution with a state. :param state: The state with which to execute :param procedure: An instance of a SimProcedure to run, optional :param ret_to: The address to return to when this ...
[ "def", "process", "(", "self", ",", "state", ",", "procedure", "=", "None", ",", "force_addr", "=", "None", ",", "*", "*", "kwargs", ")", ":", "addr", "=", "state", ".", "addr", "if", "force_addr", "is", "None", "else", "force_addr", "if", "procedure",...
Perform execution with a state. :param state: The state with which to execute :param procedure: An instance of a SimProcedure to run, optional :param ret_to: The address to return to when this procedure is finished :param inline: This is an inline execution. Do not bot...
[ "Perform", "execution", "with", "a", "state", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/hook.py#L29-L55
train
Executes a procedure and returns a new 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_options.py
SimStateOptions.difference
def difference(self, boolean_switches): """ [COMPATIBILITY] Make a copy of the current instance, and then discard all options that are in boolean_switches. :param set boolean_switches: A collection of Boolean switches to disable. :return: A new SimState...
python
def difference(self, boolean_switches): """ [COMPATIBILITY] Make a copy of the current instance, and then discard all options that are in boolean_switches. :param set boolean_switches: A collection of Boolean switches to disable. :return: A new SimState...
[ "def", "difference", "(", "self", ",", "boolean_switches", ")", ":", "ops", "=", "SimStateOptions", "(", "self", ")", "for", "key", "in", "boolean_switches", ":", "ops", ".", "discard", "(", "key", ")", "return", "ops" ]
[COMPATIBILITY] Make a copy of the current instance, and then discard all options that are in boolean_switches. :param set boolean_switches: A collection of Boolean switches to disable. :return: A new SimStateOptions instance.
[ "[", "COMPATIBILITY", "]", "Make", "a", "copy", "of", "the", "current", "instance", "and", "then", "discard", "all", "options", "that", "are", "in", "boolean_switches", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state_options.py#L317-L329
train
Returns a new instance with only the options that are in boolean_switches.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_options.py
SimStateOptions.tally
def tally(self, exclude_false=True, description=False): """ Return a string representation of all state options. :param bool exclude_false: Whether to exclude Boolean switches that are disabled. :param bool description: Whether to display the description of each option. :ret...
python
def tally(self, exclude_false=True, description=False): """ Return a string representation of all state options. :param bool exclude_false: Whether to exclude Boolean switches that are disabled. :param bool description: Whether to display the description of each option. :ret...
[ "def", "tally", "(", "self", ",", "exclude_false", "=", "True", ",", "description", "=", "False", ")", ":", "total", "=", "[", "]", "for", "o", "in", "sorted", "(", "self", ".", "OPTIONS", ".", "values", "(", ")", ",", "key", "=", "lambda", "x", ...
Return a string representation of all state options. :param bool exclude_false: Whether to exclude Boolean switches that are disabled. :param bool description: Whether to display the description of each option. :return: A string representation. :rtype: ...
[ "Return", "a", "string", "representation", "of", "all", "state", "options", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state_options.py#L341-L369
train
Return a string representation of all 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/sim_state_options.py
SimStateOptions.register_option
def register_option(cls, name, types, default=None, description=None): """ Register a state option. :param str name: Name of the state option. :param types: A collection of allowed types of this state option. :param default: The default value of this sta...
python
def register_option(cls, name, types, default=None, description=None): """ Register a state option. :param str name: Name of the state option. :param types: A collection of allowed types of this state option. :param default: The default value of this sta...
[ "def", "register_option", "(", "cls", ",", "name", ",", "types", ",", "default", "=", "None", ",", "description", "=", "None", ")", ":", "if", "name", "in", "cls", ".", "OPTIONS", ":", "raise", "SimStateOptionsError", "(", "\"A state option with the same name ...
Register a state option. :param str name: Name of the state option. :param types: A collection of allowed types of this state option. :param default: The default value of this state option. :param str description: The description of this state option. :r...
[ "Register", "a", "state", "option", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state_options.py#L372-L390
train
Registers a state option.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_options.py
SimStateOptions.register_bool_option
def register_bool_option(cls, name, description=None): """ Register a Boolean switch as state option. This is equivalent to cls.register_option(name, set([bool]), description=description) :param str name: Name of the state option. :param str description: The description o...
python
def register_bool_option(cls, name, description=None): """ Register a Boolean switch as state option. This is equivalent to cls.register_option(name, set([bool]), description=description) :param str name: Name of the state option. :param str description: The description o...
[ "def", "register_bool_option", "(", "cls", ",", "name", ",", "description", "=", "None", ")", ":", "cls", ".", "register_option", "(", "name", ",", "{", "bool", "}", ",", "default", "=", "False", ",", "description", "=", "description", ")" ]
Register a Boolean switch as state option. This is equivalent to cls.register_option(name, set([bool]), description=description) :param str name: Name of the state option. :param str description: The description of this state option. :return: None
[ "Register", "a", "Boolean", "switch", "as", "state", "option", ".", "This", "is", "equivalent", "to", "cls", ".", "register_option", "(", "name", "set", "(", "[", "bool", "]", ")", "description", "=", "description", ")" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_state_options.py#L393-L403
train
Register a Boolean switch as state option.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/utils.py
concretize
def concretize(x, solver, sym_handler): """ For now a lot of naive concretization is done when handling heap metadata to keep things manageable. This idiom showed up a lot as a result, so to reduce code repetition this function uses a callback to handle the one or two operations that varied across invoc...
python
def concretize(x, solver, sym_handler): """ For now a lot of naive concretization is done when handling heap metadata to keep things manageable. This idiom showed up a lot as a result, so to reduce code repetition this function uses a callback to handle the one or two operations that varied across invoc...
[ "def", "concretize", "(", "x", ",", "solver", ",", "sym_handler", ")", ":", "if", "solver", ".", "symbolic", "(", "x", ")", ":", "try", ":", "return", "solver", ".", "eval_one", "(", "x", ")", "except", "SimSolverError", ":", "return", "sym_handler", "...
For now a lot of naive concretization is done when handling heap metadata to keep things manageable. This idiom showed up a lot as a result, so to reduce code repetition this function uses a callback to handle the one or two operations that varied across invocations. :param x: the item to be concretized ...
[ "For", "now", "a", "lot", "of", "naive", "concretization", "is", "done", "when", "handling", "heap", "metadata", "to", "keep", "things", "manageable", ".", "This", "idiom", "showed", "up", "a", "lot", "as", "a", "result", "so", "to", "reduce", "code", "r...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/heap/utils.py#L3-L20
train
concretizes the item with the given 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_procedure.py
SimProcedure._describe_me
def _describe_me(self): """ return a 5-tuple of strings sufficient for formatting with ``%s%s%s%s%s`` to verbosely describe the procedure """ return ( self.display_name, ' (cont: %s)' % self.run_func if self.is_continuation else '', ' (syscall)' if sel...
python
def _describe_me(self): """ return a 5-tuple of strings sufficient for formatting with ``%s%s%s%s%s`` to verbosely describe the procedure """ return ( self.display_name, ' (cont: %s)' % self.run_func if self.is_continuation else '', ' (syscall)' if sel...
[ "def", "_describe_me", "(", "self", ")", ":", "return", "(", "self", ".", "display_name", ",", "' (cont: %s)'", "%", "self", ".", "run_func", "if", "self", ".", "is_continuation", "else", "''", ",", "' (syscall)'", "if", "self", ".", "is_syscall", "else", ...
return a 5-tuple of strings sufficient for formatting with ``%s%s%s%s%s`` to verbosely describe the procedure
[ "return", "a", "5", "-", "tuple", "of", "strings", "sufficient", "for", "formatting", "with", "%s%s%s%s%s", "to", "verbosely", "describe", "the", "procedure" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_procedure.py#L90-L100
train
Return a 5 - tuple of strings sufficient for formatting with the procedure
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/sim_procedure.py
SimProcedure.execute
def execute(self, state, successors=None, arguments=None, ret_to=None): """ Call this method with a SimState and a SimSuccessors to execute the procedure. Alternately, successors may be none if this is an inline call. In that case, you should provide arguments to the function. "...
python
def execute(self, state, successors=None, arguments=None, ret_to=None): """ Call this method with a SimState and a SimSuccessors to execute the procedure. Alternately, successors may be none if this is an inline call. In that case, you should provide arguments to the function. "...
[ "def", "execute", "(", "self", ",", "state", ",", "successors", "=", "None", ",", "arguments", "=", "None", ",", "ret_to", "=", "None", ")", ":", "# fill out all the fun stuff we don't want to frontload", "if", "self", ".", "addr", "is", "None", "and", "not", ...
Call this method with a SimState and a SimSuccessors to execute the procedure. Alternately, successors may be none if this is an inline call. In that case, you should provide arguments to the function.
[ "Call", "this", "method", "with", "a", "SimState", "and", "a", "SimSuccessors", "to", "execute", "the", "procedure", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_procedure.py#L102-L187
train
Execute 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/sim_procedure.py
SimProcedure.arg
def arg(self, i): """ Returns the ith argument. Raise a SimProcedureArgumentError if we don't have such an argument available. :param int i: The index of the argument to get :return: The argument :rtype: object """ if self.use_state_arguments: r = sel...
python
def arg(self, i): """ Returns the ith argument. Raise a SimProcedureArgumentError if we don't have such an argument available. :param int i: The index of the argument to get :return: The argument :rtype: object """ if self.use_state_arguments: r = sel...
[ "def", "arg", "(", "self", ",", "i", ")", ":", "if", "self", ".", "use_state_arguments", ":", "r", "=", "self", ".", "cc", ".", "arg", "(", "self", ".", "state", ",", "i", ")", "else", ":", "if", "i", ">=", "len", "(", "self", ".", "arguments",...
Returns the ith argument. Raise a SimProcedureArgumentError if we don't have such an argument available. :param int i: The index of the argument to get :return: The argument :rtype: object
[ "Returns", "the", "ith", "argument", ".", "Raise", "a", "SimProcedureArgumentError", "if", "we", "don", "t", "have", "such", "an", "argument", "available", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_procedure.py#L262-L278
train
Returns the ith argument. Raise a SimProcedureArgumentError if we don t have such an argument available.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_procedure.py
SimProcedure.inline_call
def inline_call(self, procedure, *arguments, **kwargs): """ Call another SimProcedure in-line to retrieve its return value. Returns an instance of the procedure with the ret_expr property set. :param procedure: The class of the procedure to execute :param arguments: ...
python
def inline_call(self, procedure, *arguments, **kwargs): """ Call another SimProcedure in-line to retrieve its return value. Returns an instance of the procedure with the ret_expr property set. :param procedure: The class of the procedure to execute :param arguments: ...
[ "def", "inline_call", "(", "self", ",", "procedure", ",", "*", "arguments", ",", "*", "*", "kwargs", ")", ":", "e_args", "=", "[", "self", ".", "state", ".", "solver", ".", "BVV", "(", "a", ",", "self", ".", "state", ".", "arch", ".", "bits", ")"...
Call another SimProcedure in-line to retrieve its return value. Returns an instance of the procedure with the ret_expr property set. :param procedure: The class of the procedure to execute :param arguments: Any additional positional args will be used as arguments to the ...
[ "Call", "another", "SimProcedure", "in", "-", "line", "to", "retrieve", "its", "return", "value", ".", "Returns", "an", "instance", "of", "the", "procedure", "with", "the", "ret_expr", "property", "set", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_procedure.py#L284-L297
train
In - line call another SimProcedure in - line to retrieve its return value.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/sim_procedure.py
SimProcedure.ret
def ret(self, expr=None): """ Add an exit representing a return from this function. If this is not an inline call, grab a return address from the state and jump to it. If this is not an inline call, set a return expression with the calling convention. """ self.inhibit_aut...
python
def ret(self, expr=None): """ Add an exit representing a return from this function. If this is not an inline call, grab a return address from the state and jump to it. If this is not an inline call, set a return expression with the calling convention. """ self.inhibit_aut...
[ "def", "ret", "(", "self", ",", "expr", "=", "None", ")", ":", "self", ".", "inhibit_autoret", "=", "True", "if", "expr", "is", "not", "None", ":", "if", "o", ".", "SIMPLIFY_RETS", "in", "self", ".", "state", ".", "options", ":", "l", ".", "debug",...
Add an exit representing a return from this function. If this is not an inline call, grab a return address from the state and jump to it. If this is not an inline call, set a return expression with the calling convention.
[ "Add", "an", "exit", "representing", "a", "return", "from", "this", "function", ".", "If", "this", "is", "not", "an", "inline", "call", "grab", "a", "return", "address", "from", "the", "state", "and", "jump", "to", "it", ".", "If", "this", "is", "not",...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_procedure.py#L299-L349
train
Add an exit representing a return from this 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/sim_procedure.py
SimProcedure.call
def call(self, addr, args, continue_at, cc=None): """ Add an exit representing calling another function via pointer. :param addr: The address of the function to call :param args: The list of arguments to call the function with :param continue_at: Later, when the ca...
python
def call(self, addr, args, continue_at, cc=None): """ Add an exit representing calling another function via pointer. :param addr: The address of the function to call :param args: The list of arguments to call the function with :param continue_at: Later, when the ca...
[ "def", "call", "(", "self", ",", "addr", ",", "args", ",", "continue_at", ",", "cc", "=", "None", ")", ":", "self", ".", "inhibit_autoret", "=", "True", "if", "cc", "is", "None", ":", "cc", "=", "self", ".", "cc", "call_state", "=", "self", ".", ...
Add an exit representing calling another function via pointer. :param addr: The address of the function to call :param args: The list of arguments to call the function with :param continue_at: Later, when the called function returns, execution of the current ...
[ "Add", "an", "exit", "representing", "calling", "another", "function", "via", "pointer", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_procedure.py#L352-L396
train
Add an exit representing calling another function via 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_procedure.py
SimProcedure.jump
def jump(self, addr): """ Add an exit representing jumping to an address. """ self.inhibit_autoret = True self._exit_action(self.state, addr) self.successors.add_successor(self.state, addr, self.state.solver.true, 'Ijk_Boring')
python
def jump(self, addr): """ Add an exit representing jumping to an address. """ self.inhibit_autoret = True self._exit_action(self.state, addr) self.successors.add_successor(self.state, addr, self.state.solver.true, 'Ijk_Boring')
[ "def", "jump", "(", "self", ",", "addr", ")", ":", "self", ".", "inhibit_autoret", "=", "True", "self", ".", "_exit_action", "(", "self", ".", "state", ",", "addr", ")", "self", ".", "successors", ".", "add_successor", "(", "self", ".", "state", ",", ...
Add an exit representing jumping to an address.
[ "Add", "an", "exit", "representing", "jumping", "to", "an", "address", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_procedure.py#L398-L404
train
Add an exit representing jumping to an 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/sim_procedure.py
SimProcedure.exit
def exit(self, exit_code): """ Add an exit representing terminating the program. """ self.inhibit_autoret = True self.state.options.discard(o.AST_DEPS) self.state.options.discard(o.AUTO_REFS) if isinstance(exit_code, int): exit_code = self.state.solve...
python
def exit(self, exit_code): """ Add an exit representing terminating the program. """ self.inhibit_autoret = True self.state.options.discard(o.AST_DEPS) self.state.options.discard(o.AUTO_REFS) if isinstance(exit_code, int): exit_code = self.state.solve...
[ "def", "exit", "(", "self", ",", "exit_code", ")", ":", "self", ".", "inhibit_autoret", "=", "True", "self", ".", "state", ".", "options", ".", "discard", "(", "o", ".", "AST_DEPS", ")", "self", ".", "state", ".", "options", ".", "discard", "(", "o",...
Add an exit representing terminating the program.
[ "Add", "an", "exit", "representing", "terminating", "the", "program", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_procedure.py#L406-L417
train
Add an exit representing terminating the program.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vsa_ddg.py
VSA_DDG._explore
def _explore(self): """ Starting from the start_node, explore the entire VFG, and perform the following: - Generate def-use chains for all registers and memory addresses using a worklist """ # TODO: The worklist algorithm can definitely use some optimizations. It is a future wor...
python
def _explore(self): """ Starting from the start_node, explore the entire VFG, and perform the following: - Generate def-use chains for all registers and memory addresses using a worklist """ # TODO: The worklist algorithm can definitely use some optimizations. It is a future wor...
[ "def", "_explore", "(", "self", ")", ":", "# TODO: The worklist algorithm can definitely use some optimizations. It is a future work.", "# The worklist holds individual VFGNodes that comes from the VFG", "# Initialize the worklist with all nodes in VFG", "worklist", "=", "list", "(", "self...
Starting from the start_node, explore the entire VFG, and perform the following: - Generate def-use chains for all registers and memory addresses using a worklist
[ "Starting", "from", "the", "start_node", "explore", "the", "entire", "VFG", "and", "perform", "the", "following", ":", "-", "Generate", "def", "-", "use", "chains", "for", "all", "registers", "and", "memory", "addresses", "using", "a", "worklist" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vsa_ddg.py#L108-L185
train
Explore the entire VFG and generate def - use chains for all registers and memory addresses using a worklist.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vsa_ddg.py
VSA_DDG._track
def _track(self, state, live_defs): """ Given all live definitions prior to this program point, track the changes, and return a new list of live definitions. We scan through the action list of the new state to track the changes. :param state: The input state at that program point....
python
def _track(self, state, live_defs): """ Given all live definitions prior to this program point, track the changes, and return a new list of live definitions. We scan through the action list of the new state to track the changes. :param state: The input state at that program point....
[ "def", "_track", "(", "self", ",", "state", ",", "live_defs", ")", ":", "# Make a copy of live_defs", "live_defs", "=", "live_defs", ".", "copy", "(", ")", "action_list", "=", "list", "(", "state", ".", "history", ".", "recent_actions", ")", "# Since all tempo...
Given all live definitions prior to this program point, track the changes, and return a new list of live definitions. We scan through the action list of the new state to track the changes. :param state: The input state at that program point. :param live_defs: A list of all live definiti...
[ "Given", "all", "live", "definitions", "prior", "to", "this", "program", "point", "track", "the", "changes", "and", "return", "a", "new", "list", "of", "live", "definitions", ".", "We", "scan", "through", "the", "action", "list", "of", "the", "new", "state...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vsa_ddg.py#L187-L342
train
This method tracks the changes in a state and returns a new list of live_defs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vsa_ddg.py
VSA_DDG._def_lookup
def _def_lookup(self, live_defs, variable): """ This is a backward lookup in the previous defs. :param addr_list: a list of normalized addresses. Note that, as we are using VSA, it is possible that @a is affected by several definitions. :returns: a dict {s...
python
def _def_lookup(self, live_defs, variable): """ This is a backward lookup in the previous defs. :param addr_list: a list of normalized addresses. Note that, as we are using VSA, it is possible that @a is affected by several definitions. :returns: a dict {s...
[ "def", "_def_lookup", "(", "self", ",", "live_defs", ",", "variable", ")", ":", "prevdefs", "=", "{", "}", "if", "variable", "in", "live_defs", ":", "code_loc_set", "=", "live_defs", "[", "variable", "]", "for", "code_loc", "in", "code_loc_set", ":", "# La...
This is a backward lookup in the previous defs. :param addr_list: a list of normalized addresses. Note that, as we are using VSA, it is possible that @a is affected by several definitions. :returns: a dict {stmt:labels} where label is the number of individual addresses of...
[ "This", "is", "a", "backward", "lookup", "in", "the", "previous", "defs", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vsa_ddg.py#L345-L385
train
This is a backward lookup in the previous defs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vsa_ddg.py
VSA_DDG._kill
def _kill(self, live_defs, variable, code_loc): """ Kill previous defs. `addr_list` is a list of normalized addresses. """ # Case 1: address perfectly match, we kill # Case 2: a is a subset of the original address # Case 3: a is a superset of the original address ...
python
def _kill(self, live_defs, variable, code_loc): """ Kill previous defs. `addr_list` is a list of normalized addresses. """ # Case 1: address perfectly match, we kill # Case 2: a is a subset of the original address # Case 3: a is a superset of the original address ...
[ "def", "_kill", "(", "self", ",", "live_defs", ",", "variable", ",", "code_loc", ")", ":", "# Case 1: address perfectly match, we kill", "# Case 2: a is a subset of the original address", "# Case 3: a is a superset of the original address", "live_defs", "[", "variable", "]", "=...
Kill previous defs. `addr_list` is a list of normalized addresses.
[ "Kill", "previous", "defs", ".", "addr_list", "is", "a", "list", "of", "normalized", "addresses", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vsa_ddg.py#L387-L397
train
Kill previous defs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vsa_ddg.py
VSA_DDG._add_edge
def _add_edge(self, s_a, s_b, **edge_labels): """ Add an edge in the graph from `s_a` to statement `s_b`, where `s_a` and `s_b` are tuples of statements of the form (irsb_addr, stmt_idx). """ # Is that edge already in the graph ? # If at least one is new, then we are not ...
python
def _add_edge(self, s_a, s_b, **edge_labels): """ Add an edge in the graph from `s_a` to statement `s_b`, where `s_a` and `s_b` are tuples of statements of the form (irsb_addr, stmt_idx). """ # Is that edge already in the graph ? # If at least one is new, then we are not ...
[ "def", "_add_edge", "(", "self", ",", "s_a", ",", "s_b", ",", "*", "*", "edge_labels", ")", ":", "# Is that edge already in the graph ?", "# If at least one is new, then we are not redoing the same path again", "if", "(", "s_a", ",", "s_b", ")", "not", "in", "self", ...
Add an edge in the graph from `s_a` to statement `s_b`, where `s_a` and `s_b` are tuples of statements of the form (irsb_addr, stmt_idx).
[ "Add", "an", "edge", "in", "the", "graph", "from", "s_a", "to", "statement", "s_b", "where", "s_a", "and", "s_b", "are", "tuples", "of", "statements", "of", "the", "form", "(", "irsb_addr", "stmt_idx", ")", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vsa_ddg.py#L399-L409
train
Add an edge from s_a to s_b.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vsa_ddg.py
VSA_DDG.get_all_nodes
def get_all_nodes(self, simrun_addr, stmt_idx): """ Get all DDG nodes matching the given basic block address and statement index. """ nodes=[] for n in self.graph.nodes(): if n.simrun_addr == simrun_addr and n.stmt_idx == stmt_idx: nodes.add(n) ...
python
def get_all_nodes(self, simrun_addr, stmt_idx): """ Get all DDG nodes matching the given basic block address and statement index. """ nodes=[] for n in self.graph.nodes(): if n.simrun_addr == simrun_addr and n.stmt_idx == stmt_idx: nodes.add(n) ...
[ "def", "get_all_nodes", "(", "self", ",", "simrun_addr", ",", "stmt_idx", ")", ":", "nodes", "=", "[", "]", "for", "n", "in", "self", ".", "graph", ".", "nodes", "(", ")", ":", "if", "n", ".", "simrun_addr", "==", "simrun_addr", "and", "n", ".", "s...
Get all DDG nodes matching the given basic block address and statement index.
[ "Get", "all", "DDG", "nodes", "matching", "the", "given", "basic", "block", "address", "and", "statement", "index", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/vsa_ddg.py#L411-L419
train
Get all nodes matching the given basic block address and statement index.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/engines/vex/irop.py
SimIROp.vector_args
def vector_args(self, args): """ Yields each of the individual lane pairs from the arguments, in order from most significan to least significant """ for i in reversed(range(self._vector_count)): pieces = [] for vec in args: pieces.append(...
python
def vector_args(self, args): """ Yields each of the individual lane pairs from the arguments, in order from most significan to least significant """ for i in reversed(range(self._vector_count)): pieces = [] for vec in args: pieces.append(...
[ "def", "vector_args", "(", "self", ",", "args", ")", ":", "for", "i", "in", "reversed", "(", "range", "(", "self", ".", "_vector_count", ")", ")", ":", "pieces", "=", "[", "]", "for", "vec", "in", "args", ":", "pieces", ".", "append", "(", "vec", ...
Yields each of the individual lane pairs from the arguments, in order from most significan to least significant
[ "Yields", "each", "of", "the", "individual", "lane", "pairs", "from", "the", "arguments", "in", "order", "from", "most", "significan", "to", "least", "significant" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/vex/irop.py#L491-L500
train
Yields each individual lane pair from the arguments in the order from most significan to least significant
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/engines/vex/irop.py
SimIROp._op_generic_Clz
def _op_generic_Clz(self, args): """Count the leading zeroes""" wtf_expr = claripy.BVV(self._from_size, self._from_size) for a in range(self._from_size): bit = claripy.Extract(a, a, args[0]) wtf_expr = claripy.If(bit==1, claripy.BVV(self._from_size-a-1, self._from_size), ...
python
def _op_generic_Clz(self, args): """Count the leading zeroes""" wtf_expr = claripy.BVV(self._from_size, self._from_size) for a in range(self._from_size): bit = claripy.Extract(a, a, args[0]) wtf_expr = claripy.If(bit==1, claripy.BVV(self._from_size-a-1, self._from_size), ...
[ "def", "_op_generic_Clz", "(", "self", ",", "args", ")", ":", "wtf_expr", "=", "claripy", ".", "BVV", "(", "self", ".", "_from_size", ",", "self", ".", "_from_size", ")", "for", "a", "in", "range", "(", "self", ".", "_from_size", ")", ":", "bit", "="...
Count the leading zeroes
[ "Count", "the", "leading", "zeroes" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/vex/irop.py#L508-L514
train
Generic Clz operation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/engines/vex/irop.py
SimIROp._op_generic_Ctz
def _op_generic_Ctz(self, args): """Count the trailing zeroes""" wtf_expr = claripy.BVV(self._from_size, self._from_size) for a in reversed(range(self._from_size)): bit = claripy.Extract(a, a, args[0]) wtf_expr = claripy.If(bit == 1, claripy.BVV(a, self._from_size), wtf_e...
python
def _op_generic_Ctz(self, args): """Count the trailing zeroes""" wtf_expr = claripy.BVV(self._from_size, self._from_size) for a in reversed(range(self._from_size)): bit = claripy.Extract(a, a, args[0]) wtf_expr = claripy.If(bit == 1, claripy.BVV(a, self._from_size), wtf_e...
[ "def", "_op_generic_Ctz", "(", "self", ",", "args", ")", ":", "wtf_expr", "=", "claripy", ".", "BVV", "(", "self", ".", "_from_size", ",", "self", ".", "_from_size", ")", "for", "a", "in", "reversed", "(", "range", "(", "self", ".", "_from_size", ")", ...
Count the trailing zeroes
[ "Count", "the", "trailing", "zeroes" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/vex/irop.py#L516-L522
train
Count the trailing zeroes in the ctz table
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/engines/vex/irop.py
SimIROp._op_generic_HAdd
def _op_generic_HAdd(self, args): """ Halving add, for some ARM NEON instructions. """ components = [] for a, b in self.vector_args(args): if self.is_signed: a = a.sign_extend(self._vector_size) b = b.sign_extend(self._vector_size) ...
python
def _op_generic_HAdd(self, args): """ Halving add, for some ARM NEON instructions. """ components = [] for a, b in self.vector_args(args): if self.is_signed: a = a.sign_extend(self._vector_size) b = b.sign_extend(self._vector_size) ...
[ "def", "_op_generic_HAdd", "(", "self", ",", "args", ")", ":", "components", "=", "[", "]", "for", "a", ",", "b", "in", "self", ".", "vector_args", "(", "args", ")", ":", "if", "self", ".", "is_signed", ":", "a", "=", "a", ".", "sign_extend", "(", ...
Halving add, for some ARM NEON instructions.
[ "Halving", "add", "for", "some", "ARM", "NEON", "instructions", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/vex/irop.py#L656-L669
train
Halving add for some ARM NEON instructions.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/engines/vex/irop.py
SimIROp._op_generic_QAdd
def _op_generic_QAdd(self, args): """ Saturating add. """ components = [] for a, b in self.vector_args(args): top_a = a[self._vector_size-1] top_b = b[self._vector_size-1] res = a + b top_r = res[self._vector_size-1] if ...
python
def _op_generic_QAdd(self, args): """ Saturating add. """ components = [] for a, b in self.vector_args(args): top_a = a[self._vector_size-1] top_b = b[self._vector_size-1] res = a + b top_r = res[self._vector_size-1] if ...
[ "def", "_op_generic_QAdd", "(", "self", ",", "args", ")", ":", "components", "=", "[", "]", "for", "a", ",", "b", "in", "self", ".", "vector_args", "(", "args", ")", ":", "top_a", "=", "a", "[", "self", ".", "_vector_size", "-", "1", "]", "top_b", ...
Saturating add.
[ "Saturating", "add", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/vex/irop.py#L688-L706
train
Saturating add.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/engines/vex/irop.py
SimIROp._op_generic_pack_StoU_saturation
def _op_generic_pack_StoU_saturation(self, args, src_size, dst_size): """ Generic pack with unsigned saturation. Split args in chunks of src_size signed bits and in pack them into unsigned saturated chunks of dst_size bits. Then chunks are concatenated resulting in a BV of len(args)*dst_...
python
def _op_generic_pack_StoU_saturation(self, args, src_size, dst_size): """ Generic pack with unsigned saturation. Split args in chunks of src_size signed bits and in pack them into unsigned saturated chunks of dst_size bits. Then chunks are concatenated resulting in a BV of len(args)*dst_...
[ "def", "_op_generic_pack_StoU_saturation", "(", "self", ",", "args", ",", "src_size", ",", "dst_size", ")", ":", "if", "src_size", "<=", "0", "or", "dst_size", "<=", "0", ":", "raise", "SimOperationError", "(", "\"Can't pack from or to zero or negative size\"", "%",...
Generic pack with unsigned saturation. Split args in chunks of src_size signed bits and in pack them into unsigned saturated chunks of dst_size bits. Then chunks are concatenated resulting in a BV of len(args)*dst_size//src_size*len(args[0]) bits.
[ "Generic", "pack", "with", "unsigned", "saturation", ".", "Split", "args", "in", "chunks", "of", "src_size", "signed", "bits", "and", "in", "pack", "them", "into", "unsigned", "saturated", "chunks", "of", "dst_size", "bits", ".", "Then", "chunks", "are", "co...
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/vex/irop.py#L816-L835
train
Generic pack with unsigned saturation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/engines/vex/irop.py
SimIROp._op_generic_StoU_saturation
def _op_generic_StoU_saturation(self, value, min_value, max_value): #pylint:disable=no-self-use """ Return unsigned saturated BV from signed BV. Min and max value should be unsigned. """ return claripy.If( claripy.SGT(value, max_value), max_value, ...
python
def _op_generic_StoU_saturation(self, value, min_value, max_value): #pylint:disable=no-self-use """ Return unsigned saturated BV from signed BV. Min and max value should be unsigned. """ return claripy.If( claripy.SGT(value, max_value), max_value, ...
[ "def", "_op_generic_StoU_saturation", "(", "self", ",", "value", ",", "min_value", ",", "max_value", ")", ":", "#pylint:disable=no-self-use", "return", "claripy", ".", "If", "(", "claripy", ".", "SGT", "(", "value", ",", "max_value", ")", ",", "max_value", ","...
Return unsigned saturated BV from signed BV. Min and max value should be unsigned.
[ "Return", "unsigned", "saturated", "BV", "from", "signed", "BV", ".", "Min", "and", "max", "value", "should", "be", "unsigned", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/vex/irop.py#L837-L845
train
Return unsigned saturated BV from signed BV.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_soot.py
CFGFastSoot._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 if self._a...
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 if self._a...
[ "def", "_scan_block", "(", "self", ",", "cfg_job", ")", ":", "addr", "=", "cfg_job", ".", "addr", "current_func_addr", "=", "cfg_job", ".", "func_addr", "if", "self", ".", "_addr_hooked_or_syscall", "(", "addr", ")", ":", "entries", "=", "self", ".", "_sca...
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_soot.py#L299-L317
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_soot.py
CFGFastSoot._scan_soot_block
def _scan_soot_block(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_soot_block(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_soot_block", "(", "self", ",", "cfg_job", ",", "current_func_addr", ")", ":", "addr", ",", "function_addr", ",", "cfg_node", ",", "soot_block", "=", "self", ".", "_generate_cfgnode", "(", "cfg_job", ",", "current_func_addr", ")", "# Add edges going t...
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_soot.py#L319-L369
train
Scan the Soot block for successors and create a list of entries.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_fast_soot.py
CFGFastSoot._create_jobs
def _create_jobs(self, target, jumpkind, current_function_addr, soot_block, addr, cfg_node, stmt_addr, stmt_idx): # pylint:disable=arguments-differ """ 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 :pa...
python
def _create_jobs(self, target, jumpkind, current_function_addr, soot_block, addr, cfg_node, stmt_addr, stmt_idx): # pylint:disable=arguments-differ """ 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 :pa...
[ "def", "_create_jobs", "(", "self", ",", "target", ",", "jumpkind", ",", "current_function_addr", ",", "soot_block", ",", "addr", ",", "cfg_node", ",", "stmt_addr", ",", "stmt_idx", ")", ":", "# pylint:disable=arguments-differ", "target_addr", "=", "target", "jobs...
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_soot.py#L371-L443
train
Create a list of CFGJobs that are needed to perform a function call or exit.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/analyses/cfg/cfg_fast_soot.py
CFGFastSoot.make_functions
def make_functions(self): """ Revisit the entire control flow graph, create Function instances accordingly, and correctly put blocks into each function. Although Function objects are crated during the CFG recovery, they are neither sound nor accurate. With a pre-constructed CFG,...
python
def make_functions(self): """ Revisit the entire control flow graph, create Function instances accordingly, and correctly put blocks into each function. Although Function objects are crated during the CFG recovery, they are neither sound nor accurate. With a pre-constructed CFG,...
[ "def", "make_functions", "(", "self", ")", ":", "tmp_functions", "=", "self", ".", "kb", ".", "functions", ".", "copy", "(", ")", "for", "function", "in", "tmp_functions", ".", "values", "(", ")", ":", "function", ".", "mark_nonreturning_calls_endpoints", "(...
Revisit the entire control flow graph, create Function instances accordingly, and correctly put blocks into each function. Although Function objects are crated during the CFG recovery, they are neither sound nor accurate. With a pre-constructed CFG, this method rebuilds all functions bearing th...
[ "Revisit", "the", "entire", "control", "flow", "graph", "create", "Function", "instances", "accordingly", "and", "correctly", "put", "blocks", "into", "each", "function", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast_soot.py#L445-L552
train
Revisit the entire control flow graph and create Function instances accordingly.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
angr/angr
angr/engines/soot/values/thisref.py
SimSootValue_ThisRef.set_field
def set_field(self, state, field_name, field_type, value): """ Sets an instance field. """ field_ref = SimSootValue_InstanceFieldRef.get_ref(state=state, obj_alloc_id=self.heap_alloc_id, ...
python
def set_field(self, state, field_name, field_type, value): """ Sets an instance field. """ field_ref = SimSootValue_InstanceFieldRef.get_ref(state=state, obj_alloc_id=self.heap_alloc_id, ...
[ "def", "set_field", "(", "self", ",", "state", ",", "field_name", ",", "field_type", ",", "value", ")", ":", "field_ref", "=", "SimSootValue_InstanceFieldRef", ".", "get_ref", "(", "state", "=", "state", ",", "obj_alloc_id", "=", "self", ".", "heap_alloc_id", ...
Sets an instance field.
[ "Sets", "an", "instance", "field", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/soot/values/thisref.py#L35-L45
train
Sets the value of the specified field in 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/soot/values/thisref.py
SimSootValue_ThisRef.get_field
def get_field(self, state, field_name, field_type): """ Gets the value of an instance field. """ # get field reference field_ref = SimSootValue_InstanceFieldRef.get_ref(state=state, obj_alloc_id=self.heap_alloc_id, ...
python
def get_field(self, state, field_name, field_type): """ Gets the value of an instance field. """ # get field reference field_ref = SimSootValue_InstanceFieldRef.get_ref(state=state, obj_alloc_id=self.heap_alloc_id, ...
[ "def", "get_field", "(", "self", ",", "state", ",", "field_name", ",", "field_type", ")", ":", "# get field reference", "field_ref", "=", "SimSootValue_InstanceFieldRef", ".", "get_ref", "(", "state", "=", "state", ",", "obj_alloc_id", "=", "self", ".", "heap_al...
Gets the value of an instance field.
[ "Gets", "the", "value", "of", "an", "instance", "field", "." ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/soot/values/thisref.py#L47-L58
train
Gets the value of an instance field.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/soot/values/thisref.py
SimSootValue_ThisRef.store_field
def store_field(self, state, field_name, field_type, value): """ Store a field of a given object, without resolving hierachy :param state: angr state where we want to allocate the object attribute :type SimState :param field_name: name of the attribute :type str ...
python
def store_field(self, state, field_name, field_type, value): """ Store a field of a given object, without resolving hierachy :param state: angr state where we want to allocate the object attribute :type SimState :param field_name: name of the attribute :type str ...
[ "def", "store_field", "(", "self", ",", "state", ",", "field_name", ",", "field_type", ",", "value", ")", ":", "field_ref", "=", "SimSootValue_InstanceFieldRef", "(", "self", ".", "heap_alloc_id", ",", "self", ".", "type", ",", "field_name", ",", "field_type",...
Store a field of a given object, without resolving hierachy :param state: angr state where we want to allocate the object attribute :type SimState :param field_name: name of the attribute :type str :param field_value: attibute's value :type SimSootValue
[ "Store", "a", "field", "of", "a", "given", "object", "without", "resolving", "hierachy" ]
4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40
https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/soot/values/thisref.py#L60-L72
train
Store a field of a given object in the state s 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...