Skip to content

Instantly share code, notes, and snippets.

@sebz
Created July 21, 2015 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebz/54411974e251070926c7 to your computer and use it in GitHub Desktop.
Save sebz/54411974e251070926c7 to your computer and use it in GitHub Desktop.

Atom Beautify - Debugging information

The following debugging information was generated by Atom Beautify on Tue Jul 21 2015 13:37:01 GMT+0200 (CEST).


Platform: linux

Versions

Atom Version: 1.0.0

Atom Beautify Version: 0.28.8

Original file to be beautified

Original File Path: /home/sebz/dev/swir/proto/matasano/index.js

Original File Grammar: JavaScript

Original File Language: JavaScript

Original File Contents:

var fs = require("fs");

// http://cryptopals.com/sets/1/challenges/1/
// Convert hex to base64
function challenge1(hex) {
    var b = new Buffer(hex, "hex");
    return b.toString('base64');
}
// console.log("base64:", challenge1("49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d"));

// http://cryptopals.com/sets/1/challenges/2/
// Fixed XOR
// Write a function that takes two equal-length buffers and produces their XOR combination.
function challenge2(buff1, buff2) {
    var b = new Buffer(buff1, "hex");
    var b2 = new Buffer(buff2, "hex");

    if (b.length != b2.length) {
        throw new Error("The 2 buffers must have the same length");
    }
    var xored = [];
    for (var i = 0; i < b.length; i++) {
        xored.push(b[i] ^ b2[i]);
    }
    console.log(xored);
    return new Buffer(xored).toString("hex");
}

// console.log(challenge2("1c0111001f010100061a024b53535009181c", "686974207468652062756c6c277320657965"));


// http://cryptopals.com/sets/1/challenges/3/
function challenge3(str) {
    var b = new Buffer(str, "hex");

    function xor(buffer, key) {
        var xored = [];
        for (var j = 0; j < buffer.length; j++) {
            xored.push(buffer[j] ^ key);
        }
        return new Buffer(xored).toString("utf8");
    }


    var decodedList = [];
    for (var i = 0; i < 255; i++) {
        decodedList.push(xor(b, i));
    }

    var bestScore = 0;
    var winner = "";
    for (var k = 0; k < decodedList.length; k++) {
        var decodedStr = decodedList[k];
        var score = computeScore(decodedStr);
        if (score > bestScore) {
            bestScore = score;
            winner = {
                input: str,
                key: new Buffer([k]).toString("utf8"),
                decodedString: decodedStr,
                score: score
            };
        }
    }
    // console.log("Winner:", winner);
    return winner;
}

// challenge3("1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736");


// http://cryptopals.com/sets/1/challenges/4/
function challenge4(filePath) {
    fs.readFile(filePath, function(err, data) {
        if (err) {
            console.error("Error:", err);
            return;
        }
        var bufferString = data.toString();
        var lines = bufferString.split('\n');
        var winner;
        for (var i = 0; i < lines.length; i++) {
            var line = lines[i];
            var lineWinner = challenge3(line);
            if (!winner || winner.score < lineWinner.score) {
                winner = lineWinner;
            }
        }
        console.log("THE winner:", winner);
    });
}

// challenge4("./4.txt");

// http://cryptopals.com/sets/1/challenges/5/
function challenge5(sentence, key) {
    var theKey = key;
    while (theKey.length < sentence.length) {
        theKey += key;
    }

    var b = new Buffer(sentence, "ascii");
    var b2 = new Buffer(theKey, "ascii");

    var xored = [];
    for (var i = 0; i < b.length; i++) {
        xored.push(b[i] ^ b2[i]);
    }
    console.log(xored);
    return new Buffer(xored).toString("hex");
}
// console.log(challenge5("Burning 'em, if you ain't quick and nimble\nI go crazy when I hear a cymbal", "ICE"));


// http://cryptopals.com/sets/1/challenges/6/
function challenge6() {
    var s1 = "this is a test";
    var s2 = "wokka wokka!!!";
    console.log(hammingDistance(new Buffer(s1, "ascii"), new Buffer(s2, "ascii")));

    var fileContent = fs.readFileSync("./6.txt");

    var bufferString = fileContent.toString();
    var lines = bufferString.split('\n');
    console.log("lines", lines);
}
challenge6();

////////////
// UTILS
///////////

function byteDist(b1, b2) {
    var res = 0;
    for (var i = 0; i < 8; i++) {
        var bit1 = b1 & (1 << i) ? 1 : 0;
        var bit2 = b2 & (1 << i) ? 1 : 0;
        if (bit1 != bit2) {
            res++;
        }
    }
    return res;
}

function hammingDistance(bytes1, bytes2) {
    var res = 0;
    for (var i = 0; i < bytes1.length; i++) {
        res += byteDist(bytes1[i], bytes2[i]);
    }
    return res;
}

function computeScore(str) {
    var score = 0;
    for (var j = 0; j < str.length; j++) {
        var c = str.charAt(j).charCodeAt();
        if (c > 31 && c < 127) {
            // printable ascii
            score += 10;
        }
        if (c == 32) {
            // space
            score += 40;

        } else if (c == 69 || c == 101) {
            // e's
            score += 20;

        } else if (c > 96 && c < 123) {
            // lowercase alpha
            score += 10;

        } else if (c > 64 && c < 91) {
            // uppercase alpha
            score += 5;

        }
    }
    return score;
}

