- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
#!/usr/bin/env python3
import requests
import sys
import os
nodes = os.getenv("fingerprints").split(" ")
addresses = os.getenv("addresses").split(" ")
request = requests.get("https://oniontip.com/result.json")
if isinstance(request.json, dict):
results = request.json
else:
results = request.json()
config = False
if len(sys.argv) > 1:
if sys.argv[1] == "config":
config = True
if config:
print("""graph_title Oniontip Position
graph_info Shows the position in the oniontip list
graph_category tor
graph_vlabel Position
""")
for node in results['results']:
if node['fp'] in nodes or node['bitcoin_address'] in addresses:
print("%s.label %s" % (node['fp'], node['nick']))
else:
for node in results['results']:
if node['fp'] in nodes or node['bitcoin_address'] in addresses:
print("%s.value %s" % (node['fp'], node['index']))
Комментарии (0) RSS
Добавить комментарий