Code Monkey home page Code Monkey logo

Comments (5)

MIvanchev avatar MIvanchev commented on July 30, 2024 1

Yes, I did some debugging as well, it's trying to find the "tightest" symbol encompassing the address. None seems to be the correct return value in the case of no match, yes. So far so good. The 2 functions of the contribution both look for the "closest" match. The first one considers the symbols' size. If no match is found, the second function ignores the size and just looks for the nearest symbol starting address and takes that. The bug is that if there are no symbols at all in the module, the said error is thrown.

from winappdbg.

zuypt avatar zuypt commented on July 30, 2024 1

quick fix for everyone until an offical fix

    def get_symbol_from_list(self,address):
        found = None
        SymList = {}
        SortedSymList = {}
        f = False
        for (SymbolName, SymbolAddress, SymbolSize) in self.iter_symbols():
            SymList[SymbolAddress] = SymbolName
        SortedSymList = sorted(SymList.items())
        for SymbolAddress,SymbolName in SortedSymList:
            if SymbolAddress <= address:
                f = True 
                SymbolStartAddress = SymbolAddress
                SymbolStartName = SymbolName
            else:
                break
        if f:
            found = (SymbolStartName, SymbolStartAddress, 0)
        return found

from winappdbg.

MarioVilas avatar MarioVilas commented on July 30, 2024

The function came from this pull request, this may give a hint to why it's failing: 01d7218

I believe the function should be returning None when the symbol is not found.

from winappdbg.

MIvanchev avatar MIvanchev commented on July 30, 2024

Maybe @hardik05 could provide additional info?

from winappdbg.

hardik05 avatar hardik05 commented on July 30, 2024

i was facing some issue with previous function, so i added def get_symbol_from_list
this function basically parses symbol file and saves there address and name in a list. then when winappdbg request for a symbol at a address, it first tries the default function -> get_symbol_at_address if its not able to find then it calls get_symbol_from_list.
you can check if symbol file is proper or symbols are there?
lastly you can modify the function to check for None and handle them accordingly.

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.