-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fd_fields bad typing breaks type checking #1443
Comments
It's a pointer (filp: file pointer) and a Pointer is an Integer in Volatility3.
|
It isn't a pointer though, it is the instantiated |
That's because the framework dereference the pointer for you. fds = utility.array_of_pointers(fd_table, count = max_fds, subtype = file_type, context = context)
for (fd_num, filp) in enumerate(fds):
if filp != 0:
full_path = LinuxUtilities.path_for_file(task, filp)
yield fd_num, filp, full_path these are the file pointers from the tasks' file descriptor table. |
Could the api return a .dereference() of the pointer then things would be cleaner? |
I don't see any immediate issues with it. Applying changes here is painful since it affects lsof, netstat, and from there it potentially propagates elsewhere. Of course technically doable, however, it seems like a lot of effort affecting the versions of everything and potentially causing instability in those plugins just to resolve a warning. BTW, any reason why you are using Pyright and not Pylance, which is a superset of Pyright and the official MS VSCode language server for Python?
|
The second element is listed as
int
:https://github.com/volatilityfoundation/volatility3/blob/develop/volatility3/framework/plugins/linux/lsof.py#L57
But it is really the
file
object for the file:https://github.com/volatilityfoundation/volatility3/blob/develop/volatility3/framework/plugins/linux/lsof.py#L70
@gcmoreira Can you double check this and fix as needed?
The text was updated successfully, but these errors were encountered: