Code Monkey home page Code Monkey logo

Comments (3)

cchaine avatar cchaine commented on July 30, 2024

I made a pull request which should solve this. #75

from winappdbg.

MarioVilas avatar MarioVilas commented on July 30, 2024

Hi! Not entirely sure what causes the bug in the first place, I'd rather fully understand the problem before applying a pull request. Can you send me a proof of concept so I can reproduce it on my end? Thanks!

from winappdbg.

cchaine avatar cchaine commented on July 30, 2024

For sure. This issue happens because the function _peek_c_type uses the function peek which returns a bytearray when successful but an empty string when an error occurred.

In the case the peek function returns an empty string, the _peek_c_type function crashes line 1996 because it tries to concatenate a bytearray and the empty string.

I have this issue with the sample code passing it the path of any .exe file :

from winappdbg import Debug, EventHandler
import sys

class MyEventHandler(EventHandler):
    def load_dll(self, event):
        module = event.get_module()

def debugger(argv):
    with Debug(MyEventHandler(), bKillOnExit = True) as debug:
        debug.execv(argv)
        debug.loop()

debugger(sys.argv[1:])

The peek function might fail because the Microsoft SDK cannot be found. But it doesn't really matter, I don't think that there should be a concat error in the _peek_c_type function when peek fails.

from winappdbg.

Related Issues (20)

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.