Skip to content
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

Order of target-query output varies #266

Closed
mischw opened this issue Jun 2, 2023 · 2 comments
Closed

Order of target-query output varies #266

mischw opened this issue Jun 2, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mischw
Copy link

mischw commented Jun 2, 2023

The order of the output of target-query seems to be in random order. Three executions yield different results each time:

$ target-query $IMAGE -f architecture,ips,hostname -d ';'
2023-06-02T08:28:10.577451Z [warning  ] <Target debian11.vmdk>: Can't identify filesystem: <Volume name='part_3763f00000' size=8999927808 fs=None> [dissect.target.target] 
2023-06-02T08:28:10.595940Z [warning  ] <Target debian11.vmdk>: Skipped FS type: swap, UUID=cb8add39-4d4b-4580-9560-8e1b803717f1, none [dissect.target.target] 
2023-06-02T08:28:10.595989Z [warning  ] <Target debian11.vmdk>: Unsupported mount device: /dev/sr0 /media/cdrom0 [dissect.target.target] 
<Target debian11.vmdk> x86_64-linux;['192.168.175.162'];osboxes
$ target-query $IMAGE -f architecture,ips,hostname -d ';'
2023-06-02T08:28:14.153905Z [warning  ] <Target debian11.vmdk>: Can't identify filesystem: <Volume name='part_3763f00000' size=8999927808 fs=None> [dissect.target.target] 
2023-06-02T08:28:14.172428Z [warning  ] <Target debian11.vmdk>: Skipped FS type: swap, UUID=cb8add39-4d4b-4580-9560-8e1b803717f1, none [dissect.target.target] 
2023-06-02T08:28:14.172478Z [warning  ] <Target debian11.vmdk>: Unsupported mount device: /dev/sr0 /media/cdrom0 [dissect.target.target] 
<Target debian11.vmdk> x86_64-linux;osboxes;['192.168.175.162']
$ target-query $IMAGE -f architecture,ips,hostname -d ';'
2023-06-02T08:28:19.582197Z [warning  ] <Target debian11.vmdk>: Can't identify filesystem: <Volume name='part_3763f00000' size=8999927808 fs=None> [dissect.target.target] 
2023-06-02T08:28:19.600684Z [warning  ] <Target debian11.vmdk>: Skipped FS type: swap, UUID=cb8add39-4d4b-4580-9560-8e1b803717f1, none [dissect.target.target] 
2023-06-02T08:28:19.600739Z [warning  ] <Target debian11.vmdk>: Unsupported mount device: /dev/sr0 /media/cdrom0 [dissect.target.target] 
<Target debian11.vmdk> ['192.168.175.162'];x86_64-linux;osboxes

Given that there is an extra parameter to set the delimiter, I think it makes sense to keep the order of the output the same as the input functions. So in my example target-query $IMAGE -f architecture,ips,hostname -d ';' should always return <Target debian11.vmdk> x86_64-linux;['192.168.175.162'];osboxes and none of the other possibilities.

@Schamper Schamper added the bug Something isn't working label Jun 2, 2023
@Schamper
Copy link
Member

Interesting and very unexpected, this definitely sounds like a bug.

@cecinestpasunepipe do you know if this has anything to do with your recent changes to the target-query and plugin execution mechanisms?

@Schamper
Copy link
Member

This was fixed with #266!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants