Created
May 27, 2016 09:23
-
-
Save johtso/49f2c9c485c264f851ba42c75c513590 to your computer and use it in GitHub Desktop.
Output counts of URLs scanned on URLTeam project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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