- Published on
Primed for Action
- Authors

- Name
- Hassaan Ali Bukhari
- @B3TA_BLOCKER
Challenge Scenario:
Intelligence units intercepted a list of numbers. Most of them are garbage — but two are prime. Those two primes form a key, obtained by multiplying them together. The goal is to recover that key.
Recon
Connected to the target over raw TCP:
The service serves an in-browser code editor over the socket. Default language was Python, but I switched to C++ since that's what I'm most comfortable with it.

Starting Template
The challenge hands you this skeleton:
It reads a single int n and echoes it straight back — no logic at all. The real input is a list of 50 space-separated integers, so the template needs to be reworked to read an array instead of a scalar.
Solution
main.cpp
Approach
- Read all 50 integers into an array.
isPrime()runs simple trial division up tosqrt(num)— more than enough for numbers in this range.- Multiply every prime found into a running product, using
long longto avoid overflow. - Print the final product — that's the key.
Flag
