Git Product home page Git Product logo

hexdump.js's Introduction

Hexdump.js

Description

A javascript utility for fast and simple hexdumping. Hexdump.js is very customizable with format options like width and byte grouping. Check out the documentation for more information.

Live Example

Example

<!DOCTYPE HTML>
<html lang="en-EN">
  <head>
    <meta charset="UTF-8">
    <title>Hexdump.js</title>
    <script type="text/javascript" src="hexdump.js"></script>
  </head>
  
  <body>
    <pre id="hexdump"></pre>
    
    <script type="text/javascript">
      var payload = '䉁䅃䍂䉁䅃䍂䉁䅃䉁䅃䍂䉁䅃䍂䉁䅃䉁䅃䍂䉁䅃䍂䍂䉁䅃䍂䉁䅃';

      new Hexdump(payload, {
        container: 'hexdump'
        , base: 'hex'
        , width: 7
        , ascii: false
        , byteGrouping: 0
        , html: false
        , lineNumber: true
        , style: {
            lineNumberLeft: ''
          , lineNumberRight: ':'
          , stringLeft: '|'
          , stringRight: '|'
          , hexLeft: ''
          , hexRight: ''
          , hexNull: '.g'
          , stringNull: '.'
        }
      });
    </script>
  </body>
</html>

Output

00000000: 4241 4143 4342 4241 4143 4342 4241 |䉁䅃䍂䉁䅃䍂䉁|
00000007: 4143 4241 4143 4342 4241 4143 4342 |䅃䉁䅃䍂䉁䅃䍂|
00000014: 4241 4143 4241 4143 4342 4241 4143 |䉁䅃䉁䅃䍂䉁䅃|
00000021: 4342 4342 4241 4143 4342 4241 4143 |䍂䍂䉁䅃䍂䉁䅃|

Install

$ npm install hexdump

Copyright

Copyright (c) 2011 Dustin Willis Webber

See LICENSE.txt for details.

hexdump.js's People

Contributors

djcas9 avatar brice avatar

Watchers

Pasi Patama avatar

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.