Update Python for RE post with clarification Signed-off-by: Anirudh <icyph0x@pm.me>
Anirudh icyph0x@pm.me
Thu, 20 Jun 2019 17:57:39 +0530
2 files changed,
4 insertions(+),
0 deletions(-)
M
build/blog/python-for-re-1/index.html
→
build/blog/python-for-re-1/index.html
@@ -307,6 +307,8 @@ </code></pre>
<p>I’m not sure why it uses <code>puts</code> here? I might be missing something; perhaps <code>printf</code> calls <code>puts</code>. I could be wrong. I also confirmed with radare2 that those locations are actually the strings “haha yes!” and “nah dude”.</p> +<p><strong>Update</strong>: It's because of compiler optimization. A <code>printf()</code> (in this case) is seen as a bit overkill, and hence gets simplified to a <code>puts()</code>.</p> + <h3>Conclusion</h3> <p>Wew, that took quite some time. But we’re done. If you’re a beginner, you might find this extremely confusing, or probably didn’t even understand what was going on. And that’s okay. Building an intuition for reading and grokking disassembly comes with practice. I’m no good at it either.</p>
M
pages/blog/python-for-re-1.md
→
pages/blog/python-for-re-1.md
@@ -304,6 +304,8 @@
I’m not sure why it uses `puts` here? I might be missing something; perhaps `printf` calls `puts`. I could be wrong. I also confirmed with radare2 that those locations are actually the strings “haha yes!” and “nah dude”. +**Update**: It's because of compiler optimization. A `printf()` (in this case) is seen as a bit overkill, and hence gets simplified to a `puts()`. + ### Conclusion Wew, that took quite some time. But we’re done. If you’re a beginner, you might find this extremely confusing, or probably didn’t even understand what was going on. And that’s okay. Building an intuition for reading and grokking disassembly comes with practice. I’m no good at it either.