2023 linux world cup writeup

2023 linux world cup writeup

Taipei - normal port knocking

nmap -p- --min-rate=1000 -T4 localhost

Unimak - json parsing


jq '.data.stations[] | select(.has_kiosk==false and .capacity>30) | .station_id' station_information.json > ~/mysolution

Ivujivik - csv parsing

find out the row first run without try - error - and catch it

import csv

max_rejected = 0
max_district = ""

with open("table_tableau11.csv") as f:
    reader = csv.reader(f)
    next(reader)  # skip header

    for row in reader:
        name = row[1]
        try:
            rejected = int(row[8])
        except ValueError:
            print(f"Could not convert rejected ballots to int for district {name}")
            rejected = 0
        population = int(row[3])

        if population < 100000 and rejected > max_rejected:
            max_rejected = rejected
            max_district = name

print(max_district)

Monaco


# - get the POST field
curl localhost:5000
# format with 
curl -X POST -F 'password=PASSWORD' http://localhost:5000/
git restore ./

cat webserver.py
#locate the password location

ps aux | grep python

# find the pid

cat /proc/1234/environ | grep SUPERSECRETPASSWORD

get the env 

format and post it

pretty cool about /proc tricks. you can even see a background progress stderr/stdout with cat /proc/1444/fd/{1,2}

Matrix maintenance

Matrix maintenance

matrix mautrix bridge mishaps

  • continue investigating the discord-matrix bridge
    • issue origin - a lot of older room, the bot (admin, creator ) is somehow no longer inside the room
    • fix - POST /_synapse/admin/v1/rooms/<room_id_or_alias>/make_room_admin
    • failed attempt - Should room creators always be able to give themselves power? (SPEC-369) · Issue #165 · GitHub
      • federated - very tough
    • investigate in the database side, pull out a copy of _discord db to see the point to the room -
      • archieve in glacier
      • rclone copy s3:matrix-pg-backup/matrix_mautrix_discord-20231016.sql.gz ./
    • looking at the schema and the db backup - as the one room-id somehow is connected in like 40 different tables.

sliding proxy

  • issue upgrading: sliding proxy - requires new library, setup on webserver/well-known, new database,

KVM fun

KVM fun

since I realize it only cost memory, I decide to run some KVM on my machine. Probably need BIOS/UEFI setting As this new friend is writing about libvirt, I decide to give it another go. Turns out the wiki is describing way too complicated while it just fall down to

  • install the necessary pacages.
  • add the required user into the security group
  • voila - launch just like normal vm

However i find myself run into the problem of no network - NAT is scuffed on my machine. It might very well is because of my weird setup (no Dnsmasq, TUN device hijacking, route table mangling …)

time

time

everytime editing a blog post - considering redo the whole blog service haha