Beautification options

Editor Options: Options from Atom Editor settings

{
    "_default": {
        "indent_size": 4,
        "indent_char": " ",
        "indent_with_tabs": false
    }
}

Config Options: Options from Atom Beautify package settings

{
    "js": {
        "end_with_newline": true,
        "indent_size": 4,
        "indent_char": " ",
        "indent_level": 0,
        "indent_with_tabs": false,
        "preserve_newlines": true,
        "max_preserve_newlines": 10,
        "space_in_paren": false,
        "jslint_happy": false,
        "space_after_anon_function": false,
        "brace_style": "collapse",
        "break_chained_methods": false,
        "keep_array_indentation": false,
        "keep_function_indentation": false,
        "space_before_conditional": true,
        "eval_code": false,
        "unescape_strings": false,
        "wrap_line_length": 0
    },
    "cs": {
        "configPath": ""
    },
    "c": {
        "configPath": ""
    },
    "cpp": {
        "configPath": ""
    },
    "css": {
        "indent_size": 4,
        "indent_char": " ",
        "selector_separator_newline": false,
        "newline_between_rules": false,
        "preserve_newlines": false,
        "wrap_line_length": 0,
        "indent_comments": true,
        "force_indentation": false,
        "convert_quotes": "none",
        "align_assignments": false
    },
    "d": {
        "configPath": ""
    },
    "fortran": {
        "emacs_path": "",
        "emacs_script_path": ""
    },
    "html": {
        "indent_inner_html": false,
        "indent_size": 4,
        "indent_char": " ",
        "brace_style": "collapse",
        "indent_scripts": "normal",
        "wrap_line_length": 250,
        "wrap_attributes": "auto",
        "wrap_attributes_indent_size": 4,
        "preserve_newlines": true,
        "max_preserve_newlines": 10,
        "unformatted": [
            "a",
            "sub",
            "sup",
            "b",
            "i",
            "u"
        ],
        "end_with_newline": false
    },
    "java": {
        "configPath": ""
    },
    "objectivec": {
        "configPath": ""
    },
    "pawn": {
        "configPath": ""
    },
    "perl": {
        "perltidy_profile": ""
    },
    "php": {
        "cs_fixer_path": "",
        "fixers": "",
        "level": ""
    },
    "python": {
        "max_line_length": 79,
        "indent_size": 4,
        "ignore": [
            "E24"
        ]
    },
    "ruby": {
        "indent_size": 4,
        "indent_char": " "
    },
    "rust": {
        "rustfmt_path": ""
    },
    "sql": {
        "indent_size": 4,
        "keywords": "upper",
        "identifiers": "lower"
    },
    "vala": {
        "configPath": ""
    }
}

Home Options: Options from /home/sebz/.jsbeautifyrc

{
    "_default": {}
}

EditorConfig Options: Options from EditorConfig file

{
    "_default": {}
}

Project Options: Options from .jsbeautifyrc files starting from directory /home/sebz/dev/swir/proto/matasano and going up to root

[
    {
        "_default": {}
    },
    {
        "_default": {}
    },
    {
        "_default": {}
    },
    {
        "_default": {}
    },
    {
        "_default": {}
    },
    {
        "_default": {}
    }
]

Final Options: Final combined options that are used

{
    "indent_size": 4,
    "indent_char": " ",
    "indent_with_tabs": false,
    "end_with_newline": true,
    "indent_level": 0,
    "preserve_newlines": true,
    "max_preserve_newlines": 10,
    "space_in_paren": false,
    "jslint_happy": false,
    "space_after_anon_function": false,
    "brace_style": "collapse",
    "break_chained_methods": false,
    "keep_array_indentation": false,
    "keep_function_indentation": false,
    "space_before_conditional": true,
    "eval_code": false,
    "unescape_strings": false,
    "wrap_line_length": 0
}

Package Settings: The raw package settings options

