def __init__(self, parent): AutoScript.__init__(self) PassiveTraceObserver.__init__(self) self.getParams().getChild("Input").hide() self._project = None self.params.addChildren([ { 'name': 'Load Template', 'type': 'group', 'children': [] }, { 'name': 'Generate New Template', 'type': 'group', 'children': [{ 'name': 'Trace Start', 'key': 'tgenstart', 'value': 0, 'type': 'int', 'action': self.updateScript }, { 'name': 'Trace End', 'key': 'tgenstop', 'value': parent.traceMax, 'type': 'int', 'action': self.updateScript }, { 'name': 'POI Selection', 'key': 'poimode', 'type': 'list', 'values': { 'TraceExplorer Table': 0, 'Read from Project File': 1 }, 'value': 0, 'action': self.updateScript }, { 'name': 'Read POI', 'type': 'action', 'action': self.updateScript }, { 'name': 'Generate Templates', 'type': 'action', 'action': util.Command(self.runScriptFunction.emit, "generateTemplates") }] }, ]) self.addGroup("generateTemplates") self.sr = None self.stats = DataTypeDiffs() self.setProfileAlgorithm(TemplateBasic)
def __init__(self, traceSource=None, name=None): self._enabled = False PassiveTraceObserver.__init__(self) if name is None: TraceSource.__init__(self, self.getName()) else: TraceSource.__init__(self, name=name) if isinstance(traceSource, Project): traceSource = traceSource.trace_manager() self.setTraceSource(traceSource, blockSignal=True) if traceSource: #until new analyzer is implemented traceSource.sigTracesChanged.connect( self.sigTracesChanged.emit ) # Forwards the traceChanged signal to the next observer in the chain self.getParams().addChildren([{ 'name': 'Enabled', 'key': 'enabled', 'type': 'bool', 'default': self._getEnabled(), 'get': self._getEnabled, 'set': self._setEnabled }]) self.findParam('input').hide() self.register() if __debug__: logging.debug('Created: ' + self._name) #Old attribute dict self._attrdict = None self.enabled = True
def __init__(self, name=None): PassiveTraceObserver.__init__(self) self.getParams().addChildren([ {'name':'Trace Format', 'key':'tracefmt', 'type':'list', 'values':CWCoreAPI.getInstance().valid_traces, 'value':None}, {'name':'Trace Range', 'key':'tracerng', 'type':'range', 'limits':(0, 0), 'value':(0, 0)}, {'name':'Point Range', 'key':'pointrng', 'type':'rangegraph', 'limits':(0, 0), 'value':(0, 0), 'graphwidget':ResultsBase.registeredObjects["Trace Output Plot"]}, {'name':'Save', 'type':'action', 'action':self.processTraces}, ]) self.findParam('input').setValue(TraceSource.registeredObjects["Trace Management"]) TraceSource.sigRegisteredObjectsChanged.connect(self.traceSourcesChanged) TraceSource.sigRegisteredObjectsChanged.connect(self.resetTraceLimits)
def __init__(self, parent): AutoScript.__init__(self) PassiveTraceObserver.__init__(self) self.getParams().getChild("Input").hide() self._project = None self.params.addChildren([ {'name':'Load Template', 'type':'group', 'children':[]}, {'name':'Generate New Template', 'type':'group', 'children':[ {'name':'Trace Start', 'key':'tgenstart', 'value':0, 'type':'int', 'action':self.updateScript}, {'name':'Trace End', 'key':'tgenstop', 'value':parent.traceMax, 'type':'int', 'action':self.updateScript}, {'name':'POI Selection', 'key':'poimode', 'type':'list', 'values':{'TraceExplorer Table':0, 'Read from Project File':1}, 'value':0, 'action':self.updateScript}, {'name':'Read POI', 'type':'action', 'action':self.updateScript}, {'name':'Generate Templates', 'type':'action', 'action':util.Command(self.runScriptFunction.emit, "generateTemplates")} ]}, ]) self.addGroup("generateTemplates") self.sr = None self.stats = DataTypeDiffs() self.setProfileAlgorithm(TemplateBasic)
def __init__(self, name=None): PassiveTraceObserver.__init__(self) self.getParams().addChildren([ { 'name': 'Trace Format', 'key': 'tracefmt', 'type': 'list', 'values': CWCoreAPI.getInstance().valid_traces, 'value': None }, { 'name': 'Trace Range', 'key': 'tracerng', 'type': 'range', 'limits': (0, 0), 'value': (0, 0) }, { 'name': 'Point Range', 'key': 'pointrng', 'type': 'rangegraph', 'limits': (0, 0), 'value': (0, 0), 'graphwidget': ResultsBase.registeredObjects["Trace Output Plot"] }, { 'name': 'Save', 'type': 'action', 'action': self.processTraces }, ]) self.findParam('input').setValue( TraceSource.registeredObjects["Trace Management"]) TraceSource.sigRegisteredObjectsChanged.connect( self.traceSourcesChanged) TraceSource.sigRegisteredObjectsChanged.connect(self.resetTraceLimits)
def __init__(self): AutoScript.__init__(self) AnalysisSource.__init__(self) PassiveTraceObserver.__init__(self) self.getParams().getChild("Input").hide() self._traceStart = 0 self._iterations = 1 self._tracePerAttack = 1 self._reportingInterval = 10 self._pointRange = (0,0) self._targetSubkeys = [] self._project = None self.useAbs = True self.attack = None self.getParams().addChildren([ {'name':'Attack Algorithm', 'type':'list', 'values':self._algos, 'get':self.getAlgorithm, 'set':self.setAlgorithm, 'action':self.updateScript, 'childmode': 'parent'} ]) models = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.analyzer.attacks.models", True, False) self.getParams().addChildren([ {'name':'Crypto Algorithm', 'type':'list', 'values':models, 'value':models['AES 128'], 'action':self.refreshByteList, 'childmode':'child'}, {'name':'Points Range', 'key':'prange', 'type':'range', 'get':self.getPointRange, 'set':self.setPointRange, 'action':self.updateScript}, ]) for m in models.itervalues(): m.sigParametersChanged.connect(self.updateScript) self.getParams().addChildren([ {'name':'Starting Trace', 'key':'strace', 'type':'int', 'get':self.getTraceStart, 'set':self.setTraceStart, 'action':self.updateScript}, {'name':'Traces per Attack', 'key':'atraces', 'type':'int', 'limits':(1, 1E6), 'get':self.getTracesPerAttack, 'set':self.setTracesPerAttack, 'action':self.updateScript}, {'name':'Iterations', 'key':'runs', 'type':'int', 'limits':(1, 1E6), 'get':self.getIterations, 'set':self.setIterations, 'action':self.updateScript}, {'name':'Reporting Interval', 'key':'reportinterval', 'type':'int', 'get':self.getReportingInterval, 'set':self.setReportingInterval, 'action':self.updateScript}, ]) self.getParams().init() self.setAlgorithm(self._analysisAlgorithm) self.refreshByteList() self.updateScript() if __debug__: logging.debug('Created: ' + str(self))
def __init__(self): PassiveTraceObserver.__init__(self) self._itNum = 0 self.getParams().getChild("Input").hide() self._traceStart = 0 self._iterations = 1 self._tracePerAttack = 1 self._reportingInterval = 10 self._pointRange = (0,0) self._targetSubkeys = [] self._project = None self.useAbs = True self.attack = None self.attackModel = None self.getParams().addChildren([ {'name':'Attack Algorithm', 'type':'list', 'values':self._algos, 'get':self.getAlgorithm, 'set':self.setAlgorithm, 'action':self.updateScript, 'childmode': 'parent'} ]) models = None self.getParams().addChildren([ {'name':'Crypto Algorithm', 'type':'list', 'values':models, 'action':self.refreshByteList, 'childmode':'child'}, {'name':'Points Range', 'key':'prange', 'type':'range', 'get':self.get_point_range, 'set':self.set_point_range, 'action':self.updateScript}, ]) self.getParams().addChildren([ {'name':'Starting Trace', 'key':'strace', 'type':'int', 'get':self.get_trace_start, 'set':self.set_trace_start, 'action':self.updateScript}, {'name':'Traces per Attack', 'key':'atraces', 'type':'int', 'limits':(1, 1E6), 'get':self.get_traces_per_attack, 'set':self.set_traces_per_attack, 'action':self.updateScript}, {'name':'Iterations', 'key':'runs', 'type':'int', 'limits':(1, 1E6), 'get':self.get_iterations, 'set':self.set_iterations, 'action':self.updateScript}, {'name':'Reporting Interval', 'key':'reportinterval', 'type':'int', 'get':self.get_reporting_interval, 'set':self.set_reporting_interval, 'action':self.updateScript}, ]) # self.getParams().init() self.setAlgorithm(self._analysisAlgorithm) self.refreshByteList() self.updateScript() if __debug__: logging.debug('Created: ' + str(self))
def __init__(self): AnalysisSource.__init__(self) PassiveTraceObserver.__init__(self) self.getParams().getChild("Input").hide()
def __init__(self): AutoScript.__init__(self) PassiveTraceObserver.__init__(self) self.getParams().getChild("Input").hide()
def __init__(self): AnalysisSource.__init__(self) PassiveTraceObserver.__init__(self) self.getParams().getChild("Input").hide() if __debug__: logging.debug('Created: ' + str(self))