<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker Moleskine</title><link>http://mahmoudimus.com/</link><description/><atom:link href="http://mahmoudimus.com/feeds/all.rss.xml" rel="self"/><lastBuildDate>Sun, 31 May 2026 00:00:00 -0700</lastBuildDate><item><title>Growing a unique function signature without rescanning the binary</title><link>http://mahmoudimus.com/blog/2026/05/growing-a-unique-function-signature-without-rescanning-the-binary/</link><description>&lt;p&gt;A byte signature is how a reverse engineer says &amp;quot;this function, the one I named and annotated last week, is the same code over here in the new build.&amp;quot; You pick a sequence of bytes from the function, wildcard out the parts that move between compiles (relative call targets, absolute …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mahmoud</dc:creator><pubDate>Sun, 31 May 2026 00:00:00 -0700</pubDate><guid>tag:mahmoudimus.com,2026-05-31:/blog/2026/05/growing-a-unique-function-signature-without-rescanning-the-binary/</guid><category>blog</category><category>reverse engineering</category><category>ida pro</category><category>algorithms</category><category>string algorithms</category><category>cython</category></item><item><title>How do you know your Cython hot loop is fast enough?</title><link>http://mahmoudimus.com/blog/2026/05/how-do-you-know-your-cython-hot-loop-is-fast-enough/</link><description>&lt;p&gt;A while back I &lt;a href="/blog/2025/08/ida-pro-and-cython-super-charging-the-work-horse-of-reverse-engineering/"&gt;wrote about using Cython to speed up IDA Pro plugins&lt;/a&gt;: you keep the Python plugin ecosystem, you cross the Python/C boundary once, and you let the heavy loop run as C. The running example was &lt;code&gt;ida-sigmaker&lt;/code&gt;, my signature-maker plugin, which got optional SIMD speedups in …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mahmoud</dc:creator><pubDate>Fri, 15 May 2026 00:00:00 -0700</pubDate><guid>tag:mahmoudimus.com,2026-05-15:/blog/2026/05/how-do-you-know-your-cython-hot-loop-is-fast-enough/</guid><category>blog</category><category>reverse engineering</category><category>cython</category><category>ida pro</category><category>performance</category><category>profiling</category></item><item><title>Building a compile-time x86 assembler in C++20</title><link>http://mahmoudimus.com/blog/2026/01/building-a-compile-time-x86-assembler-in-c20/</link><description>&lt;p&gt;When you write shellcode by hand, you typically end up with something like this:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;span class="k"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;uint8_t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;shellcode&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="mh"&gt;0x48&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;0x89&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;0xc3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;// mov rbx, rax&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="mh"&gt;0x48&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;0x83&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;0xc0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;0x10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;// add rax, 0x10&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="mh"&gt;0xc3&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;// ret&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It works, but it is error prone. Did I get the REX prefix right? Is &lt;code&gt;0x89&lt;/code&gt; the correct …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mahmoud</dc:creator><pubDate>Mon, 26 Jan 2026 00:00:00 -0800</pubDate><guid>tag:mahmoudimus.com,2026-01-26:/blog/2026/01/building-a-compile-time-x86-assembler-in-c20/</guid><category>blog</category><category>c++</category><category>assembly</category><category>x86</category><category>constexpr</category><category>cpp20</category><category>reverse engineering</category></item><item><title>IDA Pro and Cython: super-charging the work-horse of reverse engineering</title><link>http://mahmoudimus.com/blog/2025/08/ida-pro-and-cython-super-charging-the-work-horse-of-reverse-engineering/</link><description>&lt;p&gt;Python is an incredibly powerful language. It powers AI research, backend servers and, crucially for security researchers, the scripting interfaces of the big three disassemblers: &lt;code&gt;IDA Pro&lt;/code&gt;, &lt;code&gt;Ghidra&lt;/code&gt; and &lt;code&gt;Binary Ninja&lt;/code&gt;. Because it is easy to read and write, Python has become the de facto lingua franca of malware analysis …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mahmoud</dc:creator><pubDate>Fri, 01 Aug 2025 00:00:00 -0700</pubDate><guid>tag:mahmoudimus.com,2025-08-01:/blog/2025/08/ida-pro-and-cython-super-charging-the-work-horse-of-reverse-engineering/</guid><category>blog</category><category>reverse engineering</category><category>cython</category><category>ida pro</category></item><item><title>Passing the baton of leadership at VGS (f.k.a. Very Good Security)</title><link>http://mahmoudimus.com/blog/2022/11/passing-the-baton-of-leadership-at-vgs-fka-very-good-security/</link><description>&lt;p&gt;Sensitive data is valuable, but possessing it is risky and costly. This was the understanding &lt;a href="https://www.linkedin.com/in/marshalljones2/"&gt;Marshall Jones&lt;/a&gt; and I had when we started &lt;a href="https://verygoodsecurity.com"&gt;VGS&lt;/a&gt; (Very Good Security) almost eight years ago. Storing sensitive data, by accepting customer credit card numbers for instance, enables businesses to charge their customers for the …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mahmoud Abdelkader</dc:creator><pubDate>Wed, 16 Nov 2022 11:50:00 -0800</pubDate><guid>tag:mahmoudimus.com,2022-11-16:/blog/2022/11/passing-the-baton-of-leadership-at-vgs-fka-very-good-security/</guid><category>blog</category><category>leadership</category><category>entrepreneurship</category><category>very-good-security</category><category>vgs</category></item><item><title>A New Year -- a New Beginning</title><link>http://mahmoudimus.com/blog/2013/01/a-new-year-a-new-beginning/</link><description>&lt;p&gt;As we say goodbye to 2012 and welcome 2013, I'd like to reflect on the
opportunities ahead, but first, I want to say a few words about last
year. Last year has been a tremendous blessing for me, as I've seen
personal growth in both leadership and overall as a …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mahmoud</dc:creator><pubDate>Wed, 02 Jan 2013 00:00:00 -0800</pubDate><guid>tag:mahmoudimus.com,2013-01-02:/blog/2013/01/a-new-year-a-new-beginning/</guid><category>blog</category><category>reflections</category></item><item><title>Developing a nose Test Plugin to Time Python Tests</title><link>http://mahmoudimus.com/blog/2011/02/developing-a-nose-test-plugin-to-time-python-tests/</link><description>&lt;p&gt;&lt;a class="reference external" href="https://nose.readthedocs.io/en/latest/"&gt;Nose&lt;/a&gt; is a fantastic testing framework. What surprises me though, is
that there's no out of the box plugin to time tests to see which tests
are the slowest, and most likely, problematic. After all, unit tests are
supposed to be wicked fast. I googled, but nothing really came up …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mahmoud</dc:creator><pubDate>Mon, 28 Feb 2011 14:28:00 -0800</pubDate><guid>tag:mahmoudimus.com,2011-02-28:/blog/2011/02/developing-a-nose-test-plugin-to-time-python-tests/</guid><category>blog</category><category>python</category></item><item><title>Arbitrary Stack Trace in Python</title><link>http://mahmoudimus.com/blog/2011/02/arbitrary-stack-trace-in-python/</link><description>&lt;p&gt;I had a need to trace a function's call stack to identify call chain
paths in some difficult-to-follow Python code that was laced with lots
of magic and abstractions.&lt;/p&gt;
&lt;p&gt;I tried stepping through ipdb, but it took forever. So, I thought to
myself, why can't I just take a stack …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mahmoud</dc:creator><pubDate>Fri, 11 Feb 2011 15:52:00 -0800</pubDate><guid>tag:mahmoudimus.com,2011-02-11:/blog/2011/02/arbitrary-stack-trace-in-python/</guid><category>blog</category><category>programming</category><category>python</category></item><item><title>Reading and Writing Null-Terminated CSV Files in Python</title><link>http://mahmoudimus.com/blog/2010/09/reading-and-writing-null-terminated-csv-files-in-python/</link><description>&lt;p&gt;I've recently had to do some work that required sorting a very large CSV
file, containing fields with embedded newlines, quickly. As it turns
out, Linux comes with a sort implementation that has a
&lt;a class="reference external" href="http://linux.die.net/man/1/sort"&gt;&amp;quot;--zero-terminated&amp;quot;&lt;/a&gt; option, which sorts on null-terminated delimited
strings instead of the default newline separator.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Writing null-terminated …&lt;/strong&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mahmoud</dc:creator><pubDate>Sun, 12 Sep 2010 18:42:00 -0700</pubDate><guid>tag:mahmoudimus.com,2010-09-12:/blog/2010/09/reading-and-writing-null-terminated-csv-files-in-python/</guid><category>blog</category><category>linux</category><category>programming</category><category>python</category></item><item><title>A Pythonic n-wise Iterator for Any Iterable</title><link>http://mahmoudimus.com/blog/2010/06/a-pythonic-n-wise-iterator-for-any-iterable/</link><description>&lt;p&gt;Over the weekend, I was working on upgrading &lt;a class="reference external" href="http://github.com/mahmoudimus/python-ngrams"&gt;python-ngrams&lt;/a&gt; because I
had discovered a bug where the tokenization was incorrect. I was reading
a research paper that was describing q-grams and while following their
examples, I realized I was getting incorrect results for a fundamental
n-gram result.&lt;/p&gt;
&lt;p&gt;The tokenization that's …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mahmoud</dc:creator><pubDate>Tue, 01 Jun 2010 00:48:00 -0700</pubDate><guid>tag:mahmoudimus.com,2010-06-01:/blog/2010/06/a-pythonic-n-wise-iterator-for-any-iterable/</guid><category>blog</category><category>programming</category><category>python</category></item><item><title>Python 2.6.4 and Twisted 9 on OS X 10.6 Snow Leopard</title><link>http://mahmoudimus.com/blog/2009/12/python-2-6-4-and-twisted-9-on-os-x-10-6-snow-leopard/</link><description>&lt;p&gt;I just recently purchased a MacBook Pro, which comes with Snow Leopard
installed, and I noticed that it comes with python 2.6.1 installed. I
wanted to upgrade to the latest python release of 2.6.4, so I tried
installing the official python Mac OS distribution from python …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mahmoud</dc:creator><pubDate>Sun, 27 Dec 2009 02:06:00 -0800</pubDate><guid>tag:mahmoudimus.com,2009-12-27:/blog/2009/12/python-2-6-4-and-twisted-9-on-os-x-10-6-snow-leopard/</guid><category>blog</category><category>programming</category><category>python</category><category>software</category></item><item><title>Verifying Python64 builds</title><link>http://mahmoudimus.com/blog/2009/07/verifying-python64-builds/</link><description>&lt;p&gt;At work, I'm migrating over &lt;a class="reference external" href="http://www.python.org/"&gt;python&lt;/a&gt; to our 64bit machines and one
thing that I've noticed was that there really was no standard python
64bit verification method to ensure the build was really 64bit or not.
I've read &lt;a class="reference external" href="http://www.corepy.org/wiki/index.php?title=How_To_Build_a_64-bit_Python_and_use_Corepy/x86_64_on_OSX"&gt;somewhere&lt;/a&gt; previously, especially for the Mac OS X crowd,
that the LDFLAGS …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mahmoud</dc:creator><pubDate>Mon, 06 Jul 2009 11:24:00 -0700</pubDate><guid>tag:mahmoudimus.com,2009-07-06:/blog/2009/07/verifying-python64-builds/</guid><category>blog</category><category>linux</category><category>programming</category><category>python</category></item></channel></rss>