Category Archives: source code
Hacking 3/12
PART 1
uname = “Mufasa”
password = “Circle Of Life”
realm = “testrealm@host.com“
nonce=” dcd98b7102dd2f0e8b11d0f600bfb0 c093″
uri=”/dir/index.html”
nc=”00000001″ # note this is a string
cnonce=”0a4f113b”
ha1 = hashlib.md5((uname+’:’+realm+’ :’+password).encode(‘utf-8’)). hexdigest()
ha2 = hashlib.md5((‘GET:’+uri). encode(‘utf-8’)).hexdigest()
response = hashlib.md5((ha1+’:’+nonce+’:’ +nc+’:’+cnonce+’:auth:’+ha2). encode(‘utf8’)).hexdigest()
print(response)
PART 2
from string import ascii_letters, digits
import itertools
import sys
for len in range(1,8):
for letters in itertools.product(ascii_ letters+digits, repeat=len):
guess=”.join(letters)
if happy_result(guess):
print(‘Password found:’, guess)
sys.exit()
print(‘Epic fail! Try harder next time.’)
MoMathlon 2020
How Big is Infinity Video
MD5 Collision Example
d131dd02c5e6eec4693d9a0698aff95c2fcab58712467eab4004583eb8fb7f8955ad340609f4b30283e488832571415a085125e8f7cdc99fd91dbdf280373c5bd8823e3156348f5bae6dacd436c919c6dd53e2b487da03fd02396306d248cda0e99f33420f577ee8ce54b67080a80d1ec69821bcb6a8839396f9652b6ff72a70
and
d131dd02c5e6eec4693d9a0698aff95c2fcab50712467eab4004583eb8fb7f89 55ad340609f4b30283e4888325f1415a085125e8f7cdc99fd91dbd7280373c5b d8823e3156348f5bae6dacd436c919c6dd53e23487da03fd02396306d248cda0 e99f33420f577ee8ce54b67080280d1ec69821bcb6a8839396f965ab6ff72a70
produce an MD5 collision.
Each of these blocks has MD5 hash 79054025255fb1a26e4bc422aef54eb4.
Arduino Joystick Demo
int joyPin1 = A0; // slider variable connected to analog pin 0 int joyPin2 = A1; // slider variable connected to analog pin 1 int value1 = 0; // variable to read the value from the analog pin 0 int value2 = 0; // variable to read the value from the analog pin 1 void setup() { pinMode(joyPin1, INPUT); pinMode(joyPin2, INPUT); Serial.begin(9600); } void loop() { value1 = analogRead(joyPin1); value2 = analogRead(joyPin2); delay(100); Serial.print("Pin1: "); Serial.print(value1); Serial.print(" Pin2: "); Serial.println(value2); }
LED Images from the Shapeshifters
Arduino Serial Demo
void setup() { Serial.begin(9600); } int i = 1; void loop() { Serial.println("Each line of code will be delayed by 1 second"); delay(1000); Serial.println("Also, integer i will count upwards by one!"); delay(1000); Serial.println(i); i = i+1; }