rizinorg / rizin

UNIX-like reverse engineering framework and command-line toolset.
https://rizin.re
GNU Lesser General Public License v3.0
2.66k stars 357 forks source link

Add MS-DOS and Win32 Timestamp Conversion to rz-ax #4526

Closed TheN00bBuilder closed 3 months ago

TheN00bBuilder commented 3 months ago

Your checklist for this pull request

Detailed description

This adds MS-DOS and Win32 timestamp conversions in the rz-ax util / command. These have been added as flag -m and -W respectively. The relevant help / print statements have been edited. Given rz_time_stamp_is_dos_format is in the codebase, we can "guess" if the timestamp is MS-DOS or Unix, so it may be better to have that all under the -t command, but I don't know if that's a good plan. Would like feedback from the maintainers on everything.

I didn't see any appropriate place in the rizin book for this, but I did update the help command for rz-ax with the new field and confirmed it shows up.

Test plan

As long as the rz_time_date_dos_to_string function is tested, this can be considered tested. I did not see any tests explicitly testing the -t command in the test database.

added_cmd_and_output

Closing issues

closes #4515

TheN00bBuilder commented 3 months ago

D'oh - just realized that MS-DOS timestamps are different from Win32. Adding Win32 now.

TheN00bBuilder commented 3 months ago

There we are. Here's the updated command output. updated_cmd_for_all_cmds

XVilka commented 3 months ago

Thanks!