File: outdated_relays.rst

package info (click to toggle)
python-stem 1.2.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,568 kB
  • ctags: 2,036
  • sloc: python: 20,108; makefile: 127; sh: 3
file content (45 lines) | stat: -rw-r--r-- 1,253 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
List Outdated Relays
====================

.. image:: /_static/buttons/back.png
   :target: ../double_double_toil_and_trouble.html

Time marches on. Tor makes new releases, and at some point needs to drop
support for old ones. Below is the script we used on :trac:`9476` to reach out
to relay operators that needed to upgrade.

::

  from stem.descriptor.remote import DescriptorDownloader
  from stem.version import Version

  downloader = DescriptorDownloader()
  count, with_contact = 0, 0

  print "Checking for outdated relays..."
  print

  for desc in downloader.get_server_descriptors():
    if desc.tor_version < Version('0.2.3.0'):
      count += 1

      if desc.contact:
        print '  %-15s %s' % (desc.tor_version, desc.contact.decode("utf-8", "replace"))
        with_contact += 1

  print
  print "%i outdated relays found, %i had contact information" % (count, with_contact)

::

  % python outdated_relays.py
  Checking for outdated relays...

    0.2.2.39        Random Person admin@gtr-10.de
    0.2.2.36        dobrovich_psckaal at vietrievus dot ok
    0.2.2.39        anonymous6 anonymous@mailinator.com
    0.2.2.39        anonymous12 anonymous@mailinator.com
    ...

  316 outdated relays found, 120 had contact information