andreas-abel / uiCA

uops.info Code Analyzer
GNU Affero General Public License v3.0
230 stars 16 forks source link

Enable disassembling hex strings #26

Open boomanaiden154 opened 1 year ago

boomanaiden154 commented 1 year ago

This patch enables disassembling hex strings by changing the input options to the uiCA.py script. Instead of accepting a file as a positional argument, a file is now accepted as a flag. Input can also be accepted with the hex flag, assuming a hex string is passed in. This allows for more easily working with the BHive dataset using the main uiCA.py script in addition to other tools that pass around various representations of machine code without having to write anything to a file.

This patch might not be totally desirable in its current form as it changes the default invocation of uiCA.py, but if desired it should be a simple fix to make the default input a file path as a positional argument while still keeping this functionality (if this patch is desired upstream at all).