Generic glitching application.
[goodfet] / client / goodfet.glitch
diff --git a/client/goodfet.glitch b/client/goodfet.glitch
new file mode 100755 (executable)
index 0000000..edce100
--- /dev/null
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+import sys,binascii,time,random;
+
+sys.path.append('../../../trunk/client/')
+
+from GoodFETAVR import GoodFETAVR;
+from GoodFETGlitch import *;
+from intelhex import IntelHex16bit, IntelHex;
+
+import sqlite3;
+
+
+glitcher=GoodFETGlitch();
+
+if(len(sys.argv)==1):
+    print "Usage: %s chip verb [objects]\n" % sys.argv[0];
+    print "%s avr learn" % sys.argv[0];
+    print """
+This populates a database, glitch.db, with a record of all attempted
+glitches.  Graphs can then be generated from the results, allowing
+results to be replicated on different hardware and models.  The general
+sequence for a new chip is to first run 'goodfet $foo learn' for an evening,
+then to FINISHME"""
+    sys.exit();
+
+
+glitcher.setup(sys.argv[1]);
+
+if(sys.argv[2]=="learn"):
+    glitcher.learn();