miscfreeeasy
Primed for Action
hackthebox
Task: Find two prime numbers in a list and output their product. Solution: Implement primality check and multiply the two primes found.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
Primed for Action — Hack The Box
Description
The task provided a web interface with a code editor. The goal was to write a script that reads a list of numbers from stdin, identifies the two prime numbers in the list, and outputs their product.
Analysis
This is a classic coding challenge. We are given a list of numbers, among which we need to find exactly two prime numbers and multiply them. The main difficulty lies in correctly implementing the primality check and handling the input data.
Solution
#!/usr/bin/env python3 import sys def is_prime(n): if n < 2: return False for i in range(2, int(n**0.5) + 1): if n % i == 0: return False return True ...
$ grep --similar
Similar writeups
- [crypto][free]RSAisEasy— HackTheBox
- [crypto][Pro]P*Q=ban— spbctf
- [crypto][Pro]+*— spbctf
- [misc][free]PyDome— HackTheBox
- [misc][free]Locked Away— hackthebox