X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETGlitch.py;h=056c50b3e032c28b8c5b76eaabc0378058e530ff;hp=ac0d8f690569a767c4f5a52285a661c91dae52d7;hb=b00db3fd8204756a9fa7e2a474ef0dd31e6af9f2;hpb=21a45c7938c021cfaee254dedb5c16ea37806f6e diff --git a/client/GoodFETGlitch.py b/client/GoodFETGlitch.py index ac0d8f6..056c50b 100644 --- a/client/GoodFETGlitch.py +++ b/client/GoodFETGlitch.py @@ -22,6 +22,17 @@ with dots \ title "Exploited" """; +script_timevccrange=""" +plot "< sqlite3 glitch.db 'select time,vcc,glitchcount from glitches where count=0;'" \ +with dots \ +title "Scanned", \ +"< sqlite3 glitch.db 'select time,vcc,count from glitches where count>0;'" \ +with dots \ +title "Success", \ +"< sqlite3 glitch.db 'select time,max(vcc),count from glitches where count=0 group by time ;'" with lines title "Max", \ +"< sqlite3 glitch.db 'select time,min(vcc),count from glitches where count>0 group by time ;'" with lines title "Min" +"""; + class GoodFETGlitch(GoodFET): def __init__(self, *args, **kargs): @@ -30,6 +41,7 @@ class GoodFETGlitch(GoodFET): self.db=sqlite3.connect("glitch.db",30000); self.db.execute("create table if not exists glitches(time,vcc,gnd,trials,glitchcount,count,lock)"); self.db.execute("create index if not exists glitchvcc on glitches(vcc);"); + self.db.execute("create index if not exists glitchtime on glitches(time);"); self.client=0; def setup(self,arch="avr"): self.client=getClient(arch); @@ -49,9 +61,10 @@ class GoodFETGlitch(GoodFET): g('set datafile separator "|"'); g(script_timevcc); + print "^C to exit."; while 1==1: time.sleep(30); - g('replot'); + # g('replot'); def graph(self):