Giter Club home page Giter Club logo

hex_integers's Introduction

Hex Integer Display

A simple python displayhook wrapper for printing ints in hex. Works on nested types, like arrays, tuples, and dictionaries. Also prints the contents of generator objects.

# Prints integers as hex
>>> 123
123 / 0x7b

# Decimal printing is optional (see Settings)
>>> 123
0x7b

# Works on both the repl and the print function 
>>> print(123)
123 / 0x7b

# Lists, dicts, and tuples supported 
>>> list(range(10))
[0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9]

# Generator unwrapping, because why not?
>>> bv.functions
(generator FunctionList) [<func: x86@0x401005>,
 <func: x86@0x40100a>,
 <func: x86@0x40100f>,
 <func: x86@0x40101e>,
 ...]

hex_integers's People

Contributors

couleeapps avatar galenbwill avatar psifertex avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

hex_integers's Issues

Exception on printing [None]

Thank you very much for creating and distributing the hex_integers plugin, it is so helpful!

Would you please be so kind to consider preventing this reproducible exception:

>>> [None]
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/noar/Library/Application Support/Binary Ninja/repositories/community/plugins/CouleeApps_hex_integers/__init__.py", line 73, in new_displayhook
    result = convert_to_hexint(value, [], True)
  File "/Users/noar/Library/Application Support/Binary Ninja/repositories/community/plugins/CouleeApps_hex_integers/__init__.py", line 45, in convert_to_hexint
    return '[' + ', '.join(convert_to_hexint(v, seen) for v in value) + ']'
TypeError: sequence item 0: expected str instance, NoneType found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.