{
    "_analyticsUserId": "sebz",
    "js_end_with_newline": true,
    "language_js_beautify_on_save": true,
    "analytics": true,
    "_loggerLevel": "warn",
    "beautifyEntireFileOnSave": true,
    "muteUnsupportedLanguageErrors": false,
    "muteAllErrors": false,
    "cs_configPath": "",
    "c_configPath": "",
    "cpp_configPath": "",
    "css_indent_size": 4,
    "css_indent_char": " ",
    "css_selector_separator_newline": false,
    "css_newline_between_rules": false,
    "css_preserve_newlines": false,
    "css_wrap_line_length": 0,
    "css_indent_comments": true,
    "css_force_indentation": false,
    "css_convert_quotes": "none",
    "css_align_assignments": false,
    "d_configPath": "",
    "fortran_emacs_path": "",
    "fortran_emacs_script_path": "",
    "html_indent_inner_html": false,
    "html_indent_size": 4,
    "html_indent_char": " ",
    "html_brace_style": "collapse",
    "html_indent_scripts": "normal",
    "html_wrap_line_length": 250,
    "html_wrap_attributes": "auto",
    "html_wrap_attributes_indent_size": 4,
    "html_preserve_newlines": true,
    "html_max_preserve_newlines": 10,
    "html_unformatted": [
        "a",
        "sub",
        "sup",
        "b",
        "i",
        "u"
    ],
    "html_end_with_newline": false,
    "java_configPath": "",
    "js_indent_size": 4,
    "js_indent_char": " ",
    "js_indent_level": 0,
    "js_indent_with_tabs": false,
    "js_preserve_newlines": true,
    "js_max_preserve_newlines": 10,
    "js_space_in_paren": false,
    "js_jslint_happy": false,
    "js_space_after_anon_function": false,
    "js_brace_style": "collapse",
    "js_break_chained_methods": false,
    "js_keep_array_indentation": false,
    "js_keep_function_indentation": false,
    "js_space_before_conditional": true,
    "js_eval_code": false,
    "js_unescape_strings": false,
    "js_wrap_line_length": 0,
    "objectivec_configPath": "",
    "pawn_configPath": "",
    "perl_perltidy_profile": "",
    "php_cs_fixer_path": "",
    "php_fixers": "",
    "php_level": "",
    "python_max_line_length": 79,
    "python_indent_size": 4,
    "python_ignore": [
        "E24"
    ],
    "ruby_indent_size": 4,
    "ruby_indent_char": " ",
    "rust_rustfmt_path": "",
    "sql_indent_size": 4,
    "sql_keywords": "upper",
    "sql_identifiers": "lower",
    "vala_configPath": "",
    "language_cs_disabled": false,
    "language_cs_default_beautifier": "Uncrustify",
    "language_cs_beautify_on_save": false,
    "language_c_disabled": false,
    "language_c_default_beautifier": "Uncrustify",
    "language_c_beautify_on_save": false,
    "language_coffeescript_disabled": false,
    "language_coffeescript_default_beautifier": "coffee-fmt",
    "language_coffeescript_beautify_on_save": false,
    "language_cpp_disabled": false,
    "language_cpp_default_beautifier": "Uncrustify",
    "language_cpp_beautify_on_save": false,
    "language_css_disabled": false,
    "language_css_default_beautifier": "JS Beautify",
    "language_css_beautify_on_save": false,
    "language_csv_disabled": false,
    "language_csv_default_beautifier": "Pretty Diff",
    "language_csv_beautify_on_save": false,
    "language_d_disabled": false,
    "language_d_default_beautifier": "Uncrustify",
    "language_d_beautify_on_save": false,
    "language_ejs_disabled": false,
    "language_ejs_default_beautifier": "Pretty Diff",
    "language_ejs_beautify_on_save": false,
    "language_erb_disabled": false,
    "language_erb_default_beautifier": "Pretty Diff",
    "language_erb_beautify_on_save": false,
    "language_go_disabled": false,
    "language_go_default_beautifier": "gofmt",
    "language_go_beautify_on_save": false,
    "language_fortran_disabled": false,
    "language_fortran_default_beautifier": "Fortran Beautifier",
    "language_fortran_beautify_on_save": false,
    "language_handlebars_disabled": false,
    "language_handlebars_default_beautifier": "JS Beautify",
    "language_handlebars_beautify_on_save": false,
    "language_html_disabled": false,
    "language_html_default_beautifier": "JS Beautify",
    "language_html_beautify_on_save": false,
    "language_java_disabled": false,
    "language_java_default_beautifier": "Uncrustify",
    "language_java_beautify_on_save": false,
    "language_js_disabled": false,
    "language_js_default_beautifier": "JS Beautify",
    "language_json_disabled": false,
    "language_json_default_beautifier": "JS Beautify",
    "language_json_beautify_on_save": false,
    "language_jsx_disabled": false,
    "language_jsx_default_beautifier": "Pretty Diff",
    "language_jsx_beautify_on_save": false,
    "language_less_disabled": false,
    "language_less_default_beautifier": "Pretty Diff",
    "language_less_beautify_on_save": false,
    "language_markdown_disabled": false,
    "language_markdown_default_beautifier": "Tidy Markdown",
    "language_markdown_beautify_on_save": false,
    "language_marko_disabled": false,
    "language_marko_default_beautifier": "JS Beautify",
    "language_marko_beautify_on_save": false,
    "language_mustache_disabled": false,
    "language_mustache_default_beautifier": "JS Beautify",
    "language_mustache_beautify_on_save": false,
    "language_objectivec_disabled": false,
    "language_objectivec_default_beautifier": "Uncrustify",
    "language_objectivec_beautify_on_save": false,
    "language_pawn_disabled": false,
    "language_pawn_default_beautifier": "Uncrustify",
    "language_pawn_beautify_on_save": false,
    "language_perl_disabled": false,
    "language_perl_default_beautifier": "Perltidy",
    "language_perl_beautify_on_save": false,
    "language_php_disabled": false,
    "language_php_default_beautifier": "PHP-CS-Fixer",
    "language_php_beautify_on_save": false,
    "language_python_disabled": false,
    "language_python_default_beautifier": "autopep8",
    "language_python_beautify_on_save": false,
    "language_ruby_disabled": false,
    "language_ruby_default_beautifier": "Rubocop",
    "language_ruby_beautify_on_save": false,
    "language_rust_disabled": false,
    "language_rust_default_beautifier": "rustfmt",
    "language_rust_beautify_on_save": false,
    "language_sass_disabled": false,
    "language_sass_default_beautifier": "Pretty Diff",
    "language_sass_beautify_on_save": false,
    "language_scss_disabled": false,
    "language_scss_default_beautifier": "Pretty Diff",
    "language_scss_beautify_on_save": false,
    "language_spacebars_disabled": false,
    "language_spacebars_default_beautifier": "Pretty Diff",
    "language_spacebars_beautify_on_save": false,
    "language_sql_disabled": false,
    "language_sql_default_beautifier": "sqlformat",
    "language_sql_beautify_on_save": false,
    "language_svg_disabled": false,
    "language_svg_default_beautifier": "Pretty Diff",
    "language_svg_beautify_on_save": false,
    "language_swig_disabled": false,
    "language_swig_default_beautifier": "Pretty Diff",
    "language_swig_beautify_on_save": false,
    "language_tss_disabled": false,
    "language_tss_default_beautifier": "Pretty Diff",
    "language_tss_beautify_on_save": false,
    "language_twig_disabled": false,
    "language_twig_default_beautifier": "Pretty Diff",
    "language_twig_beautify_on_save": false,
    "language_typescript_disabled": false,
    "language_typescript_default_beautifier": "TypeScript Formatter",
    "language_typescript_beautify_on_save": false,
    "language_vala_disabled": false,
    "language_vala_default_beautifier": "Uncrustify",
    "language_vala_beautify_on_save": false,
    "language_visualforce_disabled": false,
    "language_visualforce_default_beautifier": "Pretty Diff",
    "language_visualforce_beautify_on_save": false,
    "language_xml_disabled": false,
    "language_xml_default_beautifier": "Pretty Diff",
    "language_xml_beautify_on_save": false
}

