X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2Fgoodfet.glitch;h=6750c8fcbedef6cfc64559b770beaea72fe5e6b6;hp=823b8de85c41d0223f6d923192569e7a4cee8208;hb=54432729e7df95d851fe55af36e2ff80ab4647ca;hpb=8ae30e6291cb4a6d67833eaa3ac23f9081f3e99a diff --git a/client/goodfet.glitch b/client/goodfet.glitch index 823b8de..6750c8f 100755 --- a/client/goodfet.glitch +++ b/client/goodfet.glitch @@ -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 @@ -28,12 +28,13 @@ sequence for a new chip is as follows. On a sample chip for the same model as the target, 1) Run 'goodfet $chip learn' in order to learn the glitching voltages. 2) Run 'goodfet $chip crunch' in order to precompute glitching ranges. -3) Run 'goodfet $chip explore' to find a time at which to glitch. +3) Run 'goodfet $chip explore [tstart tstop]' to find a time at which to glitch. 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]=="rangepoints"): + glitcher.rpoints(); + exit(); if(sys.argv[2]=="crunch"): glitcher.crunch(); @@ -51,7 +58,11 @@ glitcher.setup(sys.argv[1]); if(sys.argv[2]=="learn"): glitcher.learn(); if(sys.argv[2]=="explore"): - glitcher.explore(); + times=None; + if(len(sys.argv)>=4): + times=range(int(sys.argv[3]), + int(sys.argv[4])); + glitcher.explore(times); if(sys.argv[2]=="exploit"): print "Coming soon.";