Commit 47a08526 authored by Cecylia Bocovich's avatar Cecylia Bocovich
Browse files

Fixing up snowflake stage analysis

parent 9ba2c50a
......@@ -104,7 +104,7 @@ if __name__ == "__main__":
for i in range(0,100):
test_id = i
pcap_file = ("%s/snowflake-probe-%d.pcap" % (LOG_PATH, i) )
pcap_file = ("%s/snowflake-probe-%d-lo.pcap" % (LOG_PATH, i) )
log_file = ("%s/snowflake-probe-%d.log" % (LOG_PATH, i) )
sys.stderr.write("Processing snowflake probe %d\n" % i)
......
......@@ -21,13 +21,12 @@ CIRCUIT_BUILD_TIMEOUT = 3*60
SNOWFLAKE_PATH = "/usr/bin/snowflake"
def start_tcpdump(basename, interface):
bpf = "tcp"
# http://packetlife.net/blog/2010/mar/19/sniffing-wireshark-non-root-user/
# groupadd tcpdump
# usermod -a -G tcpdump user
# chgrp tcpdump /usr/sbin/tcpdump
# setcap cap_net_raw,cap_net_admin=eip /usr/sbin/tcpdump
p = subprocess.Popen(["/usr/sbin/tcpdump", "-i", interface, "-U", "-B", "4096", "-w", basename + ".pcap", bpf],
p = subprocess.Popen(["/usr/sbin/tcpdump", "-i", interface, "-U", "-B", "4096", "-w", basename + "-%s.pcap" % interface],
stdout=open(basename + ".pcap", "w"),
stderr=open(basename + ".tcpdump.err", "w"))
return p
......@@ -149,7 +148,7 @@ for x in range(0, 100):
#give data to log file
timestamp = datetime.utcnow().strftime("%b %d %H:%M:%S.%f")
output.write(timestamp+"\n")
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-%s.pcap" % (nickname, "eth0")],
stdout=output).communicate()[0]
logging.info("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