Giter Club home page Giter Club logo

pyasm-9's Introduction

pyasm

pyasm decompiles dis.dis output by converting it into a code object and then running uncompyle6 on the code object. This is intended for use on CTF problems where only this output is provided; if you have a .pyc file just use uncompyle6 or one of the various other .pyc decompilers.

Note: pyasm has only been tested on Python 3.8 disassemblies, using pyasm on disassemblies from other versions may or may not work.

Installation

pip install git+https://github.com/SuperStormer/pyasm.git

Example Usage

$ pyasm samples/disas.txt
def main():
        s = input('Guess?')
        o = b'\xae\xc0\xa1\xab\xef\x15\xd8\xca\x18\xc6\xab\x17\x93\xa8\x11\xd7\x18\x15\xd7\x17\xbd\x9a\xc0\xe9\x93\x11\xa7\x04\xa1\x1c\x1c\xed'
        if e(s) == o:
            print('Correct!')
        else:
            print('Wrong...')
def e(s):
        s = [ord(c) for c in s]
        o = [ord(c) for c in b(a(s), c(s))]
        return bytes(o)
def c(s):
        return [c + 5 for c in s]
def b(s,t):
        for x, y in zip(s, t):
            yield x + y - 50
def a(s):
        o = [
         0] * len(s)
        for i, c in enumerate(s):
            o[i] = c * 2 - 60

        return o

pyasm-9's People

Contributors

superstormer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.