Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias TryExcept body ImportFrom alias identifier handlers ExceptHandler type NameLoad body Pass ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr BoolOpOr NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Slice Assign AttributeStore NameLoad attr BinOpAdd ListLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BoolOpOr NameLoad ListLoad For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad For TupleStore NameStore NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad Str If CompareEq SubscriptLoad NameLoad Slice Num Str body Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore Call AttributeLoad Call NameLoad NameLoad Str attr Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str With Call NameLoad AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Str Assign NameStore ListLoad Str Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Str Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr keyword ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad For NameStore ListLoad Str Str Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Str body Pass handlers ExceptHandler type NameLoad body Pass With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr BinOpMod Str Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr BoolOpOr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword Str keyword NameLoad keyword NameLoad decorator_list decorator_list Assign AttributeStore NameLoad attr Call NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad Str Str Str Str Str Str Assign NameStore ListLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword Lambda arguments args NameParam defaults AttributeLoad NameLoad attr body If CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Continue If CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore ListLoad For NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad Str attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr For NameStore NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad keyword AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse If UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad keyword AttributeLoad NameLoad attr If BoolOpOr CompareIs NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str For NameStore ListLoad Str body If Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword Str body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str If BoolOpAnd NameLoad NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Raise Call NameLoad Str orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad For NameStore Call AttributeLoad NameLoad attr Str body If Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Str body Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index Str If CompareIn Str Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str If UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str body Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index Str If UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str body Expr Call AttributeLoad NameLoad attr Str If BoolOpAnd NameLoad NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Raise Call NameLoad Str orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str attr Str Assign NameStore SubscriptLoad NameLoad Slice Call NameLoad NameLoad AugAssignAdd NameStore BinOpMult Str BinOpSub Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Num While Num body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareLt NameLoad Num body Return Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BinOpAdd AttributeLoad NameLoad attr ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Assign NameStore Str If CompareEq Str Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad For NameStore ListLoad Str Str Str Str Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad BinOpMod Str AttributeLoad NameLoad attr NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Break Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body If CompareNotIn NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad Call NameLoad NameLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Assign NameStore BinOpAdd AttributeLoad NameLoad attr ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad For NameStore Call AttributeLoad NameLoad attr body If CompareNotEq NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad Str attr If CompareNotIn Str NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Num Index Num Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str BinOpSub NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Assign NameStore BinOpAdd AttributeLoad NameLoad attr ListLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str TupleLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str NameLoad Assign NameStore BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str ListLoad TupleLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Assign NameStore Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr Str Return With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr body If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str body Expr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameLoad Continue Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd ListLoad Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr NameLoad With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str TryFinally body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad NameLoad Str Str Str BinOpMod Str NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If CompareNotIn Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Raise Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore ListLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad finalbody TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Assign NameStore Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr Str Return With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr body If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str body Expr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameLoad Continue Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore BinOpMod Str TupleLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr If CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Assign NameStore BinOpAdd ListLoad Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore Str If Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad keyword NameLoad orelse Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr If CompareEq NameLoad Str body Assign NameStore Str Assign NameStore ListLoad NameLoad Str BinOpAdd Str NameLoad Str NameLoad Str NameLoad Str NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Raise Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Num Index Num Assign NameStore BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list
N/A N/A Classes for handling build and repackaging of clients.

