[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] added first experiment, scripted



commit 0dc4392cfecad180703e7d056a31c137ed33fd4c
Author: ellitron <jdellit@xxxxxxxxxxxx>
Date:   Sat Jul 9 20:52:17 2011 -0700

    added first experiment, scripted
---
 experiments/00     |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 experiments/README |    6 +++++
 2 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/experiments/00 b/experiments/00
new file mode 100755
index 0000000..973ee30
--- /dev/null
+++ b/experiments/00
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+# Go to flashproxy repo root dir
+cd ..
+
+# Create 1GB dump file
+echo "creating dump file..."
+rm dump
+dd if=/dev/null of=dump bs=1G seek=1 &
+
+sleep 1
+
+# Start http server
+echo "starting http server..."
+thttpd -p 1080
+
+sleep 1
+
+# Start crossdomain policy server
+echo "starting cross domain policy server..."
+sudo ./crossdomaind.py &
+
+sleep 1
+
+# Start the facilitator
+echo "starting facilitator..."
+./facilitator.py 4701 -r 127.0.0.1:1080
+
+sleep 1
+
+# Start the flash proxy
+echo "starting flash proxy..."
+google-chrome --app=http://localhost:1080/swfcat.swf?facilitator=127.0.0.1:4701
+
+sleep 1
+
+# Start socat adapter
+echo "starting socat adapter..."
+socat TCP-LISTEN:9000,reuseaddr,fork TCP-LISTEN:2000,reuseaddr &
+
+sleep 1
+
+# Register with facilitator
+echo "registering with facilitator..."
+echo $'POST / HTTP/1.0\r\n\r\nclient=127.0.0.1:9000' | ncat localhost 4701 --send-only
+
+sleep 10
+
+# wget the dump file
+echo "getting the dump file..."
+wget http://localhost:2000/dump -O - > /dev/null
+
+# Slaughter the processes
+ps -ef | sed -n '/thttpd/{/grep/!p;}' | awk '{print$2}' | sudo xargs -i kill {}
+ps -ef | sed -n '/crossdomaind.py/{/grep/!p;}' | awk '{print$2}' | sudo xargs -i kill {}
+ps -ef | sed -n '/facilitator.py/{/grep/!p;}' | awk '{print$2}' | sudo xargs -i kill {}
+ps -ef | sed -n '/socat/{/grep/!p;}' | awk '{print$2}' | sudo xargs -i kill {}
+
diff --git a/experiments/README b/experiments/README
new file mode 100644
index 0000000..5d65b28
--- /dev/null
+++ b/experiments/README
@@ -0,0 +1,6 @@
+Scripts for running experiments.
+
+This README contains descriptions of each numbered experiment.
+
+Experiment
+00  -   Includes socat, crossdomaind, swfcat, httpd, and facilitator



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits