image.png

In this challenge you are given a file that contains a value on each line.

image.png

The idea is to locate the line that is not a valid MD5 hash.

The idea:

There are many, many ways to solve this challenge.

This script will check each line in the file and spit out any lines containing values not in the Hexadecimal range.

def is_hexadecimal(s):
    """Check if the string s is a valid hexadecimal number."""
    hex_chars = set("0123456789abcdefABCDEF")
    return all(c in hex_chars for c in s.strip())

def check_md5_file(filename):
    """Read the file line by line and print invalid lines."""
    with open(filename, 'r') as file:
        for line_number, line in enumerate(file, start=1):
            if not is_hexadecimal(line):
                print(f"Invalid line {line_number}: {line.strip()}")

if __name__ == "__main__":
    check_md5_file("md5.txt")

image.png

Copy and paste the found line as the flag, and you’ll receive points.