Results

Beautified File Contents:

var fs = require("fs");

// http://cryptopals.com/sets/1/challenges/1/
// Convert hex to base64
function challenge1(hex) {
    var b = new Buffer(hex, "hex");
    return b.toString('base64');
}
// console.log("base64:", challenge1("49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d"));

// http://cryptopals.com/sets/1/challenges/2/
// Fixed XOR
// Write a function that takes two equal-length buffers and produces their XOR combination.
function challenge2(buff1, buff2) {
    var b = new Buffer(buff1, "hex");
    var b2 = new Buffer(buff2, "hex");

    if (b.length != b2.length) {
        throw new Error("The 2 buffers must have the same length");
    }
    var xored = [];
    for (var i = 0; i < b.length; i++) {
        xored.push(b[i] ^ b2[i]);
    }
    console.log(xored);
    return new Buffer(xored).toString("hex");
}

// console.log(challenge2("1c0111001f010100061a024b53535009181c", "686974207468652062756c6c277320657965"));


// http://cryptopals.com/sets/1/challenges/3/
function challenge3(str) {
    var b = new Buffer(str, "hex");

    function xor(buffer, key) {
        var xored = [];
        for (var j = 0; j < buffer.length; j++) {
            xored.push(buffer[j] ^ key);
        }
        return new Buffer(xored).toString("utf8");
    }


    var decodedList = [];
    for (var i = 0; i < 255; i++) {
        decodedList.push(xor(b, i));
    }

    var bestScore = 0;
    var winner = "";
    for (var k = 0; k < decodedList.length; k++) {
        var decodedStr = decodedList[k];
        var score = computeScore(decodedStr);
        if (score > bestScore) {
            bestScore = score;
            winner = {
                input: str,
                key: new Buffer([k]).toString("utf8"),
                decodedString: decodedStr,
                score: score
            };
        }
    }
    // console.log("Winner:", winner);
    return winner;
}

// challenge3("1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736");


// http://cryptopals.com/sets/1/challenges/4/
function challenge4(filePath) {
    fs.readFile(filePath, function(err, data) {
        if (err) {
            console.error("Error:", err);
            return;
        }
        var bufferString = data.toString();
        var lines = bufferString.split('\n');
        var winner;
        for (var i = 0; i < lines.length; i++) {
            var line = lines[i];
            var lineWinner = challenge3(line);
            if (!winner || winner.score < lineWinner.score) {
                winner = lineWinner;
            }
        }
        console.log("THE winner:", winner);
    });
}

// challenge4("./4.txt");

// http://cryptopals.com/sets/1/challenges/5/
function challenge5(sentence, key) {
    var theKey = key;
    while (theKey.length < sentence.length) {
        theKey += key;
    }

    var b = new Buffer(sentence, "ascii");
    var b2 = new Buffer(theKey, "ascii");

    var xored = [];
    for (var i = 0; i < b.length; i++) {
        xored.push(b[i] ^ b2[i]);
    }
    console.log(xored);
    return new Buffer(xored).toString("hex");
}
// console.log(challenge5("Burning 'em, if you ain't quick and nimble\nI go crazy when I hear a cymbal", "ICE"));


// http://cryptopals.com/sets/1/challenges/6/
function challenge6() {
    var s1 = "this is a test";
    var s2 = "wokka wokka!!!";
    console.log(hammingDistance(new Buffer(s1, "ascii"), new Buffer(s2, "ascii")));

    var fileContent = fs.readFileSync("./6.txt");

    var bufferString = fileContent.toString();
    var lines = bufferString.split('\n');
    console.log("lines", lines);
}
challenge6();

////////////
// UTILS
///////////

function byteDist(b1, b2) {
    var res = 0;
    for (var i = 0; i < 8; i++) {
        var bit1 = b1 & (1 << i) ? 1 : 0;
        var bit2 = b2 & (1 << i) ? 1 : 0;
        if (bit1 != bit2) {
            res++;
        }
    }
    return res;
}

