Projects STRLCPY geneva Commits 55183b2d
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    engine.py
    skipped 43 lines
    44 44   out_queue_num=None,
    45 45   forwarder=None,
    46 46   save_seen_packets=True,
     47 + interface=None,
    47 48   demo_mode=False):
    48 49   """
    49 50   Args:
    skipped 6 lines
    56 57   in_queue_num (int, None): override the netfilterqueue number used for inbound packets. Used for running multiple instances of the engine at the same time. Defaults to None.
    57 58   out_queue_num (int, None): override the netfilterqueue number used for outbound packets. Used for running multiple instances of the engine at the same time. Defaults to None.
    58 59   save_seen_packets (bool, True): whether or not the engine should record and save packets it sees while running. Defaults to True, but it is recommended this be disabled on higher throughput systems.
     60 + interface (str, None): the interface the engine should bind to
    59 61   demo_mode (bool, False): whether to replace IPs in log messages with random IPs to hide sensitive IP addresses.
    60 62   """
    61 63   self.server_port = server_port
    skipped 27 lines
    89 91   "engine",
    90 92   self.environment_id,
    91 93   log_level=log_level,
    92  - iface=iface,
    93 94   demo_mode=demo_mode)
    94 95   # Warn if these are not provided
    95 96   if not environment_id:
    skipped 21 lines
    117 118   self.in_nfqueue_thread = None
    118 119   self.censorship_detected = False
    119 120   
    120  - self.interface = iface
    121  - if not iface:
     121 + self.interface = interface
     122 + if not interface:
    122 123   self.interface = actions.utils.get_interface()
    123 124   
    124 125   # Specifically define an L3Socket to send our packets. This is an optimization
    skipped 333 lines
    458 459   in_queue_num=args["in_queue_num"],
    459 460   out_queue_num=args["out_queue_num"],
    460 461   save_seen_packets=args["no_save_packets"],
    461  - iface=args["interface"],
     462 + interface=args["interface"],
    462 463   demo_mode=args["demo_mode"])
    463 464   eng.initialize_nfqueue()
    464 465   while True:
    skipped 8 lines
Please wait...
Page is in error, reload to recover