An example of this loop is:
<presyntaxhighlight lang=python># Crack the first letter
password = ''
trylist = 'abcdefghijklmnopqrstuvwxyz0123456789'
for c in trylist:
# Get a power trace using our next attempt
nextPass = password + '{}'.format(c)+ "\n" selftarget.apigo_cmd = nextPass cw.setParametercaptureN(['Simple Serial'self.scope, 'Go Command'self.target, '{}\n'None, self.format(nextPass)]) aux_list, self.api.capture1(ktp, 1)
# Grab the trace
nextTrace = selfscope.api.getScope().channels[0].getTracegetLastTrace()
# Check location 153, 225, etc. If it's too low, we've failed
print '{} characters: {}'.format(i+1, password)
break
</presyntaxhighlight>
After some time, this prints <code>5 characters: h0px3</code> -- it automatically finds the correct password.