Comments (5)
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.
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.
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.
Maybe @hardik05 could provide additional info?
from winappdbg.
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)
- Missing write_string function HOT 1
- Re-implement the strings() feature
- unresolved references in gdi32.py HOT 3
- typo in breakpoint.py HOT 1
- Hooks cleared HOT 9
- read_word, read_ushort
- [question] Can I attach process at starting time? HOT 2
- Thread.get_linear_address could also take a numeric selector HOT 1
- Thread.get_linear_address doesn't take into account the segment's granularity HOT 2
- no unicode write for process write HOT 1
- Has any plan to support python 3.x? HOT 1
- How to write hex data๏ผ HOT 5
- anomaly api_hook signature HOT 2
- Is there any function to read pointer data such as [rax]? HOT 1
- WinAppDbg shuts down before programm finishes HOT 1
- sql code is broken HOT 4
- .NET CLR exception filtering? HOT 1
- Can't concat str to bytes error when using _peek_c_type in the Process class HOT 3
- does this project port to python 3? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winappdbg.