-
Notifications
You must be signed in to change notification settings - Fork 154
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
Feature Request: Output options: Add sorting #156
Comments
The functionality seems similar to running the output through sort specifying the delimiter and key number. E.g.
This is just sorting on text. I've added sort supports alphabetic and numeric sort, but not IP addresses, so arp-scan could do a better job by knowing the type of the field as you describe. Any type of sorting will mean that nothing gets printed until all the results are returned. That could be non ideal with large address spaces. It's an interesting idea, but may not be easy to implement. I'll give it some thought. Ideas welcome. |
Thank you... It gave me some ideas. The below 'sort command' will properly sort IP addresses... (limitation: IP address needs to be the first column).
As you have written, it would be great if you could implement this ! |
It's easy to convert IP addresses from dotted quad format to a 32-bit integer for sorting using
It would be easy to add an option to output the |
Thanks for the great work and a great utility. Looking forward to an updated version... |
PR #157 adds the
|
I think this could be useful for a few use cases, so I'm merging into master. e.g (using Linux): Assign all odd addresses in
Scan network from another system.
Import into excel: Sort on column A: That's useful because it's not easy to sort IP addresses in excel. Not trivial to do so with |
Feature Request:
Would it be possible to sort the output by IP address?
Or to make it really useful, have an option to sort by fieldname?
As an example; something like...
Sort by IP address...
arp-scan --resolve --format='${ip;-16}| ${mac} | ${name;20}' --sort='${ip}' --localnet
Sort by MAC address...
arp-scan --resolve --format='${ip;-16}| ${mac} | ${name;20}' --sort='${mac}' --localnet
Sort by Vendor name (but in reverse)
arp-scan --resolve --format='${ip;-16}| ${mac} | ${name;20}' --sort='-${vendor}' --localnet
Sort by Hostname (but in reverse)
arp-scan --resolve --format='${ip;-16}| ${mac} | ${name;20}' -S '-${name}' --localnet
Essentially add --sort option that takes field names as input. And a -${fieldname} to reverse sort.
--sort=<[-]s> or S <[-]s>
I assume that sorting would be context sensitive... so IP address, RTT. etc... would be numeric sort while Name, Hostname, Vendor, etc... would be alphanumeric sort.
The text was updated successfully, but these errors were encountered: