Giter VIP home page Giter VIP logo

obfuscate.js's Introduction

Obfuscate.js is a Javascript console tool which obfuscates the text on the web page hiding sensitive information. The purpose of this tool is to be able to easily make shareable screenshots for collaborative debugging, examples, demos and so on. You no longer need to manually blur parts of the screen shot in Photoshop, GIMP, etc. image manipulation program, saving your precious time and making sharing screenshots easier.

  • You invoke Obfuscate.js script from the Javascript console of your web browser
  • Obfuscate.js obfuscates the whole web page or parts of it, replacing all text on the page with gibberish or now optionally altering it via one or more CSS styles e.g. blur, setting background colour the same as font colour etc. (note that obfuscate.js will apply browser vendor prefixes where necessary)
  • Take a screenshot
  • Post the screenshot to a public forum, blog or other media where you could not share the information and show the symptoms otherwise

Obfuscate.js can walk through the whole page (<body>) or arbitary bit chosen by CSS selectors.

Open the page with sensitive information in your web browser.

Open Javascript console. Copy-paste line of text from obfuscate.min.js to your Javascript console.

https://github.com/miohtama/obfuscate.js/raw/master/media/console.png

In this point you have the original page still with sensitive information

https://github.com/miohtama/obfuscate.js/raw/master/media/sensitive.png

After this you can obfuscate a part of a page by writing the command in the console:

obfuscate("#waffle-grid-container"); // Obfuscate contents of Google Spreadsheet

https://github.com/miohtama/obfuscate.js/raw/master/media/part.png

To obfuscate the content of Google Apps document:

obfuscate(".kix-paginateddocumentplugin")

Or simply obfuscate all text the whole web page:

obfuscate(); // Obfuscate all the text on the page

https://raw.github.com/miohtama/obfuscate.js/master/media/full.png

Amend via styling (blur and setting font colour red)::
obfuscate("a", [["filter","blur(1em)"],["color","red"]);

https://raw.github.com/neilstuartcraig/obfuscate.js/master/media/obfuscate-blur1.png

  • There is some heurestics to keep the text similar looking to the original text i.e. retaining all whitespaces and punctuation in place
  • It's vanilla Javascript
  • Tested with Firefox, Chrome
  • Make a logic which keeps text length intact (replaces words with the words of same width)
  • Create a bookmarklet out of it. Currently one cannot execute bookmarklet code (bookmark.js) because some sort of access error with Javascript window object

Mikko Ohtamaa (Twitter, Facebook)

Neil Craig (Twitter) (amendments to allow CSS styles)

Lea Verou: getVendorPrefix() (a few very minor modifications made)

PHPJS: ucfirst() (used with no modifications)

obfuscate.js's People

Contributors

neilstuartcraig avatar miohtama avatar

Watchers

James Cloos avatar Anthony Zee 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.