0

The function get_ports():

get_ports(listener_type, default = UNDEFINED)

as defined in the stem controller module description here needs a listener_type variable as argument defined on the link as

listener_type (stem.control.Listener) -- connection type being handled
by the ports we return

What are the values that listener_type can take?

0

It tells you on the page you linked to, if you read the description.

One of stem.control.Listener:

stem.control.Listener(enum)

Purposes for inbound connections that Tor handles.
Listener    Description

OR          traffic we're relaying as a member of the network (torrc's ORPort and ORListenAddress)
DIR         mirroring for tor descriptor content (torrc's DirPort and DirListenAddress)
SOCKS       client traffic we're sending over Tor (torrc's SocksPort and SocksListenAddress)
TRANS       transparent proxy handling (torrc's TransPort and TransListenAddress)
NATD        forwarding for ipfw NATD connections (torrc's NatdPort and NatdListenAddress)
DNS         DNS lookups for our traffic (torrc's DNSPort and DNSListenAddress)
CONTROL     controller applications (torrc's ControlPort and ControlListenAddress)

As can be discovered through the link you provided, where it states:

Parameters: 

    listener_type (stem.control.Listener) -- connection type being handled by the ports we return
    default (object) -- response if the query fails

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy