Better glitching code, more portable than the old.
[goodfet] / client / goodfet.glitch
index 823b8de..512b04b 100755 (executable)
@@ -11,14 +11,14 @@ 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 "%s avr explore" % sys.argv[0];
     print "%s avr graph" % sys.argv[0];
     print "%s avr graphx11" % sys.argv[0];
+    print "%s avr points" % sys.argv[0];
+    print "%s avr npoints" % 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
@@ -34,6 +34,7 @@ Then on a chip to be extracted,
 3) Run 'goodfet $chip exploit' to exploit a chip and recover its firmware."""
     sys.exit();
 
+glitcher=GoodFETGlitch();
 
 if(sys.argv[2]=="graphx11"):
     glitcher.graphx11();
@@ -41,6 +42,12 @@ if(sys.argv[2]=="graphx11"):
 if(sys.argv[2]=="graph"):
     glitcher.graph();
     exit();
+if(sys.argv[2]=="points"):
+    glitcher.points();
+    exit();
+if(sys.argv[2]=="npoints"):
+    glitcher.npoints();
+    exit();
 
 if(sys.argv[2]=="crunch"):
     glitcher.crunch();