Module Expr Str Import alias Import alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body If UnaryOpNot NameLoad body Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Assign NameStore Str Assign NameStore Str If NameLoad body Expr Call NameLoad BinOpAdd BinOpAdd NameLoad Str NameLoad NameLoad If NameLoad body Expr Call NameLoad BinOpAdd BinOpAdd NameLoad Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Assign NameStore Str Assign NameStore Str If NameLoad body Expr Call NameLoad BinOpAdd BinOpAdd NameLoad Str NameLoad NameLoad If NameLoad body Expr Call NameLoad BinOpAdd BinOpAdd NameLoad Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad keyword NameLoad Assign TupleStore NameStore NameStore Call NameLoad For NameStore NameLoad body Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad keyword NameLoad For NameStore NameLoad body Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults NameLoad Num body Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad BinOpMod Str NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad BinOpMod Str NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad BinOpMod Str NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Num body Expr Call NameLoad NameLoad NameLoad TryExcept body Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad keyword NameLoad Expr Call NameLoad BinOpMod Str NameLoad keyword NameLoad Expr Call NameLoad BinOpMod Str NameLoad keyword NameLoad Expr Call NameLoad Str NameLoad NameLoad Expr Call NameLoad BinOpMod Str NameLoad keyword NameLoad Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad keyword NameLoad keyword NameLoad decorator_list Assign NameStore Str FunctionDef arguments args NameParam defaults NameLoad body Expr Call NameLoad BinOpMod Str NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad BinOpMod Str NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad BinOpMod Str NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Call NameLoad keyword NameLoad TryExcept body Expr Call NameLoad BinOpMod Str NameLoad keyword NameLoad Expr Call NameLoad Str NameLoad NameLoad Expr Call NameLoad BinOpMod Str NameLoad keyword NameLoad Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad keyword NameLoad decorator_list
N/A N/A 
Copyright 2014 Google Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
 N/A logging N/A subprocess nogotofail.mitm.util.ip get_interface_addresses N/A logger N/A N/A logging getLogger nogotofail.mitm run_command N/A N/A command ignore_failed N/A False N/A N/A N/A N/A _ N/A N/A subprocess check_output command stderr N/A subprocess STDOUT shell True N/A N/A N/A Exception N/A e N/A N/A N/A ignore_failed N/A N/A e N/A run_iptables_cmd N/A N/A command ipv4 ipv6 ignore_failed N/A True False False N/A N/A ipv4_bin iptables N/A ipv6_bin ip6tables N/A ipv4 N/A N/A N/A run_command N/A N/A ipv4_bin command ignore_failed N/A ipv6 N/A N/A N/A run_command N/A N/A ipv6_bin command ignore_failed N/A run_ip_cmd N/A N/A command ipv4 ipv6 ignore_failed N/A True False True N/A N/A ipv4_bin ip -4 N/A ipv6_bin ip -6 N/A ipv4 N/A N/A N/A run_command N/A N/A ipv4_bin command ignore_failed N/A ipv6 N/A N/A N/A run_command N/A N/A ipv6_bin command ignore_failed N/A add_local_bypass N/A N/A table chain ipv6 N/A N/A N/A Add rules to skip anything destined for a local address
    to avoid breaking connections to ourselves, otherwise we might break
    SSH and that would be bad if ngtf is running on a remote server.
     N/A N/A run_iptables_cmd N/A -t %s -A %s -p tcp -m socket -j RETURN N/A table chain ipv6 ipv6 N/A N/A v4_addrs v6_addrs N/A get_interface_addresses N/A addr v4_addrs N/A N/A N/A run_iptables_cmd N/A -t %s -A %s -p tcp -d %s -j RETURN N/A table chain addr ipv6 False N/A addr v6_addrs N/A N/A N/A run_iptables_cmd N/A -t %s -A %s -p tcp -d %s -j RETURN N/A table chain addr ipv4 False ipv6 ipv6 N/A N/A TPROXY_CHAIN ngtf_mangle_PREROUTING disable_tproxy_rules N/A N/A ipv6 mark N/A False 100 N/A N/A N/A run_ip_cmd N/A rule del fwmark %d table %d N/A mark mark ipv6 ipv6 ignore_failed True N/A N/A run_iptables_cmd N/A -t mangle -D PREROUTING -j %s TPROXY_CHAIN ipv6 ipv6 ignore_failed True N/A N/A run_iptables_cmd N/A -t mangle -F %s TPROXY_CHAIN ipv6 ipv6 ignore_failed True N/A N/A run_iptables_cmd N/A -t mangle -X %s TPROXY_CHAIN ipv6 ipv6 ignore_failed True N/A enable_tproxy_rules N/A N/A port ipv6 mark N/A False 100 N/A N/A N/A disable_tproxy_rules ipv6 mark N/A N/A N/A N/A run_ip_cmd N/A rule add fwmark %d table %d N/A mark mark ipv6 ipv6 N/A N/A run_ip_cmd N/A route add local default dev lo table %d mark ipv6 ipv6 N/A N/A run_iptables_cmd N/A -t mangle -N %s TPROXY_CHAIN ipv6 ipv6 N/A N/A add_local_bypass mangle TPROXY_CHAIN ipv6 N/A N/A run_iptables_cmd N/A -t mangle -A PREROUTING --jump %s TPROXY_CHAIN ipv6 ipv6 N/A N/A run_iptables_cmd N/A -t mangle -A %s -p tcp -j TPROXY --tproxy-mark %d --on-port %d N/A TPROXY_CHAIN mark port ipv6 ipv6 N/A N/A N/A Exception N/A N/A N/A N/A logger exception Failed to setup routing rules N/A N/A disable_tproxy_rules ipv6 ipv6 mark mark N/A N/A REDIRECT_CHAIN ngtf_nat_PREROUTING disable_redirect_rules N/A N/A ipv6 N/A False N/A N/A N/A run_iptables_cmd N/A -t nat -D PREROUTING -j %s REDIRECT_CHAIN ipv6 ipv6 ignore_failed True N/A N/A run_iptables_cmd N/A -t nat -F %s REDIRECT_CHAIN ipv6 ipv6 ignore_failed True N/A N/A run_iptables_cmd N/A -t nat -X %s REDIRECT_CHAIN ipv6 ipv6 ignore_failed True N/A enable_redirect_rules N/A N/A port ipv6 N/A False N/A N/A N/A disable_redirect_rules ipv6 ipv6 N/A N/A N/A N/A run_iptables_cmd N/A -t nat -N %s REDIRECT_CHAIN ipv6 ipv6 N/A N/A add_local_bypass nat REDIRECT_CHAIN ipv6 N/A N/A run_iptables_cmd N/A -t nat -A PREROUTING --jump %s REDIRECT_CHAIN ipv6 ipv6 N/A N/A run_iptables_cmd N/A -t nat -A %s -p tcp -j REDIRECT --to-ports %s N/A REDIRECT_CHAIN port ipv6 ipv6 N/A N/A N/A Exception N/A N/A N/A N/A logger exception Failed to setup routing rules N/A N/A disable_redirect_rules ipv6 ipv6 N/A