Skip to content

Instantly share code, notes, and snippets.

@johtso
Created May 27, 2016 09:23
Show Gist options
  • Save johtso/49f2c9c485c264f851ba42c75c513590 to your computer and use it in GitHub Desktop.
Save johtso/49f2c9c485c264f851ba42c75c513590 to your computer and use it in GitHub Desktop.
Output counts of URLs scanned on URLTeam project
import sys
import json
import websocket
ws = websocket.create_connection('ws://tracker.archiveteam.org:1337/api/live_stats')
username = sys.argv[1]
while True:
data = json.loads(ws.recv()).get('live_new')
if data and data['username'] == username:
print data['scanned']
python -u rate_monitor.py johtso | xargs -n 1 -I count head -c count /dev/zero | pv -abr > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment