diff --git a/README.md b/README.md index 05b9297..e2bc25f 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,17 @@ A tool for simplifying power analysis attacks against other gadgets. Built on the Raspberry Pi Pico W, it runs a PWM channel to do manual clock control on the nugget you're hacking, and then reads an ADC channel to measure voltage used at each clock cycle. ## Screenshots +Config page ![index-page](resources/index.png) +Running page ![running-page](resources/running.png) + +Serial terminal at boot +![terminal-boot](resources/terminal0.png) + +Serial terminal while sampling and looping +![terminal-running](resources/terminal-running.png) ## Installation Make sure you have Micropython installed on your Pico W. @@ -43,6 +51,12 @@ If you're having trouble, see the official [Raspberry Pi Pico W Getting Started Your wifi password Dont forget the 's around the password +`power_on_pin` + The pin that toggles 3.3v on and off to activate and reset the nugget board + +`seconds_awake` + The number of seconds to turn on power_on_pin before resetting + ### On the Webpage `Duty Cycle` The Percentage of the time that the clock is on vs off diff --git a/main.py b/main.py index 6093879..b577f27 100644 --- a/main.py +++ b/main.py @@ -1,10 +1,10 @@ import network import socket import machine +from machine import Timer import utime import _thread import math -#import os # gpio pin to read power analysis off of (int) @@ -15,9 +15,16 @@ power_analysis_pin = 28 # output gpio pin generating clock pulse clock_pulse_pin = 20 +# this pin gets power and toggles off and on every X PWM cycles +# it powers the board you're targeting +power_on_pin = 2 + +# how many seconds to power the board before reset +seconds_awake = 3 + # Wi-Fi credentials ssid = 'your-wifi-name-here' -password = 'yuour-wifi-password-here' +password = 'your-wifi-password-here' # == Clock Pulse Genertor == # # starts a pwm @@ -63,7 +70,7 @@ header = f"""