function hammingDistance(bytes1, bytes2) {
    var res = 0;
    for (var i = 0; i < bytes1.length; i++) {
        res += byteDist(bytes1[i], bytes2[i]);
    }
    return res;
}

function computeScore(str) {
    var score = 0;
    for (var j = 0; j < str.length; j++) {
        var c = str.charAt(j).charCodeAt();
        if (c > 31 && c < 127) {
            // printable ascii
            score += 10;
        }
        if (c == 32) {
            // space
            score += 40;

        } else if (c == 69 || c == 101) {
            // e's
            score += 20;

        } else if (c > 96 && c < 123) {
            // lowercase alpha
            score += 10;

        } else if (c > 64 && c < 91) {
            // uppercase alpha
            score += 5;

        }
    }
    return score;
}

Logs:

2015-07-21T11:37:01.270Z - info: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] beautify var fs = require("fs");

// http://cryptopals.com/sets/1/challenges/1/
// Convert hex to base64
function challenge1(hex) {
    var b = new Buffer(hex, "hex");
    return b.toString('base64');
}
// console.log("base64:", challenge1("49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d"));

// http://cryptopals.com/sets/1/challenges/2/
// Fixed XOR
// Write a function that takes two equal-length buffers and produces their XOR combination.
function challenge2(buff1, buff2) {
    var b = new Buffer(buff1, "hex");
    var b2 = new Buffer(buff2, "hex");

    if (b.length != b2.length) {
        throw new Error("The 2 buffers must have the same length");
    }
    var xored = [];
    for (var i = 0; i < b.length; i++) {
        xored.push(b[i] ^ b2[i]);
    }
    console.log(xored);
    return new Buffer(xored).toString("hex");
}

// console.log(challenge2("1c0111001f010100061a024b53535009181c", "686974207468652062756c6c277320657965"));


// http://cryptopals.com/sets/1/challenges/3/
function challenge3(str) {
    var b = new Buffer(str, "hex");

    function xor(buffer, key) {
        var xored = [];
        for (var j = 0; j < buffer.length; j++) {
            xored.push(buffer[j] ^ key);
        }
        return new Buffer(xored).toString("utf8");
    }


    var decodedList = [];
    for (var i = 0; i < 255; i++) {
        decodedList.push(xor(b, i));
    }

    var bestScore = 0;
    var winner = "";
    for (var k = 0; k < decodedList.length; k++) {
        var decodedStr = decodedList[k];
        var score = computeScore(decodedStr);
        if (score > bestScore) {
            bestScore = score;
            winner = {
                input: str,
                key: new Buffer([k]).toString("utf8"),
                decodedString: decodedStr,
                score: score
            };
        }
    }
    // console.log("Winner:", winner);
    return winner;
}

// challenge3("1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736");


// http://cryptopals.com/sets/1/challenges/4/
function challenge4(filePath) {
    fs.readFile(filePath, function(err, data) {
        if (err) {
            console.error("Error:", err);
            return;
        }
        var bufferString = data.toString();
        var lines = bufferString.split('\n');
        var winner;
        for (var i = 0; i < lines.length; i++) {
            var line = lines[i];
            var lineWinner = challenge3(line);
            if (!winner || winner.score < lineWinner.score) {
                winner = lineWinner;
            }
        }
        console.log("THE winner:", winner);
    });
}

// challenge4("./4.txt");

// http://cryptopals.com/sets/1/challenges/5/
function challenge5(sentence, key) {
    var theKey = key;
    while (theKey.length < sentence.length) {
        theKey += key;
    }

    var b = new Buffer(sentence, "ascii");
    var b2 = new Buffer(theKey, "ascii");

    var xored = [];
    for (var i = 0; i < b.length; i++) {
        xored.push(b[i] ^ b2[i]);
    }
    console.log(xored);
    return new Buffer(xored).toString("hex");
}
// console.log(challenge5("Burning 'em, if you ain't quick and nimble\nI go crazy when I hear a cymbal", "ICE"));


// http://cryptopals.com/sets/1/challenges/6/
function challenge6() {
    var s1 = "this is a test";
    var s2 = "wokka wokka!!!";
    console.log(hammingDistance(new Buffer(s1, "ascii"), new Buffer(s2, "ascii")));

    var fileContent = fs.readFileSync("./6.txt");

    var bufferString = fileContent.toString();
    var lines = bufferString.split('\n');
    console.log("lines", lines);
}
challenge6();

////////////
// UTILS
///////////

function byteDist(b1, b2) {
    var res = 0;
    for (var i = 0; i < 8; i++) {
        var bit1 = b1 & (1 << i) ? 1 : 0;
        var bit2 = b2 & (1 << i) ? 1 : 0;
        if (bit1 != bit2) {
            res++;
        }
    }
    return res;
}

function hammingDistance(bytes1, bytes2) {
    var res = 0;
    for (var i = 0; i < bytes1.length; i++) {
        res += byteDist(bytes1[i], bytes2[i]);
    }
    return res;
}

