Better glitching code, more portable than the old.
[goodfet] / client / goodfet.glitch
index c1b0cea..512b04b 100755 (executable)
@@ -11,8 +11,6 @@ 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];
@@ -20,6 +18,7 @@ if(len(sys.argv)==1):
     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
@@ -35,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();
@@ -45,6 +45,9 @@ if(sys.argv[2]=="graph"):
 if(sys.argv[2]=="points"):
     glitcher.points();
     exit();
+if(sys.argv[2]=="npoints"):
+    glitcher.npoints();
+    exit();
 
 if(sys.argv[2]=="crunch"):
     glitcher.crunch();