Popcorn Hack 1

Here is how I found the cookie with the name SSID in my browser:

  1. I opened the developer tools in my browser (Fn+F12)
  2. I clicked on the “Application” tab
  3. I clicked on “Cookies” in the left sidebar
  4. I clicked on the URL of the website I was on
  5. I searched for the cookie with the name “SSID” in the list of cookies

Image

Popcorn Hack 2

I identified the squares that have traffic lights in them.

Image

Homework Hack 1

Image

Image

Image

Homework Hack 2

import random

def caesar_cipher(text, shift, mode):
    result = ""
    for char in text:
        if char.isalpha():
            shift_amount = shift if mode == "encrypt" else -shift
            new_char = chr(((ord(char.lower()) - 97 + shift_amount) % 26) + 97)
            result += new_char.upper() if char.isupper() else new_char
        else:
            result += char
    return result

mode = input("Do you want to encrypt or decrypt? ").strip().lower()
message = input("Enter your message: ")
shift_input = input("Enter shift value (number of places to shift or 'random'): ").strip().lower()

if shift_input == "random":
    shift = random.randint(1, 25)
    print(f"Randomly chosen shift value: {shift}")
else:
    try:
        shift = int(shift_input)
    except ValueError:
        print("Invalid shift value entered. Defaulting to shift value of 0.")
        shift = 0

output = caesar_cipher(message, shift, mode)
print(f"Result: {output}")