Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self):
ScopeTemplate.__init__(self)
scopes = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.scopes.visascope_interface", True, False)
self.params.addChildren([
{'name':'Scope Type', 'key':'type', 'type':'list', 'values':scopes, 'value':scopes[VisaScopeInterface_MSO54831D._name], 'set':self.setCurrentScope, 'childmode':'parent'},
{'name':'Connect String', 'key':'connStr', 'type':'str', 'value':''},
{'name':'Example Strings', 'type':'list', 'values':['', 'TCPIP0::192.168.2.100::inst0::INSTR'], 'value':'', 'set':self.exampleString},
])
self.params.init()
self.scopetype = None
self.setCurrentScope(self.findParam('type').getValue(type))
def __init__(self):
ScopeTemplate.__init__(self)
scopes = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.scopes.visascope_interface", True, False)
self.params.addChildren([
{'name':'Scope Type', 'key':'type', 'type':'list', 'values':scopes, 'value':scopes[VisaScopeInterface_MSO54831D._name], 'set':self.setCurrentScope, 'childmode':'parent'},
{'name':'Connect String', 'key':'connStr', 'type':'str', 'value':''},
{'name':'Example Strings', 'type':'list', 'values':['', 'TCPIP0::192.168.2.100::inst0::INSTR'], 'value':'', 'set':self.exampleString},
])
self.params.init()
self.scopetype = None
self.setCurrentScope(self.findParam('type').getValue(type))
def __init__(self):
TargetTemplate.__init__(self)
readers = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.targets.smartcard_readers", True, True)
protocols = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.targets.smartcard_protocols", True, True)
self.driver = None
self.protocol = None
self.params.addChildren([
{'name':'Reader Hardware', 'type':'list', 'values':readers, 'get':self.getConnection, 'set':self.setConnection},
{'name':'SmartCard Protocol', 'type':'list', 'values':protocols, 'get':self.getProtocol, 'set':self.setProtocol},
{'name':'SmartCard Explorer Dialog', 'type':'action', 'action':lambda _: self.getScgui().show()}
])
def __init__(self):
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
CWCoreAPI.instance = self
self.sigNewProject = util.Signal()
self.sigConnectStatus = util.Signal()
self.sigAttackChanged = util.Signal()
self.sigNewInputData = util.Signal()
self.sigNewTextResponse = util.Signal()
self.sigTraceDone = util.Signal()
self.sigCampaignStart = util.Signal()
self.sigCampaignDone = util.Signal()
self.executingScripts = util.Observable(False)
self.valid_scopes = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.scopes", True, True)
self.valid_targets = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.targets", True, True)
self.valid_traces = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.common.traces", True, True)
self.valid_aux = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.auxiliary", True, True)
self.valid_acqPatterns = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.acq_patterns", True, False)
self.settings = Settings()
# Initialize default values
self._project = self._scope = self._target = self._traceFormat = self._acqPattern = self._attack = None
self._acqPattern = self.valid_acqPatterns["Basic"]
self._auxList = AuxList()
self._numTraces = 50
self._numTraceSets = 1
# Storage for last key/plaintext/ciphertext
self._lastKey = None
self._lastTextin = None
def __init__(self, prog_name="ChipWhisperer", prog_ver=""):
self.valid_traces = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.common.traces", True, True)
self._trace_format = None
self.params = Parameter(name="Project Settings", type="group")
self.params.addChildren([
{'name': 'Trace Format', 'type': 'list', 'values': self.valid_traces, 'get': self.get_trace_format, 'set': self.set_trace_format},
])
self.findParam("Trace Format").setValue(TraceContainerNative(project=self), addToList=True)
#self.traceParam = Parameter(name="Trace Settings", type='group', addLoadSave=True).register()
#self.params.getChild('Trace Format').stealDynamicParameters(self.traceParam)
self.sigFilenameChanged = util.Signal()
self.sigStatusChanged = util.Signal()
self.dirty = util.Observable(True)
def __init__(self):
super(PicoScopeInterface, self).__init__()
scopes = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.scopes.picoscope_interface", True, False)
self.getParams().addChildren([
{'name':'Scope Type', 'key':'type', 'type':'list', 'values':scopes, 'value':scopes["PS5000a"], 'action':self.setCurrentScope_act}
])
self.scopetype = None
self.advancedSettings = None
self.setCurrentScope(self.findParam('type').getValue())
def __init__(self):
self._algos = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.analyzer.attacks.profiling_algorithms", True, False)
self._analysisAlgorithm = self._algos["Template Attack"]
AttackBaseClass.__init__(self)
self.useAbs = False # Do not use absolute
CWCoreAPI.instance = self
self.sigNewProject = util.Signal()
self.sigConnectStatus = util.Signal()
self.sigAttackChanged = util.Signal()
self.sigNewInputData = util.Signal()
self.sigNewTextResponse = util.Signal()
self.sigTraceDone = util.Signal()
self.sigCampaignStart = util.Signal()
self.sigCampaignDone = util.Signal()
self.executingScripts = util.Observable(False)
self.valid_scopes = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.scopes", True, True)
self.valid_targets = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.targets", True, True)
self.valid_traces = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.common.traces", True, True)
self.valid_aux = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.auxiliary", True, True)
self.valid_acqPatterns = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.acq_patterns", True, False)
self.settings = Settings()
# Initialize default values
self._project = self._scope = self._target = self._traceFormat = self._acqPattern = self._attack = None
self._acqPattern = self.valid_acqPatterns["Basic"]
self._auxList = AuxList()
self._numTraces = 50
self._numTraceSets = 1
# Storage for last key/plaintext/ciphertext
self._lastKey = None
self._lastTextin = None
self._lastTextout = None
self._lastExpected = None
def __init__(self):
TargetTemplate.__init__(self)
readers = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.targets.smartcard_readers", True, True)
protocols = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.targets.smartcard_protocols", True, True)
self.driver = None
self.protocol = None
self.params.addChildren([
{'name':'Reader Hardware', 'type':'list', 'values':readers, 'get':self.getConnection, 'set':self.setConnection},
{'name':'SmartCard Protocol', 'type':'list', 'values':protocols, 'get':self.getProtocol, 'set':self.setProtocol},
{'name':'SmartCard Explorer Dialog', 'type':'action', 'action':lambda _: self.getScgui().show()}
])