function computeScore(str) {
    var score = 0;
    for (var j = 0; j < str.length; j++) {
        var c = str.charAt(j).charCodeAt();
        if (c > 31 && c < 127) {
            // printable ascii
            score += 10;
        }
        if (c == 32) {
            // space
            score += 40;

        } else if (c == 69 || c == 101) {
            // e's
            score += 20;

        } else if (c > 96 && c < 123) {
            // lowercase alpha
            score += 10;

        } else if (c > 64 && c < 91) {
            // uppercase alpha
            score += 5;

        }
    }
    return score;
}
 [ { _default: { indent_size: 4, indent_char: ' ', indent_with_tabs: false } },
  { js: 
     { end_with_newline: true,
       indent_size: 4,
       indent_char: ' ',
       indent_level: 0,
       indent_with_tabs: false,
       preserve_newlines: true,
       max_preserve_newlines: 10,
       space_in_paren: false,
       jslint_happy: false,
       space_after_anon_function: false,
       brace_style: 'collapse',
       break_chained_methods: false,
       keep_array_indentation: false,
       keep_function_indentation: false,
       space_before_conditional: true,
       eval_code: false,
       unescape_strings: false,
       wrap_line_length: 0 },
    cs: { configPath: '' },
    c: { configPath: '' },
    cpp: { configPath: '' },
    css: 
     { indent_size: 4,
       indent_char: ' ',
       selector_separator_newline: false,
       newline_between_rules: false,
       preserve_newlines: false,
       wrap_line_length: 0,
       indent_comments: true,
       force_indentation: false,
       convert_quotes: 'none',
       align_assignments: false },
    d: { configPath: '' },
    fortran: { emacs_path: '', emacs_script_path: '' },
    html: 
     { indent_inner_html: false,
       indent_size: 4,
       indent_char: ' ',
       brace_style: 'collapse',
       indent_scripts: 'normal',
       wrap_line_length: 250,
       wrap_attributes: 'auto',
       wrap_attributes_indent_size: 4,
       preserve_newlines: true,
       max_preserve_newlines: 10,
       unformatted: [Object],
       end_with_newline: false },
    java: { configPath: '' },
    objectivec: { configPath: '' },
    pawn: { configPath: '' },
    perl: { perltidy_profile: '' },
    php: { cs_fixer_path: '', fixers: '', level: '' },
    python: { max_line_length: 79, indent_size: 4, ignore: [Object] },
    ruby: { indent_size: 4, indent_char: ' ' },
    rust: { rustfmt_path: '' },
    sql: { indent_size: 4, keywords: 'upper', identifiers: 'lower' },
    vala: { configPath: '' } },
  { _default: {} },
  { _default: {} },
  { _default: {} },
  { _default: {} },
  { _default: {} },
  { _default: {} },
  { _default: {} },
  { _default: {} } ] JavaScript /home/sebz/dev/swir/proto/matasano/index.js undefined
