Commit df955326 authored by Cecylia Bocovich's avatar Cecylia Bocovich
Browse files

Fix some bugs in snowflake test

parent 464a823d
#!/usr/bin/env python3
from datetime import datetime
import errno
import logging
import os
......@@ -37,7 +38,7 @@ def download_file(socks_port):
start = time.time()
# Download a ~1MB file["/usr/bin/torsocks", "-P", str(socks_port), "wget", "-O", "/dev/null", ""], check=True)["torsocks", "-P", str(socks_port), "wget", "-O", "/dev/null", ""], check=True)
stop = time.time()
download_time = stop - start
except subprocess.CalledProcessError as e:
......@@ -118,8 +119,8 @@ for x in range(0, 100):
try:"starting tcpdump for bridge %r" % nickname)
tcpdump_lo_proc = start_tcpdump(nickname, lo)
tcpdump_eth0_proc = start_tcpdump(nickname, eth0)
tcpdump_lo_proc = start_tcpdump(nickname, "lo")
tcpdump_eth0_proc = start_tcpdump(nickname, "eth0")
except OSError as e:"failed to start tcpdump, stopping snowflake probe: %s", e)
#these tests break if we can't find the proxy ip address
......@@ -148,7 +149,7 @@ for x in range(0, 100):
#give data to log file
timestamp = datetime.utcnow().strftime("%b %d %H:%M:%S.%f")
subprocess.Popen(["/usr/bin/tshark", "-q", "-Xlua_script:../../../snowflake-stage.lua", "-r", "%s.pcap" % nickname],
subprocess.Popen(["/usr/bin/tshark", "-q", "-Xlua_script:../../../../snowflake-stage.lua", "-r", "%s.pcap" % nickname],
stdout=output).communicate()[0]"Probed snowflake proxy %d time(s)" % (x+1))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment