From a52be3a0ebbb67f3b4f35f3d53431d7c1488c9b4 Mon Sep 17 00:00:00 2001 From: chrishoder Date: Fri, 15 Feb 2013 06:10:29 +0000 Subject: [PATCH] Added the option to automatically re-inject packets that we have fuzzed and injected before. Also added threading to the experiments so that you can set up for the next one while one is running git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1499 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/GoodFETMCPCANCommunication.py | 1 + client/experiments.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/GoodFETMCPCANCommunication.py b/client/GoodFETMCPCANCommunication.py index a1a2e08..7d13ae7 100644 --- a/client/GoodFETMCPCANCommunication.py +++ b/client/GoodFETMCPCANCommunication.py @@ -29,6 +29,7 @@ class GoodFETMCPCANCommunication: self.client.serInit() self.client.MCPsetup(); self.DATALOCATION = "../../contrib/ThayerData/" + self.INJECTDATALOCATION = self.DATALOCATION+"InjectedData/" diff --git a/client/experiments.py b/client/experiments.py index 04777da..44f89ec 100644 --- a/client/experiments.py +++ b/client/experiments.py @@ -199,7 +199,7 @@ class experiments(GoodFETMCPCANCommunication): #get folder information (based on today's date) now = datetime.datetime.now() datestr = now.strftime("%Y%m%d") - path = self.DATALOCATION+datestr+"_GenerationFuzzedPackets.csv" + path = self.DATALOCATION+"InjectedData/"+datestr+"_GenerationFuzzedPackets.csv" filename = path outfile = open(filename,'a'); dataWriter = csv.writer(outfile,delimiter=','); @@ -217,12 +217,12 @@ class experiments(GoodFETMCPCANCommunication): packet[i+5] = value #put a rough time stamp on the data and get all the data bytes - row = ['#',time.time(), standardId] + row = [time.time(), standardId,8] msg = "Injecting: " for i in range(5,13): row.append(packet[i]) msg += " %d"%packet[i] - print msg + #print msg dataWriter.writerow(row) self.client.txpacket(packet) #inject the packet repeatily -- 2.20.1