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
- 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.
In this point you have the orignal page still with sensitive information
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
Or simply obfuscate all text the whole page:
obfuscate(); // Obfuscate all the text on the page
- There is some heurestics to keep the text similar looking to the orignal 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. Curretly one cannot execute bookmarklet code (bookmark.js)
because some sort of access error with Javascript
window
object