This handles invocations for the build across the supported platforms including
handling Visual Studio, pyinstaller and other packaging mechanisms.
 N/A cStringIO N/A logging N/A os N/A shutil N/A struct N/A subprocess N/A zipfile N/A N/A PyInstaller __main__ PyInstallerMain N/A N/A N/A ImportError N/A N/A grr.lib config_lib grr.lib rdfvalue grr.lib utils grr.lib.rdfvalues client rdf_client BuilderBase N/A object N/A N/A A base class for builder / deployer that provides utility functions. __init__ N/A N/A self context N/A None N/A N/A N/A self context N/A context N/A N/A N/A config_lib CONFIG context N/A N/A N/A self context N/A N/A ClientBuilder Context N/A self context N/A GenerateDirectory N/A N/A self input_dir output_dir replacements N/A None None None N/A N/A input_dir N/A N/A utils NormalizePath input_dir N/A output_dir N/A N/A utils NormalizePath output_dir N/A replacements N/A replacements N/A N/A N/A root _ files N/A N/A os walk input_dir N/A N/A filename files N/A N/A in_file N/A N/A utils JoinPath root filename N/A out_file N/A N/A in_file replace input_dir output_dir N/A N/A s replacement replacements N/A N/A out_file N/A N/A out_file replace s replacement N/A N/A N/A utils EnsureDirExists N/A N/A N/A os path dirname out_file N/A N/A N/A self GenerateFile in_file out_file N/A GenerateFile N/A N/A self input_filename output_filename N/A None None N/A N/A Generates a file from a template, interpolating config values. N/A N/A input_filename None N/A N/A input_filename N/A output_filename .in N/A N/A N/A output_filename N/A -3 .in N/A N/A output_filename N/A output_filename N/A -3 N/A data N/A N/A N/A open input_filename rb read N/A N/A N/A logging debug Generating file %s from %s output_filename input_filename N/A N/A open output_filename wb fd N/A N/A N/A N/A fd write N/A N/A N/A config_lib CONFIG InterpolateValue data context N/A self context N/A N/A ClientBuilder N/A BuilderBase N/A N/A A client builder is responsible for building the binary template.

  This is an abstract client builder class, used by the OS specific
  implementations. Note that client builders typically run on the target
  operating system.
   MakeBuildDirectory N/A N/A self N/A N/A N/A Prepares the build directory. N/A N/A self build_dir N/A N/A N/A config_lib CONFIG Get PyInstaller.build_dir context N/A self context N/A N/A self work_path N/A N/A N/A config_lib CONFIG Get PyInstaller.workpath_dir context N/A self context N/A N/A N/A self CleanDirectory N/A self build_dir N/A N/A N/A self CleanDirectory N/A self work_path N/A CleanDirectory N/A N/A self directory N/A N/A N/A N/A N/A logging info Clearing directory %s directory N/A N/A N/A N/A N/A shutil rmtree directory N/A N/A N/A OSError N/A N/A N/A N/A N/A utils EnsureDirExists directory N/A BuildWithPyInstaller N/A N/A self N/A N/A N/A Use pyinstaller to build a client package. N/A N/A N/A self CleanDirectory N/A N/A N/A config_lib CONFIG Get PyInstaller.distpath context N/A self context N/A N/A N/A logging info Copying pyinstaller support files N/A N/A self spec_file N/A N/A N/A os path join N/A self build_dir grr.spec N/A N/A open N/A self spec_file wb fd N/A N/A N/A N/A fd write N/A N/A N/A config_lib CONFIG Get PyInstaller.spec context N/A self context N/A N/A open N/A N/A N/A os path join N/A self build_dir version.txt wb fd N/A N/A N/A N/A fd write N/A N/A N/A config_lib CONFIG Get PyInstaller.version context N/A self context N/A N/A open N/A N/A N/A os path join N/A self build_dir grr.ico wb fd N/A N/A N/A N/A fd write N/A N/A N/A config_lib CONFIG Get PyInstaller.icon context N/A self context N/A N/A self output_dir N/A N/A N/A os path join N/A N/A N/A config_lib CONFIG Get PyInstaller.distpath context N/A self context grr-client N/A args N/A --distpath N/A str N/A N/A N/A config_lib CONFIG Get PyInstaller.distpath context N/A self context --workpath N/A str N/A N/A N/A config_lib CONFIG Get PyInstaller.workpath_dir context N/A self context N/A str N/A self spec_file N/A N/A N/A logging info Running pyinstaller: %s args N/A N/A N/A PyInstallerMain run pyi_args N/A N/A N/A utils SmartStr x N/A x args N/A path N/A tcl tk pytz N/A N/A dir_path N/A N/A N/A os path join N/A self output_dir path N/A N/A N/A N/A N/A shutil rmtree dir_path N/A N/A N/A os mkdir dir_path N/A N/A open N/A N/A N/A os path join dir_path path wb N/A N/A N/A N/A N/A OSError N/A N/A N/A N/A open N/A N/A N/A os path join N/A self output_dir build.yaml w fd N/A N/A N/A N/A fd write N/A Client.build_environment: %s
 N/A N/A N/A N/A N/A rdf_client Uname FromCurrentSystem signature N/A N/A N/A fd write N/A Client.build_time: '%s'
 N/A str N/A N/A N/A N/A rdfvalue RDFDatetime Now N/A CopyMissingModules N/A N/A self N/A N/A N/A Copy any additional DLLs that cant be found. N/A MakeExecutableTemplate N/A N/A self output_file N/A None N/A N/A Create the executable template.

    Args:
      output_file: string filename where we will write the template.

    The client is build in two phases. First an executable template is created
    with the client binaries contained inside a zip file. Then the installation
    package is created by appending the SFX extractor to this template and
    writing a config file into the zip file.

    This technique allows the client build to be carried out once on the
    supported platform (e.g. windows with MSVS), but the deployable installer
    can be build on any platform which supports python.

    Subclasses for each OS do the actual work, we just make sure the output
    directory is set up correctly here.
     N/A N/A self template_file N/A output_file N/A N/A N/A config_lib CONFIG Get ClientBuilder.template_path context N/A self context N/A N/A N/A utils EnsureDirExists N/A N/A N/A os path dirname N/A self template_file N/A MakeZip N/A N/A self input_dir output_file N/A N/A N/A Creates a ZIP archive of the files in the input directory.

    Args:
      input_dir: the name of the input directory.
      output_file: the name of the output ZIP archive without extension.
     N/A N/A N/A logging info Generating zip template file at %s output_file N/A N/A basename _ N/A N/A N/A os path splitext output_file N/A N/A N/A shutil make_archive basename zip base_dir . root_dir input_dir verbose True N/A N/A N/A N/A ClientBuilder classes N/A globals ClientDeployer N/A BuilderBase N/A N/A Takes the binary template and producing an installer.

  Note that this should be runnable on all operating systems.
   N/A CONFIG_SECTIONS N/A CA Client Logging Config Nanny Installer N/A SKIP_OPTION_LIST N/A Client.private_key __init__ N/A N/A self context signer N/A None None N/A N/A N/A N/A N/A super ClientDeployer self __init__ context context N/A N/A self signer signer N/A MergeBuildConfig N/A N/A self fd data N/A None None N/A N/A data N/A N/A N/A N/A config_lib YamlParser fd fd data data RawData N/A N/A N/A N/A config_lib CONFIG MergeData data N/A GetClientConfig N/A N/A self context validate N/A True N/A N/A Generates the client config file for inclusion in deployable binaries. N/A N/A N/A utils TempDirectory tmp_dir N/A N/A filename N/A N/A N/A os path join tmp_dir N/A N/A N/A config_lib CONFIG Get ClientBuilder.config_filename context context N/A new_config N/A N/A N/A config_lib CONFIG MakeNewConfig N/A N/A N/A new_config Initialize reset True data N/A N/A N/A new_config SetWriteBack filename N/A descriptor N/A sorted N/A N/A config_lib CONFIG type_infos key N/A N/A N/A x N/A N/A x name N/A N/A N/A N/A descriptor name N/A self SKIP_OPTION_LIST N/A N/A N/A N/A N/A descriptor section N/A self CONFIG_SECTIONS N/A N/A value N/A N/A N/A config_lib CONFIG GetRaw N/A descriptor name context context default None N/A N/A value None N/A N/A N/A N/A logging debug Copying config option to client: %s N/A descriptor name N/A N/A N/A new_config SetRaw N/A descriptor name value N/A N/A N/A new_config Set Client.deploy_time N/A str N/A N/A N/A N/A rdfvalue RDFDatetime Now N/A plugins N/A N/A plugin N/A N/A config_lib CONFIG N/A Client.plugins N/A N/A N/A N/A plugins append N/A N/A N/A os path basename plugin N/A N/A N/A new_config SetRaw Client.plugins plugins N/A N/A N/A new_config Write N/A validate N/A N/A N/A N/A self ValidateEndConfig new_config N/A N/A N/A N/A open filename rb read N/A ValidateEndConfig N/A N/A self config errors_fatal N/A True N/A N/A Given a generated client config, attempt to check for common errors. N/A errors N/A N/A location N/A N/A config Get Client.server_urls context N/A self context N/A url location N/A N/A N/A N/A N/A url startswith http N/A N/A N/A N/A errors append N/A Bad Client.server_urls specified %s url N/A key_data N/A N/A config GetRaw Client.executable_signing_public_key default None context N/A self context N/A N/A key_data None N/A N/A N/A N/A errors append Missing Client.executable_signing_public_key. N/A N/A N/A N/A N/A key_data startswith -----BEGIN PUBLIC N/A N/A N/A N/A errors append N/A Invalid Client.executable_signing_public_key: %s key_data N/A certificate N/A N/A config GetRaw CA.certificate default None context N/A self context N/A N/A N/A certificate None N/A N/A N/A certificate startswith -----BEGIN CERTIF N/A N/A N/A N/A errors append CA certificate missing from config. N/A bad_opt N/A Client.private_key N/A N/A N/A N/A config Get bad_opt context N/A self context default N/A N/A N/A N/A errors append N/A Client cert in conf, this should be empty at deployment %s bad_opt N/A N/A N/A N/A config Get Client.build_environment N/A N/A N/A N/A errors append Client has no build environment set, components will not work. N/A N/A errors_fatal errors N/A N/A error errors N/A N/A N/A N/A logging error Build Config Error: %s error N/A N/A RuntimeError Bad configuration generated. Terminating. N/A N/A errors N/A MakeDeployableBinary N/A N/A self template_path output_path N/A None N/A N/A Use the template to create a customized installer. N/A RepackInstaller N/A N/A self payload_data output_path N/A None N/A N/A Takes a template and simply repacks the installer stub on it. N/A N/A WindowsClientDeployer N/A ClientDeployer N/A N/A Repackages windows installers. ValidateEndConfig N/A N/A self config errors_fatal N/A True N/A N/A Windows specific config validations. N/A errors N/A N/A N/A super WindowsClientDeployer self ValidateEndConfig config errors_fatal errors_fatal N/A path N/A N/A config GetRaw Client.tempdir_roots N/A N/A N/A N/A path startswith / N/A N/A N/A N/A errors append N/A Client.tempdir_root %s starts with /, probably has Unix path. path N/A N/A N/A N/A N/A config GetRaw Logging.path startswith / N/A N/A N/A N/A errors append N/A Logging.path starts with /, probably has Unix path. %s N/A config N/A Logging.path N/A N/A Windows\ N/A N/A config GetRaw Logging.path N/A N/A N/A N/A errors append Windows in Logging.path, you probably want %(WINDIR|env) instead N/A N/A N/A N/A N/A config N/A Client.binary_name endswith .exe N/A N/A N/A N/A errors append N/A Missing .exe extension on binary_name %s N/A config N/A Client.binary_name N/A N/A N/A N/A N/A config N/A Nanny.binary endswith .exe N/A N/A N/A N/A errors append Missing .exe extension on nanny_binary N/A N/A errors_fatal errors N/A N/A error errors N/A N/A N/A N/A logging error Build Config Error: %s error N/A N/A RuntimeError Bad configuration generated. Terminating. N/A N/A errors N/A InterpolateVariableInBinary N/A N/A self stream parameter N/A N/A N/A Replace magic strings in the binary with config parameters. N/A pattern N/A <---------------- %s -------------------> parameter N/A pattern N/A N/A pattern encode utf_16_le N/A replacement N/A N/A N/A config_lib CONFIG Get parameter context N/A self context N/A replacement N/A N/A N/A N/A utils SmartStr N/A replacement encode utf_16_le N/A replacement N/A replacement N/A N/A len pattern N/A replacement N/A N/A N/A len pattern N/A len replacement N/A start 0 N/A 1 N/A N/A offset N/A N/A N/A N/A stream getvalue find pattern start N/A N/A offset 0 N/A N/A N/A N/A N/A stream seek offset N/A N/A N/A stream write replacement N/A Sign N/A N/A self inbuf N/A N/A N/A N/A self signer N/A N/A N/A N/A N/A self signer SignBuffer inbuf N/A inbuf N/A MakeDeployableBinary N/A N/A self template_path output_path N/A None N/A N/A Repackage the template zip with the installer. N/A context N/A N/A self context N/A Client Context N/A zip_data N/A N/A cStringIO StringIO N/A output_zip N/A N/A zipfile ZipFile zip_data mode w compression N/A zipfile ZIP_DEFLATED N/A z_template N/A N/A zipfile ZipFile N/A open template_path rb N/A completed_files N/A N/A client_bin_name N/A N/A N/A config_lib CONFIG Get Client.binary_name context context N/A extension N/A N/A windows N/A N/A N/A config_lib CONFIG Get Client.platform context context N/A N/A extension .exe N/A bin_name N/A N/A z_template getinfo N/A grr-client extension N/A bin_dat N/A N/A cStringIO StringIO N/A N/A N/A bin_dat write N/A N/A z_template read bin_name N/A N/A SetPeSubsystem bin_dat console N/A N/A N/A config_lib CONFIG Get ClientBuilder.console context context N/A parameter N/A Client.company_name Client.description Client.name Client.version_string ClientBuilder.package_name N/A N/A N/A N/A self InterpolateVariableInBinary bin_dat parameter N/A N/A N/A output_zip writestr client_bin_name N/A N/A self Sign N/A N/A bin_dat getvalue N/A N/A CopyFileInZip z_template N/A %s.manifest N/A bin_name filename output_zip N/A %s.manifest client_bin_name N/A N/A N/A completed_files append N/A bin_name filename N/A N/A N/A completed_files append N/A %s.manifest N/A bin_name filename N/A name N/A N/A z_template namelist N/A N/A N/A N/A N/A N/A os path basename name build.yaml N/A N/A data N/A N/A z_template read name N/A N/A N/A self MergeBuildConfig data data N/A N/A N/A completed_files append name N/A N/A service_template N/A N/A z_template getinfo GRRservice.exe N/A service_bin_dat N/A N/A cStringIO StringIO N/A N/A N/A service_bin_dat write N/A N/A z_template read service_template N/A N/A SetPeSubsystem service_bin_dat console N/A N/A N/A config_lib CONFIG Get ClientBuilder.console context context N/A service_bin_name N/A N/A N/A config_lib CONFIG Get Nanny.service_binary_name context context N/A N/A N/A output_zip writestr service_bin_name N/A N/A self Sign N/A N/A service_bin_dat getvalue N/A N/A N/A completed_files append N/A service_template filename N/A template_file N/A N/A z_template namelist N/A N/A N/A template_file completed_files N/A N/A N/A CopyFileInZip z_template template_file output_zip N/A plugin N/A N/A N/A config_lib CONFIG Get Client.plugins context context N/A N/A N/A N/A logging debug Adding plugin %s to package. plugin N/A N/A N/A output_zip writestr N/A N/A N/A os path basename plugin N/A N/A N/A open plugin rb read N/A zipfile ZIP_STORED N/A N/A N/A output_zip close N/A N/A N/A self RepackInstaller N/A N/A zip_data getvalue output_path N/A RepackInstaller N/A N/A self payload_data output_path N/A None N/A N/A Repack the installer into the payload.

    Args:
      payload_data: data payload for zip file
      output_path: filename for the zip output
    Raises:
      RuntimeError: if the ClientBuilder.unzipsfx_stub doesn't require admin.
    Returns:
      output_path: filename string of zip output file
     N/A N/A output_path None N/A N/A output_path N/A N/A N/A config_lib CONFIG Get ClientBuilder.output_path context N/A self context N/A context N/A N/A self context N/A Client Context N/A src_zip N/A N/A zipfile ZipFile N/A N/A cStringIO StringIO payload_data mode r N/A zip_data N/A N/A cStringIO StringIO N/A output_zip N/A N/A zipfile ZipFile zip_data mode w compression N/A zipfile ZIP_DEFLATED N/A config_file_name N/A N/A N/A config_lib CONFIG Get ClientBuilder.config_filename context context N/A template_file N/A N/A src_zip namelist N/A N/A N/A template_file config_file_name N/A N/A N/A CopyFileInZip src_zip template_file output_zip N/A client_config_content N/A N/A self GetClientConfig context N/A N/A N/A output_zip writestr config_file_name client_config_content compress_type N/A zipfile ZIP_STORED N/A N/A output_zip comment N/A $AUTORUN$>%s N/A N/A N/A config_lib CONFIG Get ClientBuilder.autorun_command_line context context N/A N/A N/A output_zip close N/A N/A N/A utils EnsureDirExists N/A N/A N/A os path dirname output_path N/A N/A open output_path wb fd N/A N/A stub_data N/A N/A cStringIO StringIO N/A unzipsfx_stub N/A N/A N/A config_lib CONFIG Get ClientBuilder.unzipsfx_stub context context N/A stub_raw N/A N/A N/A open unzipsfx_stub rb read N/A N/A level="requireAdministrator stub_raw N/A N/A N/A RuntimeError Bad unzip binary in use. Not compiled with therequireAdministrator manifest option. N/A N/A N/A stub_data write stub_raw N/A N/A SetPeSubsystem stub_data console N/A N/A N/A config_lib CONFIG Get ClientBuilder.console context context N/A end_of_file N/A N/A N/A zip_data tell N/A N/A stub_data tell N/A offset_to_rsrc N/A N/A N/A N/A stub_data getvalue find .rsrc N/A N/A N/A stub_data seek N/A offset_to_rsrc 20 N/A start_of_rsrc_section N/A N/A N/A struct unpack <I N/A N/A stub_data read 4 N/A 0 N/A N/A N/A stub_data seek N/A offset_to_rsrc 16 N/A N/A N/A stub_data write N/A N/A struct pack <I N/A end_of_file start_of_rsrc_section N/A out_data N/A N/A cStringIO StringIO N/A N/A N/A out_data write N/A N/A stub_data getvalue N/A N/A N/A out_data write N/A N/A zip_data getvalue N/A N/A N/A fd write N/A N/A self Sign N/A N/A out_data getvalue N/A N/A N/A logging info Deployable binary generated at %s output_path N/A output_path N/A N/A DarwinClientDeployer N/A ClientDeployer N/A N/A Repackage OSX clients. MakeDeployableBinary N/A N/A self template_path output_path N/A None N/A N/A This will add the config to the client template. N/A N/A output_path None N/A N/A output_path N/A N/A N/A config_lib CONFIG Get ClientBuilder.output_path context N/A self context N/A context N/A N/A self context N/A Client Context N/A N/A N/A utils EnsureDirExists N/A N/A N/A os path dirname output_path N/A N/A N/A N/A config_lib CONFIG Set Client.build_environment Darwin_OSX___amd64 N/A client_config_data N/A N/A self GetClientConfig context N/A N/A N/A shutil copyfile template_path output_path N/A zip_file N/A N/A zipfile ZipFile output_path mode a N/A zip_info N/A N/A zipfile ZipInfo filename config.yaml N/A N/A N/A zip_file writestr zip_info client_config_data N/A N/A N/A zip_file close N/A output_path N/A N/A LinuxClientDeployer N/A ClientDeployer N/A N/A Repackage Linux templates. GenerateDPKGFiles N/A N/A self template_path N/A N/A N/A Generates the files needed by dpkg-buildpackage. N/A template_binary_dir N/A N/A N/A os path join template_path dist/debian/grr-client N/A package_name N/A N/A N/A config_lib CONFIG Get ClientBuilder.package_name context N/A self context N/A target_binary_dir N/A N/A N/A os path join template_path N/A dist/debian/%s%s N/A package_name N/A N/A N/A config_lib CONFIG Get ClientBuilder.target_dir context N/A self context N/A N/A package_name grr-client N/A N/A N/A N/A shutil move template_binary_dir N/A %s-template template_binary_dir N/A template_binary_dir N/A %s-template template_binary_dir N/A N/A N/A utils EnsureDirExists N/A N/A N/A os path dirname target_binary_dir N/A N/A N/A shutil move template_binary_dir target_binary_dir N/A N/A N/A shutil move N/A N/A N/A os path join target_binary_dir grr-client N/A N/A N/A os path join target_binary_dir N/A N/A N/A config_lib CONFIG Get Client.binary_name context N/A self context N/A deb_in_dir N/A N/A N/A os path join template_path dist/debian/debian.in/ N/A N/A N/A self GenerateDirectory deb_in_dir N/A N/A N/A os path join template_path dist/debian N/A N/A grr-client package_name N/A N/A N/A utils EnsureDirExists N/A N/A N/A os path join template_path N/A dist/debian/%s/usr/sbin package_name N/A N/A N/A self GenerateFile N/A N/A N/A os path join template_path dist/debian/upstart.in/grr-client.conf N/A N/A N/A os path join template_path N/A dist/debian/%s.upstart package_name N/A N/A N/A self GenerateFile N/A N/A N/A os path join template_path dist/debian/initd.in/grr-client N/A N/A N/A os path join template_path N/A dist/debian/%s.init package_name N/A N/A N/A self GenerateFile N/A N/A N/A os path join template_path dist/debian/systemd.in/grr-client.service N/A N/A N/A os path join template_path N/A dist/debian/%s.service package_name N/A N/A N/A shutil rmtree deb_in_dir N/A N/A N/A shutil rmtree N/A N/A N/A os path join template_path dist/debian/upstart.in N/A N/A N/A shutil rmtree N/A N/A N/A os path join template_path dist/debian/initd.in N/A N/A N/A shutil rmtree N/A N/A N/A os path join template_path dist/debian/systemd.in N/A MakeDeployableBinary N/A N/A self template_path output_path N/A None N/A N/A This will add the config to the client template and create a .deb. N/A N/A output_path None N/A N/A output_path N/A N/A N/A config_lib CONFIG Get ClientBuilder.output_path context N/A self context N/A buildpackage_binary /usr/bin/dpkg-buildpackage N/A N/A N/A N/A N/A os path exists buildpackage_binary N/A N/A N/A N/A logging error dpkg-buildpackage not found, unable to repack client. N/A N/A N/A N/A utils TempDirectory tmp_dir N/A N/A template_dir N/A N/A N/A os path join tmp_dir dist N/A N/A N/A utils EnsureDirExists template_dir N/A zf N/A N/A zipfile ZipFile template_path N/A name N/A N/A zf namelist N/A N/A N/A N/A N/A N/A os path basename name build.yaml N/A N/A N/A N/A self MergeBuildConfig data N/A N/A zf read name N/A N/A dirname N/A N/A N/A os path dirname name N/A N/A N/A utils EnsureDirExists N/A N/A N/A os path join template_dir dirname N/A N/A open N/A N/A N/A os path join template_dir name wb fd N/A N/A N/A N/A fd write N/A N/A zf read name N/A N/A N/A self GenerateDPKGFiles tmp_dir N/A client_context N/A N/A Client Context N/A self context N/A client_config_content N/A N/A self GetClientConfig client_context N/A target_dir N/A N/A N/A N/A N/A config_lib CONFIG Get ClientBuilder.target_dir context N/A self context lstrip / N/A agent_dir N/A N/A N/A os path join template_dir debian N/A N/A N/A config_lib CONFIG Get ClientBuilder.package_name context N/A self context target_dir N/A N/A open N/A N/A N/A os path join agent_dir N/A N/A N/A config_lib CONFIG Get ClientBuilder.config_filename context N/A self context wb fd N/A N/A N/A N/A fd write client_config_content N/A N/A N/A os chmod N/A N/A N/A os path join agent_dir N/A N/A N/A config_lib CONFIG Get Client.binary_name context N/A self context 493 N/A arch N/A N/A N/A config_lib CONFIG Get Client.arch context N/A self context N/A N/A N/A old_working_dir N/A N/A os getcwd N/A N/A N/A OSError N/A N/A old_working_dir N/A N/A N/A os environ get HOME /tmp N/A N/A N/A N/A N/A os chdir template_dir N/A command N/A buildpackage_binary -uc -d -b N/A -a%s arch N/A N/A N/A N/A N/A subprocess check_output command stderr N/A subprocess STDOUT N/A N/A N/A N/A subprocess CalledProcessError N/A e N/A N/A N/A Failed to sign N/A e output N/A N/A N/A N/A logging error Error calling %s. command N/A N/A N/A logging error N/A e output N/A N/A filename_base N/A N/A N/A config_lib CONFIG Get ClientBuilder.debian_package_base context N/A self context N/A output_base N/A N/A N/A config_lib CONFIG Get ClientBuilder.output_basename context N/A self context N/A N/A N/A utils EnsureDirExists N/A N/A N/A os path dirname output_path N/A extension N/A .changes N/A N/A N/A config_lib CONFIG Get ClientBuilder.output_extension context N/A self context N/A N/A input_name N/A %s%s N/A filename_base extension N/A output_name N/A %s%s N/A output_base extension N/A N/A N/A shutil move N/A N/A N/A os path join tmp_dir input_name N/A N/A N/A os path join N/A N/A N/A os path dirname output_path output_name N/A N/A N/A logging info Created package %s output_path N/A output_path N/A N/A N/A N/A N/A N/A os chdir old_working_dir N/A N/A N/A OSError N/A N/A N/A N/A CentosClientDeployer N/A LinuxClientDeployer N/A N/A Repackages Linux RPM templates. Sign N/A N/A self rpm_filename N/A N/A N/A N/A self signer N/A N/A N/A N/A N/A self signer AddSignatureToRPM rpm_filename N/A MakeDeployableBinary N/A N/A self template_path output_path N/A None N/A N/A This will add the config to the client template and create a .rpm. N/A N/A output_path None N/A N/A output_path N/A N/A N/A config_lib CONFIG Get ClientBuilder.output_path context N/A self context N/A rpmbuild_binary /usr/bin/rpmbuild N/A N/A N/A N/A N/A os path exists rpmbuild_binary N/A N/A N/A N/A logging error rpmbuild not found, unable to repack client. N/A N/A N/A N/A utils TempDirectory tmp_dir N/A N/A template_dir N/A N/A N/A os path join tmp_dir dist N/A N/A N/A utils EnsureDirExists template_dir N/A zf N/A N/A zipfile ZipFile template_path N/A name N/A N/A zf namelist N/A N/A N/A N/A N/A N/A os path basename name build.yaml N/A N/A N/A N/A self MergeBuildConfig data N/A N/A zf read name N/A N/A dirname N/A N/A N/A os path dirname name N/A N/A N/A utils EnsureDirExists N/A N/A N/A os path join template_dir dirname N/A N/A open N/A N/A N/A os path join template_dir name wb fd N/A N/A N/A N/A fd write N/A N/A zf read name N/A rpm_root_dir N/A N/A N/A os path join tmp_dir rpmbuild N/A rpm_build_dir N/A N/A N/A os path join rpm_root_dir BUILD N/A N/A N/A utils EnsureDirExists rpm_build_dir N/A rpm_buildroot_dir N/A N/A N/A os path join rpm_root_dir BUILDROOT N/A N/A N/A utils EnsureDirExists rpm_buildroot_dir N/A rpm_rpms_dir N/A N/A N/A os path join rpm_root_dir RPMS N/A N/A N/A utils EnsureDirExists rpm_rpms_dir N/A rpm_specs_dir N/A N/A N/A os path join rpm_root_dir SPECS N/A N/A N/A utils EnsureDirExists rpm_specs_dir N/A template_binary_dir N/A N/A N/A os path join tmp_dir dist/rpmbuild/grr-client N/A target_binary_dir N/A %s%s N/A rpm_build_dir N/A N/A N/A config_lib CONFIG Get ClientBuilder.target_dir context N/A self context N/A N/A N/A utils EnsureDirExists N/A N/A N/A os path dirname target_binary_dir N/A N/A N/A N/A N/A shutil rmtree target_binary_dir N/A N/A N/A OSError N/A N/A N/A N/A N/A shutil move template_binary_dir target_binary_dir N/A client_name N/A N/A N/A config_lib CONFIG Get Client.name context N/A self context N/A client_binary_name N/A N/A N/A config_lib CONFIG Get Client.binary_name context N/A self context N/A N/A client_binary_name grr-client N/A N/A N/A N/A shutil move N/A N/A N/A os path join target_binary_dir grr-client N/A N/A N/A os path join target_binary_dir client_binary_name N/A spec_filename N/A N/A N/A os path join rpm_specs_dir N/A %s.spec client_name N/A N/A N/A self GenerateFile N/A N/A N/A os path join tmp_dir dist/rpmbuild/grr.spec.in spec_filename N/A initd_target_filename N/A N/A N/A os path join rpm_build_dir etc/init.d client_name N/A N/A N/A utils EnsureDirExists N/A N/A N/A os path dirname initd_target_filename N/A N/A N/A self GenerateFile N/A N/A N/A os path join tmp_dir dist/rpmbuild/grr-client.initd.in initd_target_filename N/A client_context N/A N/A Client Context N/A self context N/A client_config_content N/A N/A self GetClientConfig client_context N/A N/A open N/A N/A N/A os path join target_binary_dir N/A N/A N/A config_lib CONFIG Get ClientBuilder.config_filename context N/A self context wb fd N/A N/A N/A N/A fd write client_config_content N/A N/A N/A logging info Undoing prelinking. N/A prelink /usr/sbin/prelink N/A N/A N/A os access prelink N/A os X_OK N/A N/A libs N/A N/A N/A os path join target_binary_dir lib* N/A N/A N/A subprocess call N/A %s -u %s 2>/dev/null N/A prelink libs shell True N/A N/A N/A N/A logging info Can't execute %s, skipping. prelink N/A N/A N/A os chmod N/A N/A N/A os path join target_binary_dir client_binary_name 493 N/A client_arch N/A N/A N/A config_lib CONFIG Get Client.arch context N/A self context N/A N/A client_arch amd64 N/A N/A client_arch x86_64 N/A command N/A rpmbuild_binary --define N/A _topdir  rpm_root_dir --target client_arch --buildroot rpm_buildroot_dir -bb spec_filename N/A N/A N/A N/A N/A subprocess check_output command stderr N/A subprocess STDOUT N/A N/A N/A N/A subprocess CalledProcessError N/A e N/A N/A N/A N/A logging error Error calling %s. command N/A N/A N/A logging error N/A e output N/A N/A client_version N/A N/A N/A config_lib CONFIG Get Client.version_string context N/A self context N/A rpm_filename N/A N/A N/A os path join rpm_rpms_dir client_arch N/A %s-%s-1.%s.rpm N/A client_name client_version client_arch N/A N/A N/A utils EnsureDirExists N/A N/A N/A os path dirname output_path N/A N/A N/A shutil move rpm_filename output_path N/A N/A N/A logging info Created package %s output_path N/A N/A N/A self Sign output_path N/A output_path N/A N/A CopyFileInZip N/A N/A from_zip from_name to_zip to_name signer N/A None None N/A N/A Read a file from a ZipFile and write it to a new ZipFile. N/A data N/A N/A from_zip read from_name N/A N/A to_name None N/A N/A to_name from_name N/A signer N/A N/A data N/A N/A signer SignBuffer data N/A N/A N/A to_zip writestr to_name data N/A SetPeSubsystem N/A N/A fd console N/A True N/A N/A Takes file like obj and returns (offset, value) for the PE subsystem. N/A current_pos N/A N/A fd tell N/A N/A N/A fd seek 60 N/A header_offset N/A N/A N/A struct unpack <I N/A N/A fd read 4 N/A 0 N/A subsystem_offset N/A header_offset 92 N/A N/A N/A fd seek subsystem_offset N/A console N/A N/A N/A N/A fd write N/A N/A N/A N/A fd write N/A N/A N/A fd seek current_pos N/A