{"id":6028,"date":"2019-08-02T16:44:13","date_gmt":"2019-08-02T11:14:13","guid":{"rendered":"http:\/\/kalilinuxtutorials.com\/?p=6028"},"modified":"2019-08-02T16:44:13","modified_gmt":"2019-08-02T11:14:13","slug":"python-uncompyle6","status":"publish","type":"post","link":"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/","title":{"rendered":"Python Uncompyle6 &#8211; A Cross-Version Python Bytecode Decompiler"},"content":{"rendered":"\n<p><strong>Uncompyle6<\/strong> translates Python bytecode back into equivalent Python source code. It accepts bytecodes from Python version 1.3 to version 3.8, spanning over 24 years of Python releases. We include Dropbox&#8217;s Python 2.5 bytecode and some PyPy bytecode. <\/p>\n\n\n\n<p>A native Python cross-version decompiler and fragment decompiler. The successor to decompyle, uncompyle, and uncompyle2. <\/p>\n\n\n\n<p>Ok, I&#8217;ll say it: this software is amazing. It is more than your\nnormal hacky decompiler. Using <a href=\"https:\/\/pypi.python.org\/pypi\/spark_parser\">compiler<\/a> technology, the program\ncreates a parse tree of the program from the instructions; nodes at\nthe upper levels that look a little like what might come from a Python\nAST. So we can really classify and understand what&#8217;s going on in\nsections of Python bytecode.<\/p>\n\n\n\n<p>Building on this, another thing that makes this different from other\nCPython bytecode decompilers is the ability to deparse just\n<em>fragments<\/em> of source code and give source-code information around a\ngiven bytecode offset.<\/p>\n\n\n\n<p>I use the tree fragments to deparse fragments of code <em>at run time<\/em>\ninside my <a href=\"https:\/\/pypi.python.org\/pypi\/trepan2g\">trepan<\/a> <a href=\"https:\/\/pypi.python.org\/pypi\/trepan3k\">debuggers<\/a>. For that, bytecode offsets are recorded\nand associated with fragments of the source code. This purpose,\nalthough compatible with the original intention, is yet a little bit\ndifferent.  See <a href=\"https:\/\/github.com\/rocky\/python-uncompyle6\/wiki\/Deparsing-technology-and-its-use-in-exact-location-reporting\">this<\/a> for more information.<\/p>\n\n\n\n<p>Python fragment deparsing given an instruction offset is useful in\nshowing stack traces and can be encorporated into any program that\nwants to show a location in more detail than just a line number at\nruntime.  This code can be also used when source-code information does\nnot exist and there is just bytecode. Again, my debuggers make use of\nthis.<\/p>\n\n\n\n<p>There were (and still are) a number of decompyle, uncompyle,\nuncompyle2, uncompyle3 forks around. Almost all of them come basically\nfrom the same code base, and (almost?) all of them are no longer\nactively maintained. One was really good at decompiling Python 1.5-2.3\nor so, another really good at Python 2.7, but that only. Another\nhandles Python 3.2 only; another patched that and handled only 3.3.\nYou get the idea. This code pulls all of these forks together and\n<em>moves forward<\/em>. There is some serious refactoring and cleanup in this\ncode base over those old forks.<\/p>\n\n\n\n<p>This demonstrably does the best in decompiling Python across all\nPython versions. And even when there is another project that only\nprovides decompilation for subset of Python versions, we generally do\ndemonstrably better for those as well.<\/p>\n\n\n\n<p>How can we tell? By taking Python bytecode that comes distributed with\nthat version of Python and decompiling these.  Among those that\nsuccessfully decompile, we can then make sure the resulting programs\nare syntactically correct by running the Python interpreter for that\nbytecode version.  Finally, in cases where the program has a test for\nitself, we can run the check on the decompiled code.<\/p>\n\n\n\n<p>We are serious about testing, and use automated processes to find bugs. In the issue trackers for other decompilers, you will find a number of bugs we&#8217;ve found along the way. Very few to none of them are fixed in the other decompilers.<\/p>\n\n\n\n<p style=\"text-align:center\"><strong>Also Read &#8211; <a href=\"https:\/\/kalilinuxtutorials.com\/vulnwhisperer-create-actionable-data-from-your-vulnerability-scans\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"VulnWhisperer : Create Actionable Data From Your Vulnerability Scans (opens in a new tab)\">VulnWhisperer : Create Actionable Data From Your Vulnerability Scans<\/a><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/rocky\/python-uncompyle6#requirements\"><\/a><\/h3>\n\n\n\n<p style=\"text-align:center\" class=\"has-background has-light-green-cyan-background-color\"><strong>Requirements<\/strong><\/p>\n\n\n\n<p>The code here can be run on Python versions 2.6 or later, PyPy 3-2.4,\nor PyPy-5.0.1.  Python versions 2.4-2.7 are supported in the\npython-2.4 branch.  The bytecode files it can read have been tested on\nPython bytecodes from versions 1.4, 2.1-2.7, and 3.0-3.8 and the\nabove-mentioned PyPy versions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/rocky\/python-uncompyle6#installation\"><\/a><\/h3>\n\n\n\n<p style=\"text-align:center\" class=\"has-background has-light-green-cyan-background-color\"><strong>Installation<\/strong><\/p>\n\n\n\n<p>This uses setup.py, so it follows the standard Python routine:<\/p>\n\n\n\n<p class=\"has-text-color has-background has-vivid-green-cyan-color has-very-dark-gray-background-color\"><strong>pip install -e .  # set up to run from source tree                   <br>                          # Or if you want to install instead <br>python setup.py install # may need sudo <\/strong><\/p>\n\n\n\n<p>A GNU makefile is also provided so <code>make install<\/code> (possibly as root or\nsudo) will do the steps above.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/rocky\/python-uncompyle6#running-tests\"><\/a><\/h3>\n\n\n\n<p style=\"text-align:center\" class=\"has-background has-light-green-cyan-background-color\"><strong>Running Tests<\/strong><\/p>\n\n\n\n<p class=\"has-text-color has-background has-vivid-green-cyan-color has-very-dark-gray-background-color\"><strong>make check <\/strong><\/p>\n\n\n\n<p>A GNU makefile has been added to smooth over setting running the right\ncommand, and running tests from fastest to slowest.<\/p>\n\n\n\n<p>If you have <a href=\"https:\/\/bashdb.sf.net\/remake\">remake<\/a> installed, you can see the list of all tasks\nincluding tests via <code>remake --tasks<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/rocky\/python-uncompyle6#usage\"><\/a><\/h3>\n\n\n\n<p style=\"text-align:center\" class=\"has-background has-light-green-cyan-background-color\"><strong>Usage<\/strong><\/p>\n\n\n\n<p>Run<\/p>\n\n\n\n<p class=\"has-text-color has-background has-vivid-green-cyan-color has-very-dark-gray-background-color\"><strong>$ uncompyle6 *compiled-python-file-pyc-or-pyo* <\/strong><\/p>\n\n\n\n<p>For usage help:<\/p>\n\n\n\n<p class=\"has-text-color has-background has-vivid-green-cyan-color has-very-dark-gray-background-color\"><strong>$ uncompyle6 -h <\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/rocky\/python-uncompyle6#verification\"><\/a><\/h3>\n\n\n\n<p style=\"text-align:center\" class=\"has-background has-light-green-cyan-background-color\"><strong>Verification<\/strong><\/p>\n\n\n\n<p>In older versions of Python it was possible to verify bytecode by\ndecompiling bytecode, and then compiling using the Python interpreter\nfor that bytecode version. Having done this the bytecode produced\ncould be compared with the original bytecode. However as Python&#8217;s code\ngeneration got better, this no longer was feasible.<\/p>\n\n\n\n<p>If you want Python syntax verification of the correctness of the\ndecompilation process, add the <code>--syntax-verify<\/code> option. However since\nPython syntax changes, you should use this option if the bytecode is\nthe right bytecode for the Python interpreter that will be checking\nthe syntax.<\/p>\n\n\n\n<p>You can also cross compare the results with another python decompiler\nlike <a href=\"https:\/\/github.com\/zrax\/pycdc\">pycdc<\/a> . Since they work differently, bugs here often aren&#8217;t in\nthat, and vice versa.<\/p>\n\n\n\n<p>There is an interesting class of these programs that is readily\navailable give stronger verification: those programs that when run\ntest themselves. Our test suite includes these.<\/p>\n\n\n\n<p>And Python comes with another a set of programs like this: its test\nsuite for the standard library. We have some code in <code>test\/stdlib<\/code> to\nfacilitate this kind of checking too.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/rocky\/python-uncompyle6#known-bugsrestrictions\"><\/a><\/h3>\n\n\n\n<p style=\"text-align:center\" class=\"has-background has-light-green-cyan-background-color\"><strong>Known Bugs\/Restrictions<\/strong><\/p>\n\n\n\n<p>The biggest known and possibly fixable (but hard) problem has to do\nwith handling control flow. (Python has probably the most diverse and\nscrewy set of compound statements I&#8217;ve ever seen; there\nare &#8220;else&#8221; clauses on loops and try blocks that I suspect many\nprogrammers don&#8217;t know about.)<\/p>\n\n\n\n<p>All of the Python decompilers that I have looked at have problems\ndecompiling Python&#8217;s control flow. In some cases we can detect an\nerroneous decompilation and report that.<\/p>\n\n\n\n<p>Python support is strongest in Python 2 for 2.7 and drops off as you\nget further away from that. Support is also probably pretty good for\npython 2.3-2.4 since a lot of the goodness of early the version of the\ndecompiler from that era has been preserved (and Python compilation in\nthat era was minimal)<\/p>\n\n\n\n<p>There is some work to do on the lower end Python versions which is\nmore difficult for us to handle since we don&#8217;t have a Python\ninterpreter for versions 1.6, and 2.0.<\/p>\n\n\n\n<p>In the Python 3 series, Python support is is strongest around 3.4 or\n3.3 and drops off as you move further away from those versions. Python\n3.0 is weird in that it in some ways resembles 2.6 more than it does\n3.1 or 2.7. Python 3.6 changes things drastically by using word codes\nrather than byte codes. As a result, the jump offset field in a jump\ninstruction argument has been reduced. This makes the <code>EXTENDED_ARG<\/code>\ninstructions are now more prevalent in jump instruction; previously\nthey had been rare.  Perhaps to compensate for the additional\n<code>EXTENDED_ARG<\/code> instructions, additional jump optimization has been\nadded. So in sum handling control flow by ad hoc means as is currently\ndone is worse.<\/p>\n\n\n\n<p>Between Python 3.5, 3.6 and 3.7 there have been major changes to the\n<code>MAKE_FUNCTION<\/code> and <code>CALL_FUNCTION<\/code> instructions.<\/p>\n\n\n\n<p>Currently not all Python magic numbers are supported. Specifically in\nsome versions of Python, notably Python 3.6, the magic number has\nchanges several times within a version.<\/p>\n\n\n\n<p><strong>We support only released versions, not candidate versions.<\/strong> Note however\nthat the magic of a released version is usually the same as the <em>last<\/em> candidate version prior to release.<\/p>\n\n\n\n<p>There are also customized Python interpreters, notably Dropbox,\nwhich use their own magic and encrypt bytcode. With the exception of\nthe Dropbox&#8217;s old Python 2.5 interpreter this kind of thing is not\nhandled.<\/p>\n\n\n\n<p>We also don&#8217;t handle <a href=\"http:\/\/www.koreanrandom.com\/forum\/topic\/15280-pjorion-%D1%80%D0%B5%D0%B4%D0%B0%D0%BA%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-%D0%BA%D0%BE%D0%BC%D0%BF%D0%B8%D0%BB%D1%8F%D1%86%D0%B8%D1%8F-%D0%B4%D0%B5%D0%BA%D0%BE%D0%BC%D0%BF%D0%B8%D0%BB%D1%8F%D1%86%D0%B8%D1%8F-%D0%BE%D0%B1%D1%84\">PJOrion<\/a> obfuscated code. For that try: PJOrion <a href=\"https:\/\/github.com\/extremecoders-re\/PjOrion-Deobfuscator\">Deobfuscator<\/a> to unscramble the bytecode to get valid bytecode before trying this tool. This program can&#8217;t decompile Microsoft Windows EXE files created by <a href=\"https:\/\/en.wikipedia.org\/wiki\/Py2exe\">Py2EXE<\/a>, although we can probably decompile the code after you extract the bytecode properly. For situations like this, you might want to consider a decompilation service like <a href=\"http:\/\/www.crazy-compilers.com\/decompyle\/\">Crazy Compilers<\/a>.  Handling pathologically long lists of expressions or statements is slow.<\/p>\n\n\n\n<div class=\"wp-block-button aligncenter is-style-squared\"><a class=\"wp-block-button__link has-background has-vivid-cyan-blue-background-color\" href=\"https:\/\/github.com\/rocky\/python-uncompyle6\"><strong>Download<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Uncompyle6 translates Python bytecode back into equivalent Python source code. It accepts bytecodes from Python version 1.3 to version 3.8, spanning over 24 years of Python releases. We include Dropbox&#8217;s Python 2.5 bytecode and some PyPy bytecode. A native Python cross-version decompiler and fragment decompiler. The successor to decompyle, uncompyle, and uncompyle2. Ok, I&#8217;ll say [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":15715,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png","fifu_image_alt":"Python Uncompyle6 \u2013 A Cross-Version Python Bytecode Decompiler","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[28],"tags":[789,2676,3462,3463],"class_list":["post-6028","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kali","tag-decompiler","tag-python","tag-uncompyle","tag-uncompyle6"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Uncompyle6 - A Cross-Version Python Bytecode Decompiler<\/title>\n<meta name=\"description\" content=\"Uncompyle6 translates Python bytecode back into equivalent Python source code. It accepts bytecodes from Python version 1.3 to version 3.8, spanning\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Uncompyle6 - A Cross-Version Python Bytecode Decompiler\" \/>\n<meta property=\"og:description\" content=\"Uncompyle6 translates Python bytecode back into equivalent Python source code. It accepts bytecodes from Python version 1.3 to version 3.8, spanning\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/\" \/>\n<meta property=\"og:site_name\" content=\"Kali Linux Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-02T11:14:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png\" \/>\n<meta name=\"author\" content=\"R K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png\" \/>\n<meta name=\"twitter:creator\" content=\"@CyberEdition\" \/>\n<meta name=\"twitter:site\" content=\"@CyberEdition\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"R K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/\"},\"author\":{\"name\":\"R K\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/#\/schema\/person\/69444b58b9e267a4cf08fceb34b6f6ad\"},\"headline\":\"Python Uncompyle6 &#8211; A Cross-Version Python Bytecode Decompiler\",\"datePublished\":\"2019-08-02T11:14:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/\"},\"wordCount\":1295,\"publisher\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png\",\"keywords\":[\"Decompiler\",\"Python\",\"Uncompyle\",\"Uncompyle6\"],\"articleSection\":[\"Kali Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/\",\"url\":\"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/\",\"name\":\"Python Uncompyle6 - A Cross-Version Python Bytecode Decompiler\",\"isPartOf\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png\",\"datePublished\":\"2019-08-02T11:14:13+00:00\",\"description\":\"Uncompyle6 translates Python bytecode back into equivalent Python source code. It accepts bytecodes from Python version 1.3 to version 3.8, spanning\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/#primaryimage\",\"url\":\"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png\",\"contentUrl\":\"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/#website\",\"url\":\"https:\/\/kalilinuxtutorials.com\/\",\"name\":\"Kali Linux Tutorials\",\"description\":\"Kali Linux Tutorials\",\"publisher\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kalilinuxtutorials.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/#organization\",\"name\":\"Kali Linux Tutorials\",\"url\":\"https:\/\/kalilinuxtutorials.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kalilinuxtutorials.com\/wp-content\/uploads\/2025\/07\/Kali.png\",\"contentUrl\":\"https:\/\/kalilinuxtutorials.com\/wp-content\/uploads\/2025\/07\/Kali.png\",\"width\":272,\"height\":90,\"caption\":\"Kali Linux Tutorials\"},\"image\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/CyberEdition\",\"https:\/\/www.threads.com\/@cybersecurityedition\",\"https:\/\/www.linkedin.com\/company\/cyberedition\",\"https:\/\/www.instagram.com\/cybersecurityedition\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/#\/schema\/person\/69444b58b9e267a4cf08fceb34b6f6ad\",\"name\":\"R K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d3937c9687f2da11bc0a716404ff91779fe19ca115208dbf66167ad353aca5aa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d3937c9687f2da11bc0a716404ff91779fe19ca115208dbf66167ad353aca5aa?s=96&d=mm&r=g\",\"caption\":\"R K\"},\"url\":\"https:\/\/kalilinuxtutorials.com\/author\/ranjith\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Uncompyle6 - A Cross-Version Python Bytecode Decompiler","description":"Uncompyle6 translates Python bytecode back into equivalent Python source code. It accepts bytecodes from Python version 1.3 to version 3.8, spanning","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/","og_locale":"en_US","og_type":"article","og_title":"Python Uncompyle6 - A Cross-Version Python Bytecode Decompiler","og_description":"Uncompyle6 translates Python bytecode back into equivalent Python source code. It accepts bytecodes from Python version 1.3 to version 3.8, spanning","og_url":"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/","og_site_name":"Kali Linux Tutorials","article_published_time":"2019-08-02T11:14:13+00:00","og_image":[{"url":"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png","type":"","width":"","height":""}],"author":"R K","twitter_card":"summary_large_image","twitter_image":"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png","twitter_creator":"@CyberEdition","twitter_site":"@CyberEdition","twitter_misc":{"Written by":"R K","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/#article","isPartOf":{"@id":"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/"},"author":{"name":"R K","@id":"https:\/\/kalilinuxtutorials.com\/#\/schema\/person\/69444b58b9e267a4cf08fceb34b6f6ad"},"headline":"Python Uncompyle6 &#8211; A Cross-Version Python Bytecode Decompiler","datePublished":"2019-08-02T11:14:13+00:00","mainEntityOfPage":{"@id":"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/"},"wordCount":1295,"publisher":{"@id":"https:\/\/kalilinuxtutorials.com\/#organization"},"image":{"@id":"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/#primaryimage"},"thumbnailUrl":"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png","keywords":["Decompiler","Python","Uncompyle","Uncompyle6"],"articleSection":["Kali Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/","url":"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/","name":"Python Uncompyle6 - A Cross-Version Python Bytecode Decompiler","isPartOf":{"@id":"https:\/\/kalilinuxtutorials.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/#primaryimage"},"image":{"@id":"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/#primaryimage"},"thumbnailUrl":"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png","datePublished":"2019-08-02T11:14:13+00:00","description":"Uncompyle6 translates Python bytecode back into equivalent Python source code. It accepts bytecodes from Python version 1.3 to version 3.8, spanning","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kalilinuxtutorials.com\/python-uncompyle6\/#primaryimage","url":"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png","contentUrl":"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png"},{"@type":"WebSite","@id":"https:\/\/kalilinuxtutorials.com\/#website","url":"https:\/\/kalilinuxtutorials.com\/","name":"Kali Linux Tutorials","description":"Kali Linux Tutorials","publisher":{"@id":"https:\/\/kalilinuxtutorials.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kalilinuxtutorials.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kalilinuxtutorials.com\/#organization","name":"Kali Linux Tutorials","url":"https:\/\/kalilinuxtutorials.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kalilinuxtutorials.com\/#\/schema\/logo\/image\/","url":"https:\/\/kalilinuxtutorials.com\/wp-content\/uploads\/2025\/07\/Kali.png","contentUrl":"https:\/\/kalilinuxtutorials.com\/wp-content\/uploads\/2025\/07\/Kali.png","width":272,"height":90,"caption":"Kali Linux Tutorials"},"image":{"@id":"https:\/\/kalilinuxtutorials.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/CyberEdition","https:\/\/www.threads.com\/@cybersecurityedition","https:\/\/www.linkedin.com\/company\/cyberedition","https:\/\/www.instagram.com\/cybersecurityedition\/"]},{"@type":"Person","@id":"https:\/\/kalilinuxtutorials.com\/#\/schema\/person\/69444b58b9e267a4cf08fceb34b6f6ad","name":"R K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kalilinuxtutorials.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d3937c9687f2da11bc0a716404ff91779fe19ca115208dbf66167ad353aca5aa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d3937c9687f2da11bc0a716404ff91779fe19ca115208dbf66167ad353aca5aa?s=96&d=mm&r=g","caption":"R K"},"url":"https:\/\/kalilinuxtutorials.com\/author\/ranjith\/"}]}},"jetpack_featured_media_url":"https:\/\/1.bp.blogspot.com\/-J0N5I1KmsH4\/XUPH34Mr90I\/AAAAAAAABm4\/goWt-SCYRogaMuqV3Q8Sqm4pT4_pitmuwCLcBGAs\/s1600\/uncompyle6.png","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":34895,"url":"https:\/\/kalilinuxtutorials.com\/hill-saturday-malware-analysis\/","url_meta":{"origin":6028,"position":0},"title":"Hill Saturday Malware Analysis : Open Dir -> Obfuscated Python -> DONUT Launcher -> XWorm","author":"Varshini","date":"September 19, 2024","format":false,"excerpt":"Just some quick malware analysis on a free Saturday. I was just chilling in the morning, reading twitter, and this post from Justin Elze caught my eye: It was perfect because I was indeed bored ;) It was an opendir with a few interesting files: pdf.bat BAT-File 3,179 Bytes Tue,\u2026","rel":"","context":"In &quot;Vulnerability Analysis&quot;","block_context":{"text":"Vulnerability Analysis","link":"https:\/\/kalilinuxtutorials.com\/category\/vulnerability-analysis-tools\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjgEF-A0pE-ESP_nwHnXXKyufMSFouYQHd2IeiPew948OHTxlJQJ4WHkRDb_WLP1jiCf5p5x2BoYzMtDlaT76A3IdAsEVTwiSX1Q1XptiaEHDUTi0SiufLIrG6VaNMW6xWj8KBYt_DxQWZ6iN5i9VEXbT10yZl0ERTSlcoo3h3bdZsfkTHZyARCEsFgKgwe\/s1600\/Artemis%20%281%29.webp?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjgEF-A0pE-ESP_nwHnXXKyufMSFouYQHd2IeiPew948OHTxlJQJ4WHkRDb_WLP1jiCf5p5x2BoYzMtDlaT76A3IdAsEVTwiSX1Q1XptiaEHDUTi0SiufLIrG6VaNMW6xWj8KBYt_DxQWZ6iN5i9VEXbT10yZl0ERTSlcoo3h3bdZsfkTHZyARCEsFgKgwe\/s1600\/Artemis%20%281%29.webp?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjgEF-A0pE-ESP_nwHnXXKyufMSFouYQHd2IeiPew948OHTxlJQJ4WHkRDb_WLP1jiCf5p5x2BoYzMtDlaT76A3IdAsEVTwiSX1Q1XptiaEHDUTi0SiufLIrG6VaNMW6xWj8KBYt_DxQWZ6iN5i9VEXbT10yZl0ERTSlcoo3h3bdZsfkTHZyARCEsFgKgwe\/s1600\/Artemis%20%281%29.webp?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjgEF-A0pE-ESP_nwHnXXKyufMSFouYQHd2IeiPew948OHTxlJQJ4WHkRDb_WLP1jiCf5p5x2BoYzMtDlaT76A3IdAsEVTwiSX1Q1XptiaEHDUTi0SiufLIrG6VaNMW6xWj8KBYt_DxQWZ6iN5i9VEXbT10yZl0ERTSlcoo3h3bdZsfkTHZyARCEsFgKgwe\/s1600\/Artemis%20%281%29.webp?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjgEF-A0pE-ESP_nwHnXXKyufMSFouYQHd2IeiPew948OHTxlJQJ4WHkRDb_WLP1jiCf5p5x2BoYzMtDlaT76A3IdAsEVTwiSX1Q1XptiaEHDUTi0SiufLIrG6VaNMW6xWj8KBYt_DxQWZ6iN5i9VEXbT10yZl0ERTSlcoo3h3bdZsfkTHZyARCEsFgKgwe\/s1600\/Artemis%20%281%29.webp?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjgEF-A0pE-ESP_nwHnXXKyufMSFouYQHd2IeiPew948OHTxlJQJ4WHkRDb_WLP1jiCf5p5x2BoYzMtDlaT76A3IdAsEVTwiSX1Q1XptiaEHDUTi0SiufLIrG6VaNMW6xWj8KBYt_DxQWZ6iN5i9VEXbT10yZl0ERTSlcoo3h3bdZsfkTHZyARCEsFgKgwe\/s1600\/Artemis%20%281%29.webp?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":6050,"url":"https:\/\/kalilinuxtutorials.com\/slurp-evaluate-the-security-s3-buckets\/","url_meta":{"origin":6028,"position":1},"title":"Slurp : Evaluate The Security Of S3 Buckets","author":"R K","date":"August 4, 2019","format":false,"excerpt":"Slurp is a Blackbox\/whitebox S3 bucket enumerator. Overview Credit to all the vendor packages that made this tool possible.This is a security tool; it's meant for pen-testers and security professionals to perform audits of s3 buckets. Features Scan via domain(s); you can target a single domain or a list of\u2026","rel":"","context":"In &quot;Kali Linux&quot;","block_context":{"text":"Kali Linux","link":"https:\/\/kalilinuxtutorials.com\/category\/kali\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6066,"url":"https:\/\/kalilinuxtutorials.com\/msnm-sensor\/","url_meta":{"origin":6028,"position":2},"title":"MSNM Sensor &#8211; Multivariate Statistical Network Monitoring Sensor","author":"R K","date":"August 5, 2019","format":false,"excerpt":"MSNM Sensor (Multivariate Statistical Network Monitoring-Sensor) shows the practical suitability of the approaches found in PCA-MSNM and in Hierarchical PCA-MSNM works. The first one present the MSNM approach and new multivariate statistical methodology for network anomaly detection while the second one proposes the previous one in a hierarchical and structured\u2026","rel":"","context":"In &quot;Kali Linux&quot;","block_context":{"text":"Kali Linux","link":"https:\/\/kalilinuxtutorials.com\/category\/kali\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7616,"url":"https:\/\/kalilinuxtutorials.com\/retdec-retargetable-decompiler-llvm\/","url_meta":{"origin":6028,"position":3},"title":"RetDec : RetDec Is A Retargetable Machine-Code Decompiler Based On LLVM","author":"R K","date":"December 9, 2019","format":false,"excerpt":"RetDec is a retargetable machine-code de compiler based on LLVM. The de-compiler is not limited to any particular target architecture, operating system, or executable file format: Supported file formats: ELF, PE, Mach-O, COFF, AR (archive), Intel HEX, and raw machine codeSupported architectures: 32-bit: Intel x86, ARM, MIPS, PIC32, and PowerPC64-bit:\u2026","rel":"","context":"In &quot;Kali Linux&quot;","block_context":{"text":"Kali Linux","link":"https:\/\/kalilinuxtutorials.com\/category\/kali\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3658,"url":"https:\/\/kalilinuxtutorials.com\/recaf-java-bytecode-editor\/","url_meta":{"origin":6028,"position":4},"title":"Recaf &#8211; A Modern Java Bytecode Editor","author":"R K","date":"January 24, 2019","format":false,"excerpt":"Recaf is an easy to use modern Java bytecode editor based on Objectweb's ASM. No more hassling with the constant pool or stack-frames required. Check out the docs for more information. Recaf Requirements You can run Recaf with Java 8 or higher (Its reccomended that you use the lastest jdk8\u2026","rel":"","context":"In &quot;Kali Linux&quot;","block_context":{"text":"Kali Linux","link":"https:\/\/kalilinuxtutorials.com\/category\/kali\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8901,"url":"https:\/\/kalilinuxtutorials.com\/gda-android-reversing-tool\/","url_meta":{"origin":6028,"position":5},"title":"GDA Android Reversing Tool","author":"R K","date":"February 10, 2020","format":false,"excerpt":"Here, a new Dalvik bytecode decompiler, GDA\uff08this project started in 2013 and released its first version 1.0 in 2015 at www.gda.wiki:9090) , is proposed and implemented in C++ to provide more sophisticated, fast and convenient decompilation support. GDA is completely self-independent and very stable. It supports APK, DEX, ODEX, oat\u2026","rel":"","context":"In &quot;Kali Linux&quot;","block_context":{"text":"Kali Linux","link":"https:\/\/kalilinuxtutorials.com\/category\/kali\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/posts\/6028","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/comments?post=6028"}],"version-history":[{"count":0,"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/posts\/6028\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/media\/15715"}],"wp:attachment":[{"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/media?parent=6028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/categories?post=6028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/tags?post=6028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}