{"id":429,"date":"2017-12-04T07:13:51","date_gmt":"2017-12-04T07:13:51","guid":{"rendered":"http:\/\/evolvedmicrobe.com\/blogs\/?p=429"},"modified":"2017-12-04T07:13:51","modified_gmt":"2017-12-04T07:13:51","slug":"how-to-decompile-reverse-engineer-pyinstaller-binaries","status":"publish","type":"post","link":"http:\/\/evolvedmicrobe.com\/blogs\/?p=429","title":{"rendered":"How to Decompile \/ Reverse Engineer PyInstaller Binaries"},"content":{"rendered":"Sharing Python programs is a pain, and one solution to this problem is to package up all of the python code, the interpreter and the dependencies into an executable for distribution. <a href=\"http:\/\/www.pyinstaller.org\/\">PyInstaller<\/a>\u00a0is a popular program to perform this task.\r\n\r\nBut what if someone hands you a compiled binary and you want to read the source code?\u00a0 Although, PyInstaller has a well described <a href=\"https:\/\/pyinstaller.readthedocs.io\/en\/stable\/advanced-topics.html#inspecting-archives\">format<\/a> and a <a href=\"https:\/\/pyinstaller.readthedocs.io\/en\/stable\/advanced-topics.html#using-pyi-archive-viewer\">tool<\/a>, that enable you to start decompiling the programs, it is much better to use another tool that was written specifically for decompilation, namely <a href=\"https:\/\/www.aldeid.com\/wiki\/Pyinstxtractor\">pyinstxtractor.py<\/a>.\u00a0 With this tool in hand it&#8217;s a simple:\r\n<pre class=\"lang:sh decode:true \">python pyinstxtractor.py file_to_decompile\r\n<\/pre>\r\nAnd voila! You can read the previously obfuscated source (and find what they were ashamed of).\r\n\r\n&nbsp;","protected":false},"excerpt":{"rendered":"Sharing Python programs is a pain, and one solution to this problem is to package up all of the python code, the interpreter and the dependencies into an executable for distribution. PyInstaller\u00a0is a popular program to perform this task. But what if someone hands you a compiled binary and you want to read the source [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[1],"tags":[26],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":398,"url":"http:\/\/evolvedmicrobe.com\/blogs\/?p=398","url_meta":{"origin":429,"position":0},"title":".NET Bio is Significantly Faster on .Net Core 2.0","date":"November 5, 2017","format":false,"excerpt":"Summary: With the release of .NET Core 2.0, .NET Bio is able to run significantly faster (~2X) on Mac OSX due to better compilation and memory mangement. The .NET Bio\u00a0library contains libraries for genomic data processing tasks like parsing, alignment, etc. that are too computationally intense to be\u00a0undertaken with interpreted\u2026","rel":"","context":"In \".NET Bio\"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/evolvedmicrobe.com\/blogs\/wp-content\/uploads\/2017\/11\/Benchmark-1.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":91,"url":"http:\/\/evolvedmicrobe.com\/blogs\/?p=91","url_meta":{"origin":429,"position":1},"title":"Accessing dbSNP with C# and the .NET Platform","date":"August 22, 2013","format":false,"excerpt":"NCBI Entrez can be accessed with many different platforms (python, R, etc.) , but I find .NET one of the best because the static typing makes it easy to infer what all the datafields mean, and navigate the data with much greater ease. Documentation is sparse for this task, but\u2026","rel":"","context":"In &quot;Bioinformatics&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12,"url":"http:\/\/evolvedmicrobe.com\/blogs\/?p=12","url_meta":{"origin":429,"position":2},"title":"Compile Bowtie2 on Windows 64 bit.","date":"January 30, 2013","format":false,"excerpt":"Bowtie 2 is a program that efficiently aligns next generation sequence data to a reference genome. However, the version distributed by the authors only compiles on POSIX platforms. These instructions will allow you to compile it on windows by downloading the Mingw64 tools and editing the make file before building\u2026","rel":"","context":"In &quot;Computing&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/evolvedmicrobe.com\/blogs\/wp-content\/uploads\/2013\/01\/Capture.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":359,"url":"http:\/\/evolvedmicrobe.com\/blogs\/?p=359","url_meta":{"origin":429,"position":3},"title":"Profiling Rcpp package code on Windows","date":"September 3, 2016","format":false,"excerpt":"Profiling Rcpp code on Unix\/Mac is easy, but is difficult on Windows because R uses a compilation toolchain (MinGW) that produces files that are not understood by common Windows profiling programs.\u00a0 Additionally, the R build process often removes\u00a0symbols which allow profilers to produce sensible interpretations of their data. The following\u2026","rel":"","context":"In \"Optimization\"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/evolvedmicrobe.com\/blogs\/wp-content\/uploads\/2016\/09\/assembly.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":53,"url":"http:\/\/evolvedmicrobe.com\/blogs\/?p=53","url_meta":{"origin":429,"position":4},"title":"How to remove the &ldquo;Trial Edition&rdquo; banner from the VisiFire open source chart kit","date":"April 13, 2013","format":false,"excerpt":"Visifire is a very good graphing component for making silverlight or WPF applications.\u00a0 The component was first released as an open source library on GoogleCode, but since then has been made a closed source proprietary and for profit project.\u00a0 The newer version contains several enhancements, but the open source version\u2026","rel":"","context":"In &quot;C#&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/evolvedmicrobe.com\/blogs\/wp-content\/uploads\/2013\/04\/image_thumb.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":6,"url":"http:\/\/evolvedmicrobe.com\/blogs\/?p=6","url_meta":{"origin":429,"position":5},"title":"Not All Poisson Random Variables Are Created Equally","date":"January 30, 2013","format":false,"excerpt":"Spurred by a slow running program, I spent an afternoon researching what algorithms are available for generating Poisson random variables and figuring out which methods are used by R, Matlab, NumPy, the GNU Science Libraray and various other available packages. I learned some things that I think would be useful\u2026","rel":"","context":"In &quot;Algorithms&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/evolvedmicrobe.com\/blogs\/wp-content\/uploads\/2013\/01\/img34-300x239.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"http:\/\/evolvedmicrobe.com\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/429"}],"collection":[{"href":"http:\/\/evolvedmicrobe.com\/blogs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/evolvedmicrobe.com\/blogs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/evolvedmicrobe.com\/blogs\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/evolvedmicrobe.com\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=429"}],"version-history":[{"count":1,"href":"http:\/\/evolvedmicrobe.com\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/429\/revisions"}],"predecessor-version":[{"id":430,"href":"http:\/\/evolvedmicrobe.com\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/429\/revisions\/430"}],"wp:attachment":[{"href":"http:\/\/evolvedmicrobe.com\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/evolvedmicrobe.com\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=429"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/evolvedmicrobe.com\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}