@@ -241,45 +241,35 @@ async def putnoise_v2(task: PutnoiseCheckerTaskMessage, db: ChainDB, logger: Log
241241 password = '' .join (random .choices (string .ascii_letters + string .digits , k = 10 ))
242242 await conn .register_user (username , password )
243243
244- # Generate fake year and noise message
244+ # Easter eggs
245245 easter_eggs = {
246- "69" : "(hehe)" , # Nice
247- "420" : "(noice)" , # Blaze it
248- "1337" : "(leet)" , # Elite h4xx0r
249- "666" : "(evil?)" , # Beastly
250- "8008" : "(höhö)" , # Calculator giggles
251- "1010" : "(Shorten to 2!)" , # Programmers unite
252- "1234" : "(count it)" , # Straight up
253- "1947" : "(partition)" , # India/Pakistan independence (neutral phrasing)
254- "1917" : "(revolt)" , # Russian Revolution
255- "888" : "(luck++)" , # Chinese good luck
256- "1001" : "(n8-n8)" , # 1001 Nights
257- "1492" : "(ocean blue)" , # Columbus sailed the ocean blue
258- "1861" : "(unified)" , # Italy unification
259- "681" : "(Bulgaria!)" , # Founding of Bulgaria
260- "2008" : "(北京!)" , # Olympics year
261- "404" : "(not found)" , # HTTP humor
262- "9001" : "(over 9000!)" , # Dragon Ball meme
263- "314" : "(pi)" , # π = 3.14
264- "3141" : "(ππ)" , # π again, but extra
265- "2718" : "(eeee!)" , # Euler’s number
266- "1821" : "(το ξέρεις)" , # Greek independence
267- "123" : "(basic)" , # Beginning of all things
268- "007" : "(licensed)" , # Bond. James Bond.
246+ "69" : "(hehe)" , "420" : "(noice)" , "1337" : "(leet)" , "666" : "(evil?)" , "8008" : "(höhö)" ,
247+ "1010" : "(Shorten to 2!)" , "1234" : "(count it)" , "1947" : "(partition)" , "1917" : "(revolt)" ,
248+ "888" : "(luck++)" , "1001" : "(n8-n8)" , "1492" : "(ocean blue)" , "1861" : "(unified)" ,
249+ "681" : "(Bulgaria!)" , "2008" : "(北京!)" , "404" : "(not found)" , "9001" : "(over 9000!)" ,
250+ "314" : "(pi)" , "3141" : "(ππ)" , "2718" : "(eeee!)" , "1821" : "(το ξέρεις)" , "123" : "(basic)" ,
251+ "007" : "(licensed)"
269252 }
270- year = str (random .randint (0000 , 4000 ))
271- suffix = ""
272- for key , tag in easter_eggs .items ():
273- if year .endswith (key ) or year == key :
274- suffix = tag
275- break
276- noise_text = f"Meet my in { year } { suffix } . Get your time machine ready! Here is a teaser for what's waiting for you, btw: " + "@>" + \
277- "+" * random .randint (6 , 10 ) + \
278- "[<" + "+" * random .randint (8 , 12 ) + ">-]<." + \
279- ">" + "+" * random .randint (1 , 4 ) + "."
280-
281-
282- # Upload public post
253+
254+ if random .random () < 0.1 :
255+ year = str (random .randint (0 , 4000 ))
256+ suffix = ""
257+ for key , tag in easter_eggs .items ():
258+ if year .endswith (key ) or year == key :
259+ suffix = tag
260+ break
261+ noise_text = f"Meet me in { year } { suffix } . Get your time machine ready! Here is a teaser for what's waiting for you, btw: " + \
262+ "@>" + "+" * random .randint (6 , 10 ) + \
263+ "[<" + "+" * random .randint (8 , 12 ) + ">-]<." + \
264+ ">" + "+" * random .randint (1 , 4 ) + "."
265+ else :
266+ try :
267+ with open ("noise-posts.txt" , "r" , encoding = "utf-8" ) as f :
268+ lines = [line .strip () for line in f if line .strip ()]
269+ noise_text = random .choice (lines ) if lines else "Welcome to my quantum jump presentation!"
270+ except FileNotFoundError :
271+ noise_text = "404: noise-posts.txt not found. Posting temporal static instead."
272+
283273 resp = await client .post (
284274 "/public_post" ,
285275 data = {"text" : noise_text },
@@ -297,6 +287,7 @@ async def putnoise_v2(task: PutnoiseCheckerTaskMessage, db: ChainDB, logger: Log
297287 await db .set ("userdata" , (username , password , post_id , noise_text ))
298288
299289
290+
300291@checker .getnoise (1 )
301292async def getnoise_v2 (task : GetnoiseCheckerTaskMessage , db : ChainDB , logger : LoggerAdapter , client : AsyncClient ):
302293 conn = HTTPConnection (logger , client )
@@ -311,7 +302,8 @@ async def getnoise_v2(task: GetnoiseCheckerTaskMessage, db: ChainDB, logger: Log
311302
312303@checker .exploit (1 )
313304async def exploit_v2 (task : ExploitCheckerTaskMessage , db : ChainDB , searcher : FlagSearcher , logger : LoggerAdapter ):
314- if not task .attack_info :
305+ username = task .attack_info
306+ if not username :
315307 raise MumbleException ("Missing attack_info (username)" )
316308
317309 base_url = f"http://{ task .address } :{ SERVICE_PORT } "
@@ -323,8 +315,7 @@ async def exploit_v2(task: ExploitCheckerTaskMessage, db: ChainDB, searcher: Fla
323315 await client .post (f"{ base_url } /register" , data = {"username" : attacker , "password" : pw }, follow_redirects = True )
324316
325317 # Step 1: Search for the target profile
326- resp = await client .get (f"{ base_url } /search?q={ task .attack_info } " ,
327- follow_redirects = True )
318+ resp = await client .get (f"{ base_url } /search?q={ username } " )
328319 match = re .search (r'href="/home-of/([A-Fa-f0-9\-]+)"' , resp .text )
329320 if not match :
330321 logger .debug (f"Search page content:\n { resp .text } " )
0 commit comments