2015-07-21T11:37:01.270Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee]  indent_size=4, indent_char= , indent_with_tabs=false, end_with_newline=true, indent_size=4, indent_char= , indent_level=0, indent_with_tabs=false, preserve_newlines=true, max_preserve_newlines=10, space_in_paren=false, jslint_happy=false, space_after_anon_function=false, brace_style=collapse, break_chained_methods=false, keep_array_indentation=false, keep_function_indentation=false, space_before_conditional=true, eval_code=false, unescape_strings=false, wrap_line_length=0, configPath=, configPath=, configPath=, indent_size=4, indent_char= , selector_separator_newline=false, newline_between_rules=false, preserve_newlines=false, wrap_line_length=0, indent_comments=true, force_indentation=false, convert_quotes=none, align_assignments=false, configPath=, emacs_path=, emacs_script_path=, indent_inner_html=false, indent_size=4, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=4, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, configPath=, configPath=, perltidy_profile=, cs_fixer_path=, fixers=, level=, max_line_length=79, indent_size=4, ignore=[E24], indent_size=4, indent_char= , rustfmt_path=, indent_size=4, keywords=upper, identifiers=lower, configPath=, , , , , , , , 
2015-07-21T11:37:01.274Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] [ { name: 'JavaScript',
    namespace: 'js',
    grammars: [ 'JavaScript' ],
    extensions: [ 'js' ],
    defaultBeautifier: 'JS Beautify',
    options: 
     { indent_size: [Object],
       indent_char: [Object],
       indent_level: [Object],
       indent_with_tabs: [Object],
       preserve_newlines: [Object],
       max_preserve_newlines: [Object],
       space_in_paren: [Object],
       jslint_happy: [Object],
       space_after_anon_function: [Object],
       brace_style: [Object],
       break_chained_methods: [Object],
       keep_array_indentation: [Object],
       keep_function_indentation: [Object],
       space_before_conditional: [Object],
       eval_code: [Object],
       unescape_strings: [Object],
       wrap_line_length: [Object],
       end_with_newline: [Object] },
    beautifiers: 
     [ 'JS Beautify',
       'JSCS Fixer',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff' ] },
  { name: 'JSX',
    namespace: 'jsx',
    fallback: [ 'js' ],
    grammars: [ 'JSX', 'JavaScript (JSX)' ],
    extensions: [ 'jsx', 'js' ],
    beautifiers: 
     [ 'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff',
       'Pretty Diff' ] } ] 'JavaScript' 'js'
2015-07-21T11:37:01.274Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] Language JavaScript supported
2015-07-21T11:37:01.274Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] getOptions selections [ 'js' ] indent_size=4, indent_char= , indent_with_tabs=false, end_with_newline=true, indent_size=4, indent_char= , indent_level=0, indent_with_tabs=false, preserve_newlines=true, max_preserve_newlines=10, space_in_paren=false, jslint_happy=false, space_after_anon_function=false, brace_style=collapse, break_chained_methods=false, keep_array_indentation=false, keep_function_indentation=false, space_before_conditional=true, eval_code=false, unescape_strings=false, wrap_line_length=0, configPath=, configPath=, configPath=, indent_size=4, indent_char= , selector_separator_newline=false, newline_between_rules=false, preserve_newlines=false, wrap_line_length=0, indent_comments=true, force_indentation=false, convert_quotes=none, align_assignments=false, configPath=, emacs_path=, emacs_script_path=, indent_inner_html=false, indent_size=4, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=4, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, configPath=, configPath=, perltidy_profile=, cs_fixer_path=, fixers=, level=, max_line_length=79, indent_size=4, ignore=[E24], indent_size=4, indent_char= , rustfmt_path=, indent_size=4, keywords=upper, identifiers=lower, configPath=, , , , , , , , 
2015-07-21T11:37:01.275Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true indent_size=4, indent_char= , indent_with_tabs=false
2015-07-21T11:37:01.275Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js undefined
2015-07-21T11:37:01.275Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js indent_size=4, indent_char= , indent_with_tabs=false
2015-07-21T11:37:01.275Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true end_with_newline=true, indent_size=4, indent_char= , indent_level=0, indent_with_tabs=false, preserve_newlines=true, max_preserve_newlines=10, space_in_paren=false, jslint_happy=false, space_after_anon_function=false, brace_style=collapse, break_chained_methods=false, keep_array_indentation=false, keep_function_indentation=false, space_before_conditional=true, eval_code=false, unescape_strings=false, wrap_line_length=0, configPath=, configPath=, configPath=, indent_size=4, indent_char= , selector_separator_newline=false, newline_between_rules=false, preserve_newlines=false, wrap_line_length=0, indent_comments=true, force_indentation=false, convert_quotes=none, align_assignments=false, configPath=, emacs_path=, emacs_script_path=, indent_inner_html=false, indent_size=4, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=4, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, configPath=, configPath=, perltidy_profile=, cs_fixer_path=, fixers=, level=, max_line_length=79, indent_size=4, ignore=[E24], indent_size=4, indent_char= , rustfmt_path=, indent_size=4, keywords=upper, identifiers=lower, configPath=
2015-07-21T11:37:01.277Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js end_with_newline=true, indent_size=4, indent_char= , indent_level=0, indent_with_tabs=false, preserve_newlines=true, max_preserve_newlines=10, space_in_paren=false, jslint_happy=false, space_after_anon_function=false, brace_style=collapse, break_chained_methods=false, keep_array_indentation=false, keep_function_indentation=false, space_before_conditional=true, eval_code=false, unescape_strings=false, wrap_line_length=0
2015-07-21T11:37:01.277Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js end_with_newline=true, indent_size=4, indent_char= , indent_level=0, indent_with_tabs=false, preserve_newlines=true, max_preserve_newlines=10, space_in_paren=false, jslint_happy=false, space_after_anon_function=false, brace_style=collapse, break_chained_methods=false, keep_array_indentation=false, keep_function_indentation=false, space_before_conditional=true, eval_code=false, unescape_strings=false, wrap_line_length=0
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true 
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js undefined
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true 
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js undefined
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true 
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js undefined
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true 
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js undefined
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true 
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js undefined
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js
2015-07-21T11:37:01.278Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true 
2015-07-21T11:37:01.279Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js undefined
2015-07-21T11:37:01.279Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js
2015-07-21T11:37:01.279Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true 
2015-07-21T11:37:01.279Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js undefined
2015-07-21T11:37:01.279Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js
2015-07-21T11:37:01.279Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true 
2015-07-21T11:37:01.279Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js undefined
2015-07-21T11:37:01.279Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options js
2015-07-21T11:37:01.279Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] JavaScript name=JavaScript, namespace=js, grammars=[JavaScript], extensions=[js], defaultBeautifier=JS Beautify, type=integer, default=4, minimum=0, description=Indentation size/length (Supported by JS Beautify, Pretty Diff), title=JavaScript - Indent size, beautifiers=[JS Beautify, Pretty Diff], type=string, default= , description=Indentation character (Supported by JS Beautify, Pretty Diff), title=JavaScript - Indent char, beautifiers=[JS Beautify, Pretty Diff], type=integer, default=0, description=Initial indentation level (Supported by JS Beautify), title=JavaScript - Indent level, beautifiers=[JS Beautify], type=boolean, default=false, description=Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify), title=JavaScript - Indent with tabs, beautifiers=[JS Beautify], type=boolean, default=true, description=Preserve line-breaks (Supported by JS Beautify, Pretty Diff), title=JavaScript - Preserve newlines, beautifiers=[JS Beautify, Pretty Diff], type=integer, default=10, description=Number of line-breaks to be preserved in one chunk (Supported by JS Beautify), title=JavaScript - Max preserve newlines, beautifiers=[JS Beautify], type=boolean, default=false, description=Add padding spaces within paren, ie. f( a, b ) (Supported by JS Beautify), title=JavaScript - Space in paren, beautifiers=[JS Beautify], type=boolean, default=false, description=Enable jslint-stricter mode (Supported by JS Beautify), title=JavaScript - Jslint happy, beautifiers=[JS Beautify], type=boolean, default=false, description=Add a space before an anonymous function's parens, ie. function () (Supported by JS Beautify, Pretty Diff), title=JavaScript - Space after anon function, beautifiers=[JS Beautify, Pretty Diff], type=string, default=collapse, enum=[collapse, expand, end-expand, none], description=[collapse|expand|end-expand|none] (Supported by JS Beautify), title=JavaScript - Brace style, beautifiers=[JS Beautify], type=boolean, default=false, description=Break chained method calls across subsequent lines (Supported by JS Beautify), title=JavaScript - Break chained methods, beautifiers=[JS Beautify], type=boolean, default=false, description=Preserve array indentation (Supported by JS Beautify), title=JavaScript - Keep array indentation, beautifiers=[JS Beautify], type=boolean, default=false, description= (Supported by JS Beautify), title=JavaScript - Keep function indentation, beautifiers=[JS Beautify], type=boolean, default=true, description= (Supported by JS Beautify), title=JavaScript - Space before conditional, beautifiers=[JS Beautify], type=boolean, default=false, description= (Supported by JS Beautify), title=JavaScript - Eval code, beautifiers=[JS Beautify], type=boolean, default=false, description=Decode printable characters encoded in xNN notation (Supported by JS Beautify), title=JavaScript - Unescape strings, beautifiers=[JS Beautify], type=integer, default=0, description=Wrap lines at next opportunity after N characters (Supported by JS Beautify, Pretty Diff), title=JavaScript - Wrap line length, beautifiers=[JS Beautify, Pretty Diff], type=boolean, default=false, description=End output with newline (Supported by JS Beautify), title=JavaScript - End with newline, beautifiers=[JS Beautify], beautifiers=[JS Beautify, JSCS Fixer, Pretty Diff, Pretty Diff, Pretty Diff, Pretty Diff, Pretty Diff, Pretty Diff, Pretty Diff, Pretty Diff, Pretty Diff, Pretty Diff, Pretty Diff]
2015-07-21T11:37:01.280Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options indent_size=4, indent_char= , indent_with_tabs=false, end_with_newline=true, indent_level=0, preserve_newlines=true, max_preserve_newlines=10, space_in_paren=false, jslint_happy=false, space_after_anon_function=false, brace_style=collapse, break_chained_methods=false, keep_array_indentation=false, keep_function_indentation=false, space_before_conditional=true, eval_code=false, unescape_strings=false, wrap_line_length=0
2015-07-21T11:37:01.280Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] beautifiers silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, languages=[HTML, XML, Handlebars, Mustache, Marko, JavaScript, JSON, CSS], silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, languages=[JavaScript], silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, languages=[CSV, ERB, EJS, HTML, XML, SVG, Spacebars, JSX, JavaScript, CSS, SCSS, Sass, JSON, TSS, Twig, LESS, Swig, Visualforce]
2015-07-21T11:37:01.281Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] JavaScript /home/sebz/dev/swir/proto/matasano/index.js { indent_size: 4,
  indent_char: ' ',
  indent_with_tabs: false,
  end_with_newline: true,
  indent_level: 0,
  preserve_newlines: true,
  max_preserve_newlines: 10,
  space_in_paren: false,
  jslint_happy: false,
  space_after_anon_function: false,
  brace_style: 'collapse',
  break_chained_methods: false,
  keep_array_indentation: false,
  keep_function_indentation: false,
  space_before_conditional: true,
  eval_code: false,
  unescape_strings: false,
  wrap_line_length: 0 } indent_size=4, indent_char= , indent_with_tabs=false, end_with_newline=true, indent_size=4, indent_char= , indent_level=0, indent_with_tabs=false, preserve_newlines=true, max_preserve_newlines=10, space_in_paren=false, jslint_happy=false, space_after_anon_function=false, brace_style=collapse, break_chained_methods=false, keep_array_indentation=false, keep_function_indentation=false, space_before_conditional=true, eval_code=false, unescape_strings=false, wrap_line_length=0, configPath=, configPath=, configPath=, indent_size=4, indent_char= , selector_separator_newline=false, newline_between_rules=false, preserve_newlines=false, wrap_line_length=0, indent_comments=true, force_indentation=false, convert_quotes=none, align_assignments=false, configPath=, emacs_path=, emacs_script_path=, indent_inner_html=false, indent_size=4, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=4, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, configPath=, configPath=, perltidy_profile=, cs_fixer_path=, fixers=, level=, max_line_length=79, indent_size=4, ignore=[E24], indent_size=4, indent_char= , rustfmt_path=, indent_size=4, keywords=upper, identifiers=lower, configPath=, , , , , , , , 
2015-07-21T11:37:01.282Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/index.coffee] beautifier JS Beautify silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, languages=[HTML, XML, Handlebars, Mustache, Marko, JavaScript, JSON, CSS], silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, languages=[JavaScript], silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, languages=[CSV, ERB, EJS, HTML, XML, SVG, Spacebars, JSX, JavaScript, CSS, SCSS, Sass, JSON, TSS, Twig, LESS, Swig, Visualforce]
2015-07-21T11:37:01.283Z - verbose: [/home/sebz/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] JS Beautify language JavaScript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment