diff --git a/Gruntfile.js b/Gruntfile.js index eb66ec1a..807853d5 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -431,7 +431,7 @@ module.exports = function(grunt) { }, js: { files: "src/js/**/*.js", - tasks: ["concat:js_all", "chmod:build"] + tasks: ["concat:js", "chmod:build"] }, html: { files: "src/html/**/*.html", @@ -443,7 +443,7 @@ module.exports = function(grunt) { }, grunt: { files: "Gruntfile.js", - tasks: ["clean:dev", "concat:css", "concat:js_all", "copy:html_dev", "copy:static_dev", "chmod:build"] + tasks: ["clean:dev", "concat:css", "concat:js", "copy:html_dev", "copy:static_dev", "chmod:build"] } }, }); diff --git a/build/prod/cyberchef.htm b/build/prod/cyberchef.htm index 81c977cf..d20d14da 100755 --- a/build/prod/cyberchef.htm +++ b/build/prod/cyberchef.htm @@ -95,7 +95,7 @@ if (navigator.userAgent && navigator.userAgent.match(/MSIE \d\d?\./)) { document.write("Internet Explorer is not supported, please use Firefox or Chrome instead"); alert("Internet Explorer is not supported, please use Firefox or Chrome instead"); - }
Operations
Recipe
Input
Output
Operations
Recipe
Input
Output
\ No newline at end of file +},ControlsWaiter.prototype.sli_check_change=function(){this.initialise_save_link()},ControlsWaiter.prototype.load_click=function(){this.populate_load_recipes_list(),$("#load-modal").modal()},ControlsWaiter.prototype.save_button_click=function(){var a=document.getElementById("save-name").value,b=document.getElementById("save-text").value;if(!a)return void this.app.alert("Please enter a recipe name","danger",2e3);var c=localStorage.saved_recipes?JSON.parse(localStorage.saved_recipes):[],d=localStorage.recipe_id||0;c.push({id:++d,name:a,recipe:b}),localStorage.saved_recipes=JSON.stringify(c),localStorage.recipe_id=d,this.app.alert('Recipe saved as "'+a+'".',"success",2e3)},ControlsWaiter.prototype.populate_load_recipes_list=function(){for(var a=document.getElementById("load-name"),b=a.options.length;b--;)a.remove(b);var c=localStorage.saved_recipes?JSON.parse(localStorage.saved_recipes):[];for(b=0;bthis.options.auto_bake_threshold&&this.auto_bake_&&(this.manager.controls.set_auto_bake(!1),this.alert("Baking took longer than "+this.options.auto_bake_threshold+"ms, Auto Bake has been disabled.","warning",5e3))}},HTMLApp.prototype.auto_bake=function(){this.auto_bake_&&this.bake()},HTMLApp.prototype.silent_bake=function(){var a=(new Date).getTime(),b=this.get_recipe_config();return this.auto_bake_&&this.chef.silent_bake(b),(new Date).getTime()-a},HTMLApp.prototype.get_input=function(){var a=this.manager.input.get();return sessionStorage.setItem("input_length",a.length),sessionStorage.setItem("input",a),a},HTMLApp.prototype.set_input=function(a){sessionStorage.setItem("input_length",a.length),sessionStorage.setItem("input",a),this.manager.input.set(a)},HTMLApp.prototype.populate_operations_list=function(){document.body.appendChild(document.getElementById("edit-favourites"));for(var a="",b=0;b2?JSON.parse(localStorage.favourites):this.dfavourites;a=this.valid_favourites(a),this.save_favourites(a);var b=this.categories.filter(function(a){return"Favourites"==a.name})[0];b?b.ops=a:this.categories.unshift({name:"Favourites",ops:a})},HTMLApp.prototype.valid_favourites=function(a){for(var b=[],c=0;c=0?void this.alert("'"+a+"' is already in your favourites","info",2e3):(b.push(a),this.save_favourites(b),this.load_favourites(),this.populate_operations_list(),void this.manager.recipe.initialise_operation_drag_n_drop())},HTMLApp.prototype.load_URI_params=function(){this.query_string=function(a){if(""===a)return{};for(var b={},c=0;c"):d[e].value=a[b].args[e];a[b].disabled&&c.querySelector(".disable-icon").click(),a[b].breakpoint&&c.querySelector(".breakpoint").click(),this.progress=0}},HTMLApp.prototype.reset_layout=function(){document.getElementById("operations").style.width="calc(20% - 2px)",document.getElementById("recipe").style.width="calc(30% - 4px)",document.getElementById("IO").style.width="calc(50% - 2px)",document.getElementById("input").style.height="calc(50% - 2px)",document.getElementById("output").style.height="calc(50% - 2px)",this.manager.controls.adjust_width()},HTMLApp.prototype.set_compile_message=function(){var a=new Date,b=Utils.fuzzy_time(a.getTime()-window.compile_time),c='Last build: '+b.substr(0,1).toUpperCase()+b.substr(1)+" ago";""!==window.compile_message&&(c+=" - "+window.compile_message),c+="",document.getElementById("notice").innerHTML=c},HTMLApp.prototype.alert=function(a,b,c,d){var e=new Date;if(console.log("["+e.toLocaleString()+"] "+a),!d){b=b||"danger",c=c||0;var f=document.getElementById("alert"),g=document.getElementById("alert-content");f.classList.remove("alert-danger"),f.classList.remove("alert-warning"),f.classList.remove("alert-info"),f.classList.remove("alert-success"),f.classList.add("alert-"+b),"block"==f.style.display?g.innerHTML+="

["+e.toLocaleTimeString()+"] "+a:g.innerHTML="["+e.toLocaleTimeString()+"] "+a,$("#alert").stop(),f.style.display="block",f.style.opacity=1,c>0&&(clearTimeout(this.alert_timeout),this.alert_timeout=setTimeout(function(){$("#alert").slideUp(100)},c))}},HTMLApp.prototype.confirm=function(a,b,c,d){d=d||this,document.getElementById("confirm-title").innerHTML=a,document.getElementById("confirm-body").innerHTML=b,document.getElementById("confirm-modal").style.display="block",this.confirm_closed=!1,$("#confirm-modal").modal().one("show.bs.modal",function(a){this.confirm_closed=!1}.bind(this)).one("click","#confirm-yes",function(){this.confirm_closed=!0,c.bind(d)(!0),$("#confirm-modal").modal("hide")}.bind(this)).one("hide.bs.modal",function(a){this.confirm_closed||c.bind(d)(!1),this.confirm_closed=!0}.bind(this))},HTMLApp.prototype.alert_close_click=function(){document.getElementById("alert").style.display="none"},HTMLApp.prototype.state_change=function(a){this.auto_bake(),this.options.update_url&&(this.last_state_url=this.manager.controls.generate_state_url(!0,!0),window.history.replaceState({},"CyberChef",this.last_state_url))},HTMLApp.prototype.pop_state=function(a){window.location.href.split("#")[0]!==this.last_state_url&&this.load_URI_params()},HTMLApp.prototype.call_api=function(a,b,c,d,e){b=b||"POST",c=c||{},d=d||void 0,e=e||"application/json";var f=null,g=!1;return $.ajax({url:a,async:!1,type:b,data:c,dataType:d,contentType:e,success:function(a){g=!0,f=a},error:function(a){g=!1,f=a}}),{success:g,response:f}};var HTMLCategory=function(a,b){this.name=a,this.selected=b,this.op_list=[]};HTMLCategory.prototype.add_operation=function(a){this.op_list.push(a)},HTMLCategory.prototype.to_html=function(){for(var a="cat"+this.name.replace(/[\s\/-:_]/g,""),b="
"+this.name+"
    ",c=0;c 
";switch(d+="
",this.type){case"string":case"binary_string":case"byte_array":d+="";break;case"short_string":case"binary_short_string":d+="";break;case"toggle_string":for(d+="
";break;case"number":d+="";break;case"boolean":d+="",this.disable_args&&this.manager.add_dynamic_listener("#"+this.id,"click",this.toggle_disable_args,this);break;case"option":for(d+="";break;case"populate_option":for(d+="",this.manager.add_dynamic_listener("#"+this.id,"change",this.populate_option_change,this);break;case"editable_option":for(d+="
",d+="",d+="",d+="
",this.manager.add_dynamic_listener("#sel-"+this.id,"change",this.editable_option_change,this);break;case"text":d+=""}return d+="
"},HTMLIngredient.prototype.toggle_disable_args=function(a){for(var b,c=a.target,d=c.parentNode.parentNode,e=d.querySelectorAll(".arg-group"),f=0;f"),this.description&&(b+=""),b+=""},HTMLOperation.prototype.to_full_html=function(){for(var a="
"+this.name+"
",b=0;b=0&&(this.name=this.name.slice(0,b)+""+this.name.slice(b,b+a.length)+""+this.name.slice(b+a.length)),this.description&&c>=0&&(this.description=this.description.slice(0,c)+""+this.description.slice(c,c+a.length)+""+this.description.slice(c+a.length))};var HighlighterWaiter=function(a){this.app=a,this.mouse_button_down=!1,this.mouse_target=null};HighlighterWaiter.INPUT=0,HighlighterWaiter.OUTPUT=1,HighlighterWaiter.prototype._is_selection_backwards=function(){var a=!1,b=window.getSelection();if(!b.isCollapsed){var c=document.createRange();c.setStart(b.anchorNode,b.anchorOffset),c.setEnd(b.focusNode,b.focusOffset),a=c.collapsed,c.detach()}return a},HighlighterWaiter.prototype._get_output_html_offset=function(a,b){var c=window.getSelection(),d=document.createRange();return d.selectNodeContents(document.getElementById("output-html")),d.setEnd(a,b),c.removeAllRanges(),c.addRange(d),c.toString().length},HighlighterWaiter.prototype._get_output_html_selection_offsets=function(){var a,b=window.getSelection(),c=0,d=0,e=!1;return b.rangeCount&&(a=b.getRangeAt(b.rangeCount-1),e=this._is_selection_backwards(),c=this._get_output_html_offset(a.startContainer,a.startOffset),d=this._get_output_html_offset(a.endContainer,a.endOffset),b.removeAllRanges(),b.addRange(a),e&&(b.collapseToEnd(),b.extend(b.anchorNode,a.startOffset))),{start:c,end:d}},HighlighterWaiter.prototype.input_scroll=function(a){var b=a.target;document.getElementById("input-highlighter").scrollTop=b.scrollTop,document.getElementById("input-highlighter").scrollLeft=b.scrollLeft},HighlighterWaiter.prototype.output_scroll=function(a){var b=a.target;document.getElementById("output-highlighter").scrollTop=b.scrollTop,document.getElementById("output-highlighter").scrollLeft=b.scrollLeft},HighlighterWaiter.prototype.input_mousedown=function(a){this.mouse_button_down=!0,this.mouse_target=HighlighterWaiter.INPUT,this.remove_highlights();var b=a.target,c=b.selectionStart,d=b.selectionEnd;0===c&&0===d||(document.getElementById("input-selection-info").innerHTML=this.selection_info(c,d),this.highlight_output([{start:c,end:d}]))},HighlighterWaiter.prototype.output_mousedown=function(a){this.mouse_button_down=!0,this.mouse_target=HighlighterWaiter.OUTPUT,this.remove_highlights();var b=a.target,c=b.selectionStart,d=b.selectionEnd;0===c&&0===d||(document.getElementById("output-selection-info").innerHTML=this.selection_info(c,d),this.highlight_input([{start:c,end:d}]))},HighlighterWaiter.prototype.output_html_mousedown=function(a){this.mouse_button_down=!0,this.mouse_target=HighlighterWaiter.OUTPUT;var b=this._get_output_html_selection_offsets();0===b.start&&0===b.end||(document.getElementById("output-selection-info").innerHTML=this.selection_info(b.start,b.end))},HighlighterWaiter.prototype.input_mouseup=function(a){this.mouse_button_down=!1},HighlighterWaiter.prototype.output_mouseup=function(a){this.mouse_button_down=!1},HighlighterWaiter.prototype.output_html_mouseup=function(a){this.mouse_button_down=!1},HighlighterWaiter.prototype.input_mousemove=function(a){if(this.mouse_button_down&&1==a.which&&this.mouse_target==HighlighterWaiter.INPUT){var b=a.target,c=b.selectionStart,d=b.selectionEnd;0===c&&0===d||(document.getElementById("input-selection-info").innerHTML=this.selection_info(c,d),this.highlight_output([{start:c,end:d}]))}},HighlighterWaiter.prototype.output_mousemove=function(a){if(this.mouse_button_down&&1==a.which&&this.mouse_target==HighlighterWaiter.OUTPUT){var b=a.target,c=b.selectionStart,d=b.selectionEnd;0===c&&0===d||(document.getElementById("output-selection-info").innerHTML=this.selection_info(c,d),this.highlight_input([{start:c,end:d}]))}},HighlighterWaiter.prototype.output_html_mousemove=function(a){if(this.mouse_button_down&&1==a.which&&this.mouse_target==HighlighterWaiter.OUTPUT){var b=this._get_output_html_selection_offsets();0===b.start&&0===b.end||(document.getElementById("output-selection-info").innerHTML=this.selection_info(b.start,b.end))}},HighlighterWaiter.prototype.selection_info=function(a,b){var c=b.toString().length;c=c<2?2:c;var d=Utils.pad(a.toString(),c," ").replace(/ /g," "),e=Utils.pad(b.toString(),c," ").replace(/ /g," "),f=Utils.pad((b-a).toString(),c," ").replace(/ /g," ");return"start: "+d+"
end: "+e+"
length: "+f},HighlighterWaiter.prototype.remove_highlights=function(){document.getElementById("input-highlighter").innerHTML="",document.getElementById("output-highlighter").innerHTML="",document.getElementById("input-selection-info").innerHTML="",document.getElementById("output-selection-info").innerHTML=""},HighlighterWaiter.prototype.generate_highlight_list=function(){for(var a=this.app.get_recipe_config(),b=[],c=0;c=0)return!1;var d="[start_highlight]",e=/\[start_highlight\]/g,f="[end_highlight]",g=/\[end_highlight\]/g,h=a.value;if(1==c.length){if(c[0].end/g,">").replace(/\n/g," ").replace(e,'').replace(g,"")+" ",b.style.width=a.clientWidth+"px",b.innerHTML=h,b.scrollTop=a.scrollTop,b.scrollLeft=a.scrollLeft};var InputWaiter=function(a,b){this.app=a,this.manager=b,this.bad_keys=[16,17,18,19,20,27,33,34,35,36,37,38,39,40,44,91,92,93,112,113,114,115,116,117,118,119,120,121,122,123,144,145]};InputWaiter.prototype.get=function(){return document.getElementById("input-text").value},InputWaiter.prototype.set=function(a){document.getElementById("input-text").value=a,window.dispatchEvent(this.manager.statechange)},InputWaiter.prototype.set_input_info=function(a,b){var c=a.toString().length;c=c<2?2:c;var d=Utils.pad(a.toString(),c," ").replace(/ /g," "),e=Utils.pad(b.toString(),c," ").replace(/ /g," ");document.getElementById("input-info").innerHTML="length: "+d+"
lines: "+e},InputWaiter.prototype.input_change=function(a){this.manager.highlighter.remove_highlights(),this.app.progress=0;var b=this.get(),c=b.count("\n")+1;this.set_input_info(b.length,c),this.bad_keys.indexOf(a.keyCode)<0&&window.dispatchEvent(this.manager.statechange)},InputWaiter.prototype.input_dragover=function(a){return"move"!==a.dataTransfer.effectAllowed&&(a.stopPropagation(),a.preventDefault(),void a.target.classList.add("dropping-file"))},InputWaiter.prototype.input_dragleave=function(a){a.stopPropagation(),a.preventDefault(),a.target.classList.remove("dropping-file")},InputWaiter.prototype.input_drop=function(a){if("move"===a.dataTransfer.effectAllowed)return!1;a.stopPropagation(),a.preventDefault();var b=a.target,c=a.dataTransfer.files[0],d=a.dataTransfer.getData("Text"),e=new FileReader,f="",g=0,h=20480,i=function(){f.length>1e5&&this.app.auto_bake_&&(this.manager.controls.set_auto_bake(!1),this.app.alert("Turned off Auto Bake as the input is large","warning",5e3)),this.set(f);var a=this.app.get_recipe_config();a[0]&&"From Hex"==a[0].op||(a.unshift({op:"From Hex",args:["Space"]}),this.app.set_recipe_config(a)),b.classList.remove("loading_file")}.bind(this),j=function(){if(g>=c.size)return void i();b.value="Processing... "+Math.round(g/c.size*100)+"%";var a=c.slice(g,g+h);e.readAsArrayBuffer(a)}.bind(this);e.onload=function(a){var b=new Uint8Array(e.result);f+=Utils.to_hex_fast(b),g+=h,j()}.bind(this),b.classList.remove("dropping-file"),c?(b.classList.add("loading_file"),j()):d&&this.set(d)},InputWaiter.prototype.clear_io_click=function(){this.manager.highlighter.remove_highlights(),document.getElementById("input-text").value="",document.getElementById("output-text").value="",document.getElementById("input-info").innerHTML="",document.getElementById("output-info").innerHTML="",document.getElementById("input-selection-info").innerHTML="",document.getElementById("output-selection-info").innerHTML="",window.dispatchEvent(this.manager.statechange)};var Manager=function(a){this.app=a,this.appstart=new CustomEvent("appstart",{bubbles:!0}),this.operationadd=new CustomEvent("operationadd",{bubbles:!0}),this.operationremove=new CustomEvent("operationremove",{bubbles:!0}),this.oplistcreate=new CustomEvent("oplistcreate",{bubbles:!0}),this.statechange=new CustomEvent("statechange",{bubbles:!0}),this.window=new WindowWaiter(this.app),this.controls=new ControlsWaiter(this.app,this),this.recipe=new RecipeWaiter(this.app,this),this.ops=new OperationsWaiter(this.app,this),this.input=new InputWaiter(this.app,this),this.output=new OutputWaiter(this.app,this),this.options=new OptionsWaiter(this.app),this.highlighter=new HighlighterWaiter(this.app),this.seasonal=new SeasonalWaiter(this.app,this),this.dynamic_handlers={},this.initialise_event_listeners()};Manager.prototype.setup=function(){this.recipe.initialise_operation_drag_n_drop(),this.controls.auto_bake_change(),this.seasonal.load()},Manager.prototype.initialise_event_listeners=function(){window.addEventListener("resize",this.window.window_resize.bind(this.window)),window.addEventListener("blur",this.window.window_blur.bind(this.window)),window.addEventListener("focus",this.window.window_focus.bind(this.window)),window.addEventListener("statechange",this.app.state_change.bind(this.app)),window.addEventListener("popstate",this.app.pop_state.bind(this.app)),document.getElementById("bake").addEventListener("click",this.controls.bake_click.bind(this.controls)),document.getElementById("auto-bake").addEventListener("change",this.controls.auto_bake_change.bind(this.controls)),document.getElementById("step").addEventListener("click",this.controls.step_click.bind(this.controls)),document.getElementById("clr-recipe").addEventListener("click",this.controls.clear_recipe_click.bind(this.controls)),document.getElementById("clr-breaks").addEventListener("click",this.controls.clear_breaks_click.bind(this.controls)),document.getElementById("save").addEventListener("click",this.controls.save_click.bind(this.controls)),document.getElementById("save-button").addEventListener("click",this.controls.save_button_click.bind(this.controls)),document.getElementById("save-link-recipe-checkbox").addEventListener("change",this.controls.slr_check_change.bind(this.controls)),document.getElementById("save-link-input-checkbox").addEventListener("change",this.controls.sli_check_change.bind(this.controls)),document.getElementById("load").addEventListener("click",this.controls.load_click.bind(this.controls)),document.getElementById("load-delete-button").addEventListener("click",this.controls.load_delete_click.bind(this.controls)),document.getElementById("load-name").addEventListener("change",this.controls.load_name_change.bind(this.controls)),document.getElementById("load-button").addEventListener("click",this.controls.load_button_click.bind(this.controls)),this.add_multi_event_listener("#save-text","keyup paste",this.controls.save_text_change,this.controls),this.add_multi_event_listener("#search","keyup paste search",this.ops.search_operations,this.ops),this.add_dynamic_listener(".op_list li.operation","dblclick",this.ops.operation_dblclick,this.ops),document.getElementById("edit-favourites").addEventListener("click",this.ops.edit_favourites_click.bind(this.ops)),document.getElementById("save-favourites").addEventListener("click",this.ops.save_favourites_click.bind(this.ops)),document.getElementById("reset-favourites").addEventListener("click",this.ops.reset_favourites_click.bind(this.ops)),this.add_dynamic_listener(".op_list .op-icon","mouseover",this.ops.op_icon_mouseover,this.ops), +this.add_dynamic_listener(".op_list .op-icon","mouseleave",this.ops.op_icon_mouseleave,this.ops),this.add_dynamic_listener(".op_list","oplistcreate",this.ops.op_list_create,this.ops),this.add_dynamic_listener("li.operation","operationadd",this.recipe.op_add.bind(this.recipe)),this.add_dynamic_listener(".arg","keyup",this.recipe.ing_change,this.recipe),this.add_dynamic_listener(".arg","change",this.recipe.ing_change,this.recipe),this.add_dynamic_listener(".disable-icon","click",this.recipe.disable_click,this.recipe),this.add_dynamic_listener(".breakpoint","click",this.recipe.breakpoint_click,this.recipe),this.add_dynamic_listener("#rec_list li.operation","dblclick",this.recipe.operation_dblclick,this.recipe),this.add_dynamic_listener("#rec_list li.operation > div","dblclick",this.recipe.operation_child_dblclick,this.recipe),this.add_dynamic_listener("#rec_list .input-group .dropdown-menu a","click",this.recipe.dropdown_toggle_click,this.recipe),this.add_dynamic_listener("#rec_list","operationremove",this.recipe.op_remove.bind(this.recipe)),this.add_multi_event_listener("#input-text","keyup paste",this.input.input_change,this.input),document.getElementById("reset-layout").addEventListener("click",this.app.reset_layout.bind(this.app)),document.getElementById("clr-io").addEventListener("click",this.input.clear_io_click.bind(this.input)),document.getElementById("input-text").addEventListener("dragover",this.input.input_dragover.bind(this.input)),document.getElementById("input-text").addEventListener("dragleave",this.input.input_dragleave.bind(this.input)),document.getElementById("input-text").addEventListener("drop",this.input.input_drop.bind(this.input)),document.getElementById("input-text").addEventListener("scroll",this.highlighter.input_scroll.bind(this.highlighter)),document.getElementById("input-text").addEventListener("mouseup",this.highlighter.input_mouseup.bind(this.highlighter)),document.getElementById("input-text").addEventListener("mousemove",this.highlighter.input_mousemove.bind(this.highlighter)),this.add_multi_event_listener("#input-text","mousedown dblclick select",this.highlighter.input_mousedown,this.highlighter),document.getElementById("save-to-file").addEventListener("click",this.output.save_click.bind(this.output)),document.getElementById("switch").addEventListener("click",this.output.switch_click.bind(this.output)),document.getElementById("undo-switch").addEventListener("click",this.output.undo_switch_click.bind(this.output)),document.getElementById("output-text").addEventListener("scroll",this.highlighter.output_scroll.bind(this.highlighter)),document.getElementById("output-text").addEventListener("mouseup",this.highlighter.output_mouseup.bind(this.highlighter)),document.getElementById("output-text").addEventListener("mousemove",this.highlighter.output_mousemove.bind(this.highlighter)),document.getElementById("output-html").addEventListener("mouseup",this.highlighter.output_html_mouseup.bind(this.highlighter)),document.getElementById("output-html").addEventListener("mousemove",this.highlighter.output_html_mousemove.bind(this.highlighter)),this.add_multi_event_listener("#output-text","mousedown dblclick select",this.highlighter.output_mousedown,this.highlighter),this.add_multi_event_listener("#output-html","mousedown dblclick select",this.highlighter.output_html_mousedown,this.highlighter),document.getElementById("options").addEventListener("click",this.options.options_click.bind(this.options)),document.getElementById("reset-options").addEventListener("click",this.options.reset_options_click.bind(this.options)),$(".option-item input:checkbox").on("switchChange.bootstrapSwitch",this.options.switch_change.bind(this.options)),$(".option-item input:checkbox").on("switchChange.bootstrapSwitch",this.options.set_word_wrap.bind(this.options)),this.add_dynamic_listener(".option-item input[type=number]","keyup",this.options.number_change,this.options),this.add_dynamic_listener(".option-item input[type=number]","change",this.options.number_change,this.options),this.add_dynamic_listener(".option-item select","change",this.options.select_change,this.options),document.getElementById("alert-close").addEventListener("click",this.app.alert_close_click.bind(this.app))},Manager.prototype.add_listeners=function(a,b,c,d){d=d||this,[].forEach.call(document.querySelectorAll(a),function(a){a.addEventListener(b,c.bind(d))})},Manager.prototype.add_multi_event_listener=function(a,b,c,d){for(var e=b.split(" "),f=0;f-1&&(this.manager.recipe.add_operation(b[c].innerHTML),this.app.auto_bake()))),13==a.keyCode)a.preventDefault();else if(40==a.keyCode)a.preventDefault(),b=document.querySelectorAll("#search-results li"),b.length&&(c=this.get_selected_op(b),c>-1&&b[c].classList.remove("selected-op"),c==b.length-1&&(c=-1),b[c+1].classList.add("selected-op"));else if(38==a.keyCode)a.preventDefault(),b=document.querySelectorAll("#search-results li"),b.length&&(c=this.get_selected_op(b),c>-1&&b[c].classList.remove("selected-op"),0===c&&(c=b.length),b[c-1].classList.add("selected-op"));else{for(var d=document.getElementById("search-results"),e=a.target,f=e.value;d.firstChild;)d.removeChild(d.firstChild);if($("#categories .in").collapse("hide"),f){for(var g=this.filter_operations(f,!0),h="",i=0;i=0||h>=0){var i=new HTMLOperation(e,this.app.operations[e],this.app,this.manager);b&&i.highlight_search_string(a,g,h),g<0?c.push(i):d.push(i)}}return d.concat(c)},OperationsWaiter.prototype.get_selected_op=function(a){for(var b=0;blength: "+e+"
lines: "+f,document.getElementById("input-selection-info").innerHTML="",document.getElementById("output-selection-info").innerHTML=""},OutputWaiter.prototype.save_click=function(){var a=Utils.to_base64(this.app.dish_str),b=window.prompt("Please enter a filename:","download.dat");if(b){var c=document.createElement("a");c.setAttribute("href","data:application/octet-stream;base64;charset=utf-8,"+a),c.setAttribute("download",b),c.style.display="none",document.body.appendChild(c),c.click(),c.remove()}},OutputWaiter.prototype.switch_click=function(){this.switch_orig_data=this.manager.input.get(),document.getElementById("undo-switch").disabled=!1,this.app.set_input(this.app.dish_str)},OutputWaiter.prototype.undo_switch_click=function(){this.app.set_input(this.switch_orig_data),document.getElementById("undo-switch").disabled=!0};var RecipeWaiter=function(a,b){this.app=a,this.manager=b,this.remove_intent=!1};RecipeWaiter.prototype.initialise_operation_drag_n_drop=function(){var a=document.getElementById("rec_list");document.querySelectorAll(".category .op_list");Sortable.create(a,{group:"recipe",sort:!0,animation:0,delay:0,filter:".arg-input,.arg",setData:function(a,b){a.setData("Text",b.querySelector(".arg-title").textContent)},onEnd:function(a){this.remove_intent&&(a.item.remove(),a.target.dispatchEvent(this.manager.operationremove))}.bind(this)}),Sortable.utils.on(a,"dragover",function(){this.remove_intent=!1}.bind(this)),Sortable.utils.on(a,"dragleave",function(){this.remove_intent=!0,this.app.progress=0}.bind(this)),document.querySelector("#categories a").addEventListener("dragover",this.fav_dragover.bind(this)),document.querySelector("#categories a").addEventListener("dragleave",this.fav_dragleave.bind(this)),document.querySelector("#categories a").addEventListener("drop",this.fav_drop.bind(this))},RecipeWaiter.prototype.create_sortable_seed_list=function(a){Sortable.create(a,{group:{name:"recipe",pull:"clone",put:!1},sort:!1,setData:function(a,b){a.setData("Text",b.textContent)},onStart:function(a){$(a.item).popover("destroy"),a.item.setAttribute("data-toggle","popover-disabled")},onEnd:this.op_sort_end.bind(this)})},RecipeWaiter.prototype.op_sort_end=function(a){return this.remove_intent?void("rec_list"==a.item.parentNode.id&&a.item.remove()):($(a.clone).popover(),$(a.clone).children("[data-toggle=popover]").popover(),void("rec_list"===a.item.parentNode.id&&(this.build_recipe_operation(a.item),a.item.dispatchEvent(this.manager.operationadd))))},RecipeWaiter.prototype.fav_dragover=function(a){return"move"===a.dataTransfer.effectAllowed&&(a.stopPropagation(),a.preventDefault(),void(a.target.className&&a.target.className.indexOf("category-title")>-1?a.target.classList.add("favourites-hover"):a.target.parentNode.className&&a.target.parentNode.className.indexOf("category-title")>-1?a.target.parentNode.classList.add("favourites-hover"):a.target.parentNode.parentNode.className&&a.target.parentNode.parentNode.className.indexOf("category-title")>-1&&a.target.parentNode.parentNode.classList.add("favourites-hover")))},RecipeWaiter.prototype.fav_dragleave=function(a){a.stopPropagation(),a.preventDefault(),document.querySelector("#categories a").classList.remove("favourites-hover")},RecipeWaiter.prototype.fav_drop=function(a){a.stopPropagation(),a.preventDefault(),a.target.classList.remove("favourites-hover");var b=a.dataTransfer.getData("Text");this.app.add_favourite(b)},RecipeWaiter.prototype.ing_change=function(){window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.disable_click=function(a){var b=a.target;"false"==b.getAttribute("disabled")?(b.setAttribute("disabled","true"),b.classList.add("disable-icon-selected"),b.parentNode.parentNode.classList.add("disabled")):(b.setAttribute("disabled","false"),b.classList.remove("disable-icon-selected"),b.parentNode.parentNode.classList.remove("disabled")),this.app.progress=0,window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.breakpoint_click=function(a){var b=a.target;"false"==b.getAttribute("break")?(b.setAttribute("break","true"),b.classList.add("breakpoint-selected")):(b.setAttribute("break","false"),b.classList.remove("breakpoint-selected")),window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.operation_dblclick=function(a){a.target.remove(),window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.operation_child_dblclick=function(a){a.target.parentNode.remove(),window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.get_config=function(){for(var a,b,c,d,e,f=[],g=document.querySelectorAll("#rec_list li.operation"),h=0;h",this.ing_change()},RecipeWaiter.prototype.op_add=function(a){window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.op_remove=function(a){window.dispatchEvent(this.manager.statechange)};var SeasonalWaiter=function(a,b){this.app=a,this.manager=b};SeasonalWaiter.prototype.load=function(){var a=new Date;11==a.getMonth()&&a.getDate()>12&&(this.app.options.snow=!1,this.create_snow_option(),this.manager.add_dynamic_listener(".option-item input:checkbox[option='snow']","switchChange.bootstrapSwitch",this.let_it_snow,this),this.manager.add_window_listener("resize",this.let_it_snow,this),this.manager.add_listeners(".btn","click",this.shake_off_snow,this),25==a.getDate()&&this.let_it_snow()),this.kkeys=[],window.addEventListener("keydown",this.konami_code_listener.bind(this))},SeasonalWaiter.prototype.insert_spider_icons=function(){var a="iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/A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rv+Ba97aaUHMW5NauLmMZFkegBb/EP14d6NoS9QLWFSzWBmuZza8CQmSpXsAqmGtVy14VALWuuYWWy+W3OteXa4jwceQX6+BKG6J1/8+2VCNkm2222WabbbbZZpttttlmm22rt38DCdA0vq3bcAkAAAAASUVORK5CYII=";document.querySelector("link[rel=icon]").setAttribute("href","data:image/png;base64,"+a),document.querySelector("#bake img").setAttribute("src","data:image/png;base64,"+b),document.querySelector(".about-img-left").setAttribute("src","data:image/png;base64,"+c)},SeasonalWaiter.prototype.insert_spider_text=function(){document.title=document.title.replace(/Cyber/g,"Spider"),SeasonalWaiter.tree_walk(document.body,function(a){3==a.nodeType&&(a.nodeValue=a.nodeValue.replace(/Cyber/g,"Spider"))},!0),SeasonalWaiter.tree_walk(document.getElementById("bake-group"),function(a){3==a.nodeType&&(a.nodeValue=a.nodeValue.replace(/Bake/g,"Spin"))},!0),document.querySelector("#recipe .title").innerHTML="Web"},SeasonalWaiter.prototype.create_snow_option=function(){var a=document.getElementById("options-body"),b=document.createElement("div");b.className="option-item",b.innerHTML=" Let it snow",a.appendChild(b),this.manager.options.load()},SeasonalWaiter.prototype.let_it_snow=function(){if($(document).snowfall("clear"),this.app.options.snow){var a={},b=navigator.userAgent.match(/Firefox\/(\d\d?)/);a=b&&parseInt(b[1],10)<30?{flakeCount:10,flakeColor:"#fff",flakePosition:"absolute",minSize:1,maxSize:2,minSpeed:1,maxSpeed:5,round:!1,shadow:!1,collection:!1,collectionHeight:20,deviceorientation:!0}:{flakeCount:35,flakeColor:"#fff",flakePosition:"absolute",minSize:5,maxSize:8,minSpeed:1,maxSpeed:5,round:!0,shadow:!0,collection:".btn",collectionHeight:20,deviceorientation:!0},$(document).snowfall(a)}},SeasonalWaiter.prototype.shake_off_snow=function(a){for(var b=a.target,c=b.getBoundingClientRect(),d=document.querySelectorAll("canvas.snowfall-canvas"),e=null,f=function(){h.clearRect(0,0,e.width,e.height),$(this).fadeIn()},g=0;g6e4&&this.app.silent_bake()};var main=function(){var a=["To Base64","From Base64","To Hex","From Hex","To Hexdump","From Hexdump","URL Decode","Regular expression","Entropy","Fork"],b={update_url:!0,show_highlighter:!0,treat_as_utf8:!0,word_wrap:!0,show_errors:!0,error_timeout:4e3,auto_bake_threshold:200,attempt_highlight:!0,snow:!1};document.removeEventListener("DOMContentLoaded",main,!1),window.app=new HTMLApp(Categories,OperationConfig,a,b),window.app.setup()};window.console=console||{log:function(){},error:function(){}},window.compile_time=moment.tz("Wed Nov 30 2016 23:09:33","ddd MMM D YYYY HH:mm:ss","UTC").valueOf(),window.compile_message="",document.addEventListener("DOMContentLoaded",main,!1); \ No newline at end of file diff --git a/build/prod/index.html b/build/prod/index.html index 81651b78..8a02333f 100755 --- a/build/prod/index.html +++ b/build/prod/index.html @@ -18,4 +18,4 @@ See the License for the specific language governing permissions and limitations under the License. --> -CyberChef Edit
Operations
    Recipe
      Input
      Output
      \ No newline at end of file +CyberChef Edit
      Operations
        Recipe
          Input
          Output
          \ No newline at end of file diff --git a/build/prod/scripts.js b/build/prod/scripts.js index 8c7db456..60121614 100755 --- a/build/prod/scripts.js +++ b/build/prod/scripts.js @@ -263,5 +263,5 @@ c+="Total addresses in range: "+(parseInt(j.join(""),2)+1)+"\n\n"),c},_gen_ipv6_ "06036086480186f8420205":"netscape-cert-sequence","06036086480186f8420206":"netscape-cert-url","06036086480186f84203":"directory","06036086480186f8420401":"serverGatedCrypto","06036086480186f845010603":"Unknown Verisign extension","06036086480186f845010606":"Unknown Verisign extension","06036086480186f84501070101":"Verisign certificatePolicy","06036086480186f8450107010101":"Unknown Verisign policy qualifier","06036086480186f8450107010102":"Unknown Verisign policy qualifier","0603678105":"TCPA","060367810501":"tcpa_specVersion","060367810502":"tcpa_attribute","06036781050201":"tcpa_at_tpmManufacturer","0603678105020a":"tcpa_at_securityQualities","0603678105020b":"tcpa_at_tpmProtectionProfile","0603678105020c":"tcpa_at_tpmSecurityTarget","0603678105020d":"tcpa_at_foundationProtectionProfile","0603678105020e":"tcpa_at_foundationSecurityTarget","0603678105020f":"tcpa_at_tpmIdLabel","06036781050202":"tcpa_at_tpmModel","06036781050203":"tcpa_at_tpmVersion","06036781050204":"tcpa_at_platformManufacturer","06036781050205":"tcpa_at_platformModel","06036781050206":"tcpa_at_platformVersion","06036781050207":"tcpa_at_componentManufacturer","06036781050208":"tcpa_at_componentModel","06036781050209":"tcpa_at_componentVersion","060367810503":"tcpa_protocol","06036781050301":"tcpa_prtt_tpmIdProtocol","0603672a00":"contentType","0603672a0000":"PANData","0603672a0001":"PANToken","0603672a0002":"PANOnly","0603672a01":"msgExt","0603672a0a":"national","0603672a0a8140":"Japan","0603672a02":"field","0603672a0200":"fullName","0603672a0201":"givenName","0603672a020a":"amount","0603672a0202":"familyName","0603672a0203":"birthFamilyName","0603672a0204":"placeName","0603672a0205":"identificationNumber","0603672a0206":"month","0603672a0207":"date","0603672a02070b":"accountNumber","0603672a02070c":"passPhrase","0603672a0208":"address","0603672a0209":"telephone","0603672a03":"attribute","0603672a0300":"cert","0603672a030000":"rootKeyThumb","0603672a030001":"additionalPolicy","0603672a04":"algorithm","0603672a05":"policy","0603672a0500":"root","0603672a06":"module","0603672a07":"certExt","0603672a0700":"hashedRootKey","0603672a0701":"certificateType","0603672a0702":"merchantData","0603672a0703":"cardCertRequired","0603672a0704":"tunneling","0603672a0705":"setExtensions","0603672a0706":"setQualifier","0603672a08":"brand","0603672a0801":"IATA-ATA","0603672a081e":"Diners","0603672a0822":"AmericanExpress","0603672a0804":"VISA","0603672a0805":"MasterCard","0603672a08ae7b":"Novus","0603672a09":"vendor","0603672a0900":"GlobeSet","0603672a0901":"IBM","0603672a090a":"Griffin","0603672a090b":"Certicom","0603672a090c":"OSS","0603672a090d":"TenthMountain","0603672a090e":"Antares","0603672a090f":"ECC","0603672a0910":"Maithean","0603672a0911":"Netscape","0603672a0912":"Verisign","0603672a0913":"BlueMoney","0603672a0902":"CyberCash","0603672a0914":"Lacerte","0603672a0915":"Fujitsu","0603672a0916":"eLab","0603672a0917":"Entrust","0603672a0918":"VIAnet","0603672a0919":"III","0603672a091a":"OpenMarket","0603672a091b":"Lexem","0603672a091c":"Intertrader","0603672a091d":"Persimmon","0603672a0903":"Terisa","0603672a091e":"NABLE","0603672a091f":"espace-net","0603672a0920":"Hitachi","0603672a0921":"Microsoft","0603672a0922":"NEC","0603672a0923":"Mitsubishi","0603672a0924":"NCR","0603672a0925":"e-COMM","0603672a0926":"Gemplus","0603672a0904":"RSADSI","0603672a0905":"VeriFone","0603672a0906":"TrinTech","0603672a0907":"BankGate","0603672a0908":"GTE","0603672a0909":"CompuSource","0603551d01":"authorityKeyIdentifier","0603551d0a":"basicConstraints","0603551d0b":"nameConstraints","0603551d0c":"policyConstraints","0603551d0d":"basicConstraints","0603551d0e":"subjectKeyIdentifier","0603551d0f":"keyUsage","0603551d10":"privateKeyUsagePeriod","0603551d11":"subjectAltName","0603551d12":"issuerAltName","0603551d13":"basicConstraints","0603551d02":"keyAttributes","0603551d14":"cRLNumber","0603551d15":"cRLReason","0603551d16":"expirationDate","0603551d17":"instructionCode","0603551d18":"invalidityDate","0603551d1a":"issuingDistributionPoint","0603551d1b":"deltaCRLIndicator","0603551d1c":"issuingDistributionPoint","0603551d1d":"certificateIssuer","0603551d03":"certificatePolicies","0603551d1e":"nameConstraints","0603551d1f":"cRLDistributionPoints","0603551d20":"certificatePolicies","0603551d21":"policyMappings","0603551d22":"policyConstraints","0603551d23":"authorityKeyIdentifier","0603551d24":"policyConstraints","0603551d25":"extKeyUsage","0603551d04":"keyUsageRestriction","0603551d05":"policyMapping","0603551d06":"subtreesConstraint","0603551d07":"subjectAltName","0603551d08":"issuerAltName","0603551d09":"subjectDirectoryAttributes","0603550400":"objectClass","0603550401":"aliasObjectName","060355040d":"description","060355040e":"searchGuide","060355040f":"businessCategory","0603550410":"postalAddress","0603550411":"postalCode","0603550412":"postOfficeBox","0603550413":"physicalDeliveryOfficeName","0603550402":"knowledgeInformation","0603550415":"telexNumber","0603550416":"teletexTerminalIdentifier","0603550417":"facsimileTelephoneNumber","0603550418":"x121Address","0603550419":"internationalISDNNumber","060355041a":"registeredAddress","060355041b":"destinationIndicator","060355041c":"preferredDeliveryMehtod","060355041d":"presentationAddress","060355041e":"supportedApplicationContext","060355041f":"member","0603550420":"owner","0603550421":"roleOccupant","0603550422":"seeAlso","0603550423":"userPassword","0603550424":"userCertificate","0603550425":"caCertificate","0603550426":"authorityRevocationList","0603550427":"certificateRevocationList","0603550428":"crossCertificatePair","0603550429":"givenName","0603550405":"serialNumber","0603550434":"supportedAlgorithms","0603550435":"deltaRevocationList","060355043a":"crossCertificatePair","06035508":"X.500-Algorithms","0603550801":"X.500-Alg-Encryption","060355080101":"rsa","0603604c0101":"DPC"};var Punycode={IDN:!1,run_to_ascii:function(a,b){var c=b[0];return c?punycode.ToASCII(a):punycode.encode(a)},run_to_unicode:function(a,b){var c=b[0];return c?punycode.ToUnicode(a):punycode.decode(a)}},QuotedPrintable={run_to:function(a,b){var c=QuotedPrintable.mimeEncode(a);return c=c.replace(/\r?\n|\r/g,function(){return"\r\n"}).replace(/[\t ]+$/gm,function(a){return a.replace(/ /g,"=20").replace(/\t/g,"=09")}),QuotedPrintable._addSoftLinebreaks(c,"qp")},run_from:function(a,b){var c=a.replace(/\=(?:\r?\n|$)/g,"");return QuotedPrintable.mimeDecode(c)},mimeDecode:function(a){for(var b,c,d=(a.match(/\=[\da-fA-F]{2}/g)||[]).length,e=a.length-2*d,f=new Array(e),g=0,h=0,i=a.length;h=0;c--)if(b[c].length){if(1==b[c].length&&a==b[c][0])return!0;if(2==b[c].length&&a>=b[c][0]&&a<=b[c][1])return!0}return!1},_addSoftLinebreaks:function(a,b){var c=76;return b=(b||"base64").toString().toLowerCase().trim(),"qp"==b?this._addQPSoftLinebreaks(a,c):this._addBase64SoftLinebreaks(a,c)},_addBase64SoftLinebreaks:function(a,b){return a=(a||"").toString().trim(),a.replace(new RegExp(".{"+b+"}","g"),"$&\r\n").trim()},_addQPSoftLinebreaks:function(a,b){for(var c,d,e,f=0,g=a.length,h=Math.floor(b/3),i="";fb-h&&(c=e.substr(-h).match(/[ \t\.,!\?][^ \t\.,!\?]*$/)))e=e.substr(0,e.length-(c[0].length-1));else if("\r"==e.substr(-1))e=e.substr(0,e.length-1);else if(e.match(/\=[\da-f]{0,2}$/i))for((c=e.match(/\=[\da-f]{0,1}$/i))&&(e=e.substr(0,e.length-c[0].length));e.length>3&&e.length=192)););f+e.length=65&&c<=90?(c=(c-65+d)%26,e[h]=c+65):f&&c>=97&&c<=122&&(c=(c-97+d)%26,e[h]=c+97)}return e},_rotr:function(a){var b=(1&a)<<7;return a>>1|b},_rotl:function(a){var b=a>>7&1;return 255&(a<<1|b)},_rotr_whole:function(a,b){var c,d=0,e=[];b%=8;for(var f=0;f>>0;c=g>>b|d,d=(g&Math.pow(2,b)-1)<<8-b,e.push(c)}return e[0]|=d,e},_rotl_whole:function(a,b){var c,d=0,e=[];b%=8;for(var f=a.length-1;f>=0;f--){var g=a[f];c=255&(g<>8-b&Math.pow(2,b)-1,e[f]=c}return e[a.length-1]=e[a.length-1]|d,e}},SeqUtils={DELIMITER_OPTIONS:["Line feed","CRLF","Space","Comma","Semi-colon","Colon","Nothing (separate chars)"],SORT_REVERSE:!1,SORT_ORDER:["Alphabetical (case sensitive)","Alphabetical (case insensitive)","IP address"],run_sort:function(a,b){var c=Utils.char_rep[b[0]],d=b[1],e=b[2],f=a.split(c);return"Alphabetical (case sensitive)"==e?f=f.sort():"Alphabetical (case insensitive)"==e?f=f.sort(SeqUtils._case_insensitive_sort):"IP address"==e&&(f=f.sort(SeqUtils._ip_sort)),d&&f.reverse(),f.join(c)},run_unique:function(a,b){var c=Utils.char_rep[b[0]];return a.split(c).unique().join(c)},SEARCH_TYPE:["Regex","Extended (\\n, \\t, \\x...)","Simple string"],run_count:function(a,b){var c=b[0].string,d=b[0].option;if("Regex"!=d||!c)return c?(0===d.indexOf("Extended")&&(c=Utils.parse_escaped_chars(c)),a.count(c)):0;try{var e=new RegExp(c,"gi"),f=a.match(e);return f.length}catch(a){return 0}},REVERSE_BY:["Character","Line"],run_reverse:function(a,b){if("Line"==b[0]){for(var c=[],d=[],e=[],f=0;f()\\[\\]{}\\s\\x7F-\\xFF]*(?:[.!,?]+[^.!,?;"\\x27<>()\\[\\]{}\\s\\x7F-\\xFF]+)*)?'},{name:"Domain",value:"(?:(https?):\\/\\/)?([-\\w.]+)\\.(com|net|org|biz|info|co|uk|onion|int|mobi|name|edu|gov|mil|eu|ac|ae|af|de|ca|ch|cn|cy|es|gb|hk|il|in|io|tv|me|nl|no|nz|ro|ru|tr|us|az|ir|kz|uz|pk)+"},{name:"Windows file path",value:"([A-Za-z]):\\\\((?:[A-Za-z\\d][A-Za-z\\d\\- \\x27_\\(\\)]{0,61}\\\\?)*[A-Za-z\\d][A-Za-z\\d\\- \\x27_\\(\\)]{0,61})(\\.[A-Za-z\\d]{1,6})?"},{name:"UNIX file path",value:"(?:/[A-Za-z\\d.][A-Za-z\\d\\-.]{0,61})+"},{name:"MAC address",value:"[A-Fa-f\\d]{2}(?:[:-][A-Fa-f\\d]{2}){5}"},{name:"Date (yyyy-mm-dd)",value:"((?:19|20)\\d\\d)[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])"},{name:"Date (dd/mm/yyyy)",value:"(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.]((?:19|20)\\d\\d)"},{name:"Date (mm/dd/yyyy)",value:"(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.]((?:19|20)\\d\\d)"},{name:"Strings",value:'[A-Za-z\\d/\\-:.,_$%\\x27"()<>= !\\[\\]{}@]{4,}'}],REGEX_CASE_INSENSITIVE:!0,REGEX_MULTILINE_MATCHING:!0,OUTPUT_FORMAT:["Highlight matches","List matches","List capture groups","List matches with capture groups"],DISPLAY_TOTAL:!1,run_regex:function(a,b){var c=b[1],d=b[2],e=b[3],f=b[4],g=b[5],h="g";if(d&&(h+="i"),e&&(h+="m"),!c||"^"==c||"$"==c)return Utils.escape_html(a);try{var i=new RegExp(c,h);switch(g){case"Highlight matches":return StrUtils._regex_highlight(a,i,f);case"List matches":return Utils.escape_html(StrUtils._regex_list(a,i,f,!0,!1));case"List capture groups":return Utils.escape_html(StrUtils._regex_list(a,i,f,!1,!0));case"List matches with capture groups":return Utils.escape_html(StrUtils._regex_list(a,i,f,!0,!0));default:return"Error: Invalid output format"}}catch(a){return"Invalid regex. Details: "+a.message}},CASE_SCOPE:["All","Word","Sentence","Paragraph"],run_upper:function(a,b){var c=b[0];switch(c){case"Word":return a.replace(/(\b\w)/gi,function(a){return a.toUpperCase()});case"Sentence":return a.replace(/(?:\.|^)\s*(\b\w)/gi,function(a){return a.toUpperCase()});case"Paragraph":return a.replace(/(?:\n|^)\s*(\b\w)/gi,function(a){return a.toUpperCase()});case"All":default:return a.toUpperCase()}},run_lower:function(a,b){return a.toLowerCase()},SEARCH_TYPE:["Regex","Extended (\\n, \\t, \\x...)","Simple string"],FIND_REPLACE_GLOBAL:!0,FIND_REPLACE_CASE:!1,FIND_REPLACE_MULTILINE:!0,run_find_replace:function(a,b){var c=b[0].string,d=b[0].option,e=b[1],f=b[2],g=b[3],h=b[4],i="";return f&&(i+="g"),g&&(i+="i"),h&&(i+="m"),"Regex"==d?c=new RegExp(c,i):0===d.indexOf("Extended")&&(c=Utils.parse_escaped_chars(c)),a.replace(c,e,i)},SPLIT_DELIM:",",DELIMITER_OPTIONS:["Line feed","CRLF","Space","Comma","Semi-colon","Colon","Nothing (separate chars)"],run_split:function(a,b){var c=b[0]||StrUtils.SPLIT_DELIM,d=Utils.char_rep[b[1]],e=a.split(c);return e.join(d)},DIFF_SAMPLE_DELIMITER:"\\n\\n",DIFF_BY:["Character","Word","Line","Sentence","CSS","JSON"],run_diff:function(a,b){var c,d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],i=a.split(d),j="";if(!i||2!=i.length)return"Incorrect number of samples, perhaps you need to modify the sample delimiter or add more samples?";switch(e){case"Character":c=JsDiff.diffChars(i[0],i[1]);break;case"Word":c=h?JsDiff.diffWords(i[0],i[1]):JsDiff.diffWordsWithSpace(i[0],i[1]);break;case"Line":c=h?JsDiff.diffTrimmedLines(i[0],i[1]):JsDiff.diffLines(i[0],i[1]);break;case"Sentence":c=JsDiff.diffSentences(i[0],i[1]);break;case"CSS":c=JsDiff.diffCss(i[0],i[1]);break;case"JSON":c=JsDiff.diffJson(i[0],i[1]);break;default:return"Invalid 'Diff by' option."}for(var k=0;k"+Utils.escape_html(c[k].value)+""):c[k].removed?g&&(j+=""+Utils.escape_html(c[k].value)+""):j+=Utils.escape_html(c[k].value);return j},OFF_CHK_SAMPLE_DELIMITER:"\\n\\n",run_offset_checker:function(a,b){var c,d=b[0],e=a.split(d),f=[],g=0,h=0,i=!1,j=!1;if(!e||e.length<2)return"Not enough samples, perhaps you need to modify the sample delimiter or add more data?";for(h=0;h"),h==e.length-1&&(j=!1)):(i&&!j?(f[h]+=""+Utils.escape_html(e[h][g]),e[h].length==g+1&&(f[h]+=""),h==e.length-1&&(j=!0)):!i&&j?(f[h]+=""+Utils.escape_html(e[h][g]),h==e.length-1&&(j=!1)):(f[h]+=Utils.escape_html(e[h][g]),j&&e[h].length==g+1&&(f[h]+="",e[h].length-1!=g&&(j=!1))),e[0].length-1==g&&(j&&(f[h]+=""),f[h]+=Utils.escape_html(e[h].substring(g+1))))}return f.join(d)},run_parse_escaped_string:function(a,b){return Utils.parse_escaped_chars(a)},_regex_highlight:function(a,b,c){for(var d,e="",f=1,g=0,h=0;d=b.exec(a);)e+=Utils.escape_html(a.slice(g,d.index)),e+=""+Utils.escape_html(d[0])+"",f=1==f?2:1,g=b.lastIndex,h++;return e+=Utils.escape_html(a.slice(g,a.length)),c&&(e="Total found: "+h+"\n\n"+e),e},_regex_list:function(a,b,c,d,e){for(var f,g="",h=0;f=b.exec(a);)if(h++,d&&(g+=f[0]+"\n"),e)for(var i=1;ih?g[i][0].length:h;for(i=0;i1&&g[i][1].length?" = "+g[i][1]+"\n":"\n"}return d}return"Invalid URI"},_encode_all_chars:function(a){return encodeURIComponent(a).replace(/!/g,"%21").replace(/#/g,"%23").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/\-/g,"%2D").replace(/\./g,"%2E").replace(/_/g,"%5F").replace(/~/g,"%7E")}},UUID={run_generate_v4:function(a,b){if("undefined"!=typeof window.crypto&&"undefined"!=typeof window.crypto.getRandomValues){var c=new Uint32Array(4),d=0;return window.crypto.getRandomValues(c),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=c[d>>3]>>d%8*4&15,e="x"===a?b:3&b|8;return d++,e.toString(16)})}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"===a?b:3&b|8;return c.toString(16)})}},Unicode={PREFIXES:["\\u","%u","U+"],run_unescape:function(a,b){for(var c,d=Unicode._prefix_to_regex[b[0]],e=new RegExp(d+"([a-f\\d]{4,6})","ig"),f="",g=0;c=e.exec(a);)f+=a.slice(g,c.index),g=c.index,f+=Utils.chr(parseInt(c[1],16)),g=e.lastIndex;return f+=a.slice(g,a.length)},_prefix_to_regex:{"\\u":"\\\\u","%u":"%u","U+":"U\\+"}},Chef=function(){this.dish=new Dish};Chef.prototype.bake=function(a,b,c,d,e){var f=(new Date).getTime(),g=new Recipe(b),h=g.contains_flow_control(),i=!1;c.hasOwnProperty("attempt_highlight")&&(c.attempt_highlight=!0),h&&(c.attempt_highlight=!1),d>=b.length&&(d=0),e&&(g.set_breakpoint(d,!1),g.set_breakpoint(d+1,!0)),d>0&&h&&(g.remove_breaks_up_to(d),d=0),0===d&&this.dish.set(a,Dish.STRING);try{d=g.execute(this.dish,d)}catch(a){i=a,d=a.progress}finally{return{result:this.dish.type==Dish.HTML?this.dish.get(Dish.HTML):this.dish.get(Dish.STRING),type:Dish.enum_lookup(this.dish.type),progress:d,options:c,duration:(new Date).getTime()-f,error:i}}},Chef.prototype.silent_bake=function(a){var b=(new Date).getTime(),c=new Recipe(a),d=new Dish("",Dish.STRING);try{c.execute(d)}catch(a){}return(new Date).getTime()-b};var Dish=function(a,b){this.value=a||"string"==typeof a?a:null,this.type=b||Dish.BYTE_ARRAY};Dish.BYTE_ARRAY=0,Dish.STRING=1,Dish.NUMBER=2,Dish.HTML=3,Dish.type_enum=function(a){switch(a){case"byte_array":case"Byte array":return Dish.BYTE_ARRAY;case"string":case"String":return Dish.STRING;case"number":case"Number":return Dish.NUMBER;case"html":case"HTML":return Dish.HTML;default:throw"Invalid data type string. No matching enum."}},Dish.enum_lookup=function(a){switch(a){case Dish.BYTE_ARRAY:return"byte_array";case Dish.STRING:return"string";case Dish.NUMBER:return"number";case Dish.HTML:return"html";default:throw"Invalid data type enum. No matching type."}},Dish.prototype.set=function(a,b){if(this.value=a,this.type=b,!this.valid()){var c=Utils.truncate(JSON.stringify(this.value),13);throw"Data is not a valid "+Dish.enum_lookup(b)+": "+c}},Dish.prototype.get=function(a){return this.type!=a&&this.translate(a),this.value},Dish.prototype.translate=function(a){switch(this.type){case Dish.STRING:this.value=this.value?Utils.str_to_byte_array(this.value):[],this.type=Dish.BYTE_ARRAY;break;case Dish.NUMBER:this.value="number"==typeof this.value?Utils.str_to_byte_array(this.value.toString()):[],this.type=Dish.BYTE_ARRAY;break;case Dish.HTML:this.value=this.value?Utils.str_to_byte_array(Utils.strip_html_tags(this.value,!0)):[],this.type=Dish.BYTE_ARRAY}switch(a){case Dish.STRING:case Dish.HTML:this.value=this.value?Utils.byte_array_to_utf8(this.value):"",this.type=Dish.STRING;break;case Dish.NUMBER:this.value=this.value?parseFloat(Utils.byte_array_to_utf8(this.value)):0,this.type=Dish.NUMBER}},Dish.prototype.valid=function(){switch(this.type){case Dish.BYTE_ARRAY:if(!(this.value instanceof Array))return!1;for(var a=0;a255)return!1;return!0;case Dish.STRING:case Dish.HTML:return"string"==typeof this.value;case Dish.NUMBER:return"number"==typeof this.value;default:return!1}};var FlowControl={FORK_DELIM:"\\n",MERGE_DELIM:"\\n",run_fork:function(a){var b=a.op_list,c=b[a.progress].input_type,d=b[a.progress].output_type,e=a.dish.get(c),f=b[a.progress].get_ing_values(),g=f[0],h=f[1],i=[],j=[];e&&(j=e.split(g));for(var k=a.progress+1;k=d)throw"Reached maximum jumps, sorry!";return a.progress+=c,a.num_jumps++,a},run_cond_jump:function(a){var b=a.op_list[a.progress].get_ing_values(),c=a.dish,d=b[0],e=b[1],f=b[2];if(a.num_jumps>=f)throw"Reached maximum jumps, sorry!";return""!==d&&c.get(Dish.STRING).search(d)>-1&&(a.progress+=e,a.num_jumps++),a},run_return:function(a){return a.progress=a.op_list.length,a}},Ingredient=function(a){this.name="",this.type="",this.value=null,a&&this._parse_config(a)};Ingredient.prototype._parse_config=function(a){this.name=a.name,this.type=a.type},Ingredient.prototype.get_config=function(){return this.value},Ingredient.prototype.set_value=function(a){this.value=Ingredient.prepare(a,this.type)},Ingredient.prepare=function(a,b){switch(b){case"binary_string":case"binary_short_string":case"editable_option":return Utils.parse_escaped_chars(a);case"byte_array":return"string"==typeof a?(a=a.replace(/\s+/g,""),Utils.hex_to_byte_array(a)):a;case"number":var c=parseFloat(a);if(isNaN(c)){var d=Utils.truncate(a.toString(),10);throw"Invalid ingredient value. Not a number: "+d}return c;default:return a}};var Operation=function(a,b){this.name=a,this.description="",this.input_type=-1,this.output_type=-1,this.run=null,this.highlight=null,this.highlight_reverse=null,this.breakpoint=!1,this.disabled=!1,this.ing_list=[],b&&this._parse_config(b)};Operation.prototype._parse_config=function(a){this.description=a.description,this.input_type=Dish.type_enum(a.input_type),this.output_type=Dish.type_enum(a.output_type),this.run=a.run,this.highlight=a.highlight,this.highlight_reverse=a.highlight_reverse,this.flow_control=a.flow_control;for(var b=0;b
          Message: "+i.message:i.display_str+=i.message,i}}return this.op_list.length},Recipe.prototype.to_string=function(){return JSON.stringify(this.get_config())},Recipe.prototype.from_string=function(a){var b=JSON.parse(a);this._parse_config(b)};var Categories=[{name:"Favourites",ops:[]},{name:"Data format",ops:["To Hexdump","From Hexdump","To Hex","From Hex","To Charcode","From Charcode","To Decimal","From Decimal","To Binary","From Binary","To Base64","From Base64","Show Base64 offsets","To Base32","From Base32","To Base","From Base","To HTML Entity","From HTML Entity","URL Encode","URL Decode","Unescape Unicode Characters","To Quoted Printable","From Quoted Printable","To Punycode","From Punycode","To Hex Content","From Hex Content","PEM to Hex","Hex to PEM","Parse ASN.1 hex string","Change IP format","Text encoding","Swap endianness"]},{name:"Encryption / Encoding",ops:["AES Encrypt","AES Decrypt","Blowfish Encrypt","Blowfish Decrypt","DES Encrypt","DES Decrypt","Triple DES Encrypt","Triple DES Decrypt","Rabbit Encrypt","Rabbit Decrypt","RC4","RC4 Drop","ROT13","XOR","XOR Brute Force","Derive PBKDF2 key","Derive EVP key"]},{name:"Public Key",ops:["Parse X.509 certificate","Parse ASN.1 hex string","PEM to Hex","Hex to PEM","Hex to Object Identifier","Object Identifier to Hex"]},{name:"Logical operations",ops:["XOR","XOR Brute Force","OR","NOT","AND","ADD","SUB","Rotate left","Rotate right","ROT13"]},{name:"Networking",ops:["Strip HTTP headers","Parse User Agent","Parse IP range","Parse IPv6 address","Parse URI","URL Encode","URL Decode","Format MAC addresses","Change IP format","Group IP addresses"]},{name:"Language",ops:["Text encoding","Unescape Unicode Characters"]},{name:"Utils",ops:["Diff","Remove whitespace","Remove null bytes","To Upper case","To Lower case","Add line numbers","Remove line numbers","Reverse","Sort","Unique","Split","Count occurrences","Expand alphabet range","Parse escaped string","Drop bytes","Take bytes","Pad lines","Find / Replace","Regular expression","Offset checker","Convert distance","Convert area","Convert mass","Convert speed","Convert data units","Parse UNIX file permissions","Swap endianness","Parse colour code"]},{name:"Date / Time",ops:["Parse DateTime","Translate DateTime Format","From UNIX Timestamp","To UNIX Timestamp","Extract dates"]},{name:"Extractors",ops:["Strings","Extract IP addresses","Extract email addresses","Extract MAC addresses","Extract URLs","Extract domains","Extract file paths","Extract dates","Regular expression"]},{name:"Compression",ops:["Raw Deflate","Raw Inflate","Zlib Deflate","Zlib Inflate","Gzip","Gunzip","Zip","Unzip","Bzip2 Decompress"]},{name:"Hashing",ops:["Analyse hash","Generate all hashes","MD5","SHA1","SHA224","SHA256","SHA384","SHA512","SHA3","RIPEMD-160","HMAC","Fletcher-16 Checksum","Adler-32 Checksum","CRC-32 Checksum","TCP/IP Checksum"]},{name:"Code tidy",ops:["Syntax highlighter","Generic Code Beautify","JavaScript Parser","JavaScript Beautify","JavaScript Minify","JSON Beautify","JSON Minify","XML Beautify","XML Minify","SQL Beautify","SQL Minify","CSS Beautify","CSS Minify","Strip HTML tags","Diff"]},{name:"Other",ops:["Entropy","Frequency distribution","Detect File Type","Scan for Embedded Files","Generate UUID","Numberwang"]},{name:"Flow control",ops:["Fork","Merge","Jump","Conditional Jump","Return"]}],OperationConfig={Fork:{description:"Split the input data up based on the specified delimiter and run all subsequent operations on each branch separately.

          For example, to decode multiple Base64 strings, enter them all on separate lines then add the 'Fork' and 'From Base64' operations to the recipe. Each string will be decoded separately.", run:FlowControl.run_fork,input_type:"string",output_type:"string",flow_control:!0,args:[{name:"Split delimiter",type:"binary_short_string",value:FlowControl.FORK_DELIM},{name:"Merge delimiter",type:"binary_short_string",value:FlowControl.MERGE_DELIM}]},Merge:{description:"Consolidate all branches back into a single trunk. The opposite of Fork.",run:FlowControl.run_merge,input_type:"string",output_type:"string",flow_control:!0,args:[]},Jump:{description:"Jump forwards or backwards over the specified number of operations.",run:FlowControl.run_jump,input_type:"string",output_type:"string",flow_control:!0,args:[{name:"Number of operations to jump over",type:"number",value:FlowControl.JUMP_NUM},{name:"Maximum jumps (if jumping backwards)",type:"number",value:FlowControl.MAX_JUMPS}]},"Conditional Jump":{description:"Conditionally jump forwards or backwards over the specified number of operations based on whether the data matches the specified regular expression.",run:FlowControl.run_cond_jump,input_type:"string",output_type:"string",flow_control:!0,args:[{name:"Match (regex)",type:"string",value:""},{name:"Number of operations to jump over if match found",type:"number",value:FlowControl.JUMP_NUM},{name:"Maximum jumps (if jumping backwards)",type:"number",value:FlowControl.MAX_JUMPS}]},Return:{description:"End execution of operations at this point in the recipe.",run:FlowControl.run_return,input_type:"string",output_type:"string",flow_control:!0,args:[]},"From Base64":{description:"Base64 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers.

          This operation decodes data from an ASCII Base64 string back into its raw format.

          e.g. aGVsbG8= becomes hello",run:Base64.run_from,highlight:Base64.highlight_from,highlight_reverse:Base64.highlight_to,input_type:"string",output_type:"byte_array",args:[{name:"Alphabet",type:"editable_option",value:Base64.ALPHABET_OPTIONS},{name:"Remove non‑alphabet chars",type:"boolean",value:Base64.REMOVE_NON_ALPH_CHARS}]},"To Base64":{description:"Base64 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers.

          This operation encodes data in an ASCII Base64 string.

          e.g. hello becomes aGVsbG8=",run:Base64.run_to,highlight:Base64.highlight_to,highlight_reverse:Base64.highlight_from,input_type:"byte_array",output_type:"string",args:[{name:"Alphabet",type:"editable_option",value:Base64.ALPHABET_OPTIONS}]},"From Base32":{description:"Base32 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers. It uses a smaller set of characters than Base64, usually the uppercase alphabet and the numbers 2 to 7.",run:Base64.run_from_32,input_type:"string",output_type:"byte_array",args:[{name:"Alphabet",type:"binary_string",value:Base64.BASE32_ALPHABET},{name:"Remove non‑alphabet chars",type:"boolean",value:Base64.REMOVE_NON_ALPH_CHARS}]},"To Base32":{description:"Base32 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers. It uses a smaller set of characters than Base64, usually the uppercase alphabet and the numbers 2 to 7.",run:Base64.run_to_32,input_type:"byte_array",output_type:"string",args:[{name:"Alphabet",type:"binary_string",value:Base64.BASE32_ALPHABET}]},"Show Base64 offsets":{description:"When a string is within a block of data and the whole block is Base64'd, the string itself could be represented in Base64 in three distinct ways depending on its offset within the block.

          This operation shows all possible offsets for a given string so that each possible encoding can be considered.",run:Base64.run_offsets,input_type:"byte_array",output_type:"html",args:[{name:"Alphabet",type:"binary_string",value:Base64.ALPHABET},{name:"Show variable chars and padding",type:"boolean",value:Base64.OFFSETS_SHOW_VARIABLE}]},XOR:{description:"XOR the input with the given key.
          e.g. fe023da5

          Options
          Null preserving: If the current byte is 0x00 or the same as the key, skip it.

          Differential: Set the key to the value of the previously decoded byte.",run:BitwiseOp.run_xor,highlight:!0,highlight_reverse:!0,input_type:"byte_array",output_type:"byte_array",args:[{name:"Key",type:"toggle_string",value:"",toggle_values:BitwiseOp.KEY_FORMAT},{name:"Null preserving",type:"boolean",value:BitwiseOp.XOR_PRESERVE_NULLS},{name:"Differential",type:"boolean",value:BitwiseOp.XOR_DIFFERENTIAL}]},"XOR Brute Force":{description:"Enumerate all possible XOR solutions. Current maximum key length is 2 due to browser performance.

          Optionally enter a regex string that you expect to find in the plaintext to filter results (crib).",run:BitwiseOp.run_xor_brute,input_type:"byte_array",output_type:"string",args:[{name:"Key length",type:"option",value:BitwiseOp.XOR_BRUTE_KEY_LENGTH},{name:"Length of sample",type:"number",value:BitwiseOp.XOR_BRUTE_SAMPLE_LENGTH},{name:"Offset of sample",type:"number",value:BitwiseOp.XOR_BRUTE_SAMPLE_OFFSET},{name:"Null preserving",type:"boolean",value:BitwiseOp.XOR_PRESERVE_NULLS},{name:"Differential",type:"boolean",value:BitwiseOp.XOR_DIFFERENTIAL},{name:"Crib (known plaintext string)",type:"binary_string",value:""},{name:"Print key",type:"boolean",value:BitwiseOp.XOR_BRUTE_PRINT_KEY},{name:"Output as hex",type:"boolean",value:BitwiseOp.XOR_BRUTE_OUTPUT_HEX}]},NOT:{description:"Returns the inverse of each byte.",run:BitwiseOp.run_not,highlight:!0,highlight_reverse:!0,input_type:"byte_array",output_type:"byte_array",args:[]},AND:{description:"AND the input with the given key.
          e.g. fe023da5",run:BitwiseOp.run_and,highlight:!0,highlight_reverse:!0,input_type:"byte_array",output_type:"byte_array",args:[{name:"Key",type:"toggle_string",value:"",toggle_values:BitwiseOp.KEY_FORMAT}]},OR:{description:"OR the input with the given key.
          e.g. fe023da5",run:BitwiseOp.run_or,highlight:!0,highlight_reverse:!0,input_type:"byte_array",output_type:"byte_array",args:[{name:"Key",type:"toggle_string",value:"",toggle_values:BitwiseOp.KEY_FORMAT}]},ADD:{description:"ADD the input with the given key (e.g. fe023da5), MOD 255",run:BitwiseOp.run_add,highlight:!0,highlight_reverse:!0,input_type:"byte_array",output_type:"byte_array",args:[{name:"Key",type:"toggle_string",value:"",toggle_values:BitwiseOp.KEY_FORMAT}]},SUB:{description:"SUB the input with the given key (e.g. fe023da5), MOD 255",run:BitwiseOp.run_sub,highlight:!0,highlight_reverse:!0,input_type:"byte_array",output_type:"byte_array",args:[{name:"Key",type:"toggle_string",value:"",toggle_values:BitwiseOp.KEY_FORMAT}]},"From Hex":{description:"Converts a hexadecimal byte string back into a its raw value.

          e.g. ce 93 ce b5 ce b9 ce ac 20 cf 83 ce bf cf 85 0a becomes the UTF-8 encoded string \u0393\u03b5\u03b9\u03ac \u03c3\u03bf\u03c5",run:ByteRepr.run_from_hex,highlight:ByteRepr.highlight_from,highlight_reverse:ByteRepr.highlight_to,input_type:"string",output_type:"byte_array",args:[{name:"Delimiter",type:"option",value:ByteRepr.HEX_DELIM_OPTIONS}]},"To Hex":{description:"Converts the input string to hexadecimal bytes separated by the specified delimiter.

          e.g. The UTF-8 encoded string \u0393\u03b5\u03b9\u03ac \u03c3\u03bf\u03c5 becomes ce 93 ce b5 ce b9 ce ac 20 cf 83 ce bf cf 85 0a",run:ByteRepr.run_to_hex,highlight:ByteRepr.highlight_to,highlight_reverse:ByteRepr.highlight_from,input_type:"byte_array",output_type:"string",args:[{name:"Delimiter",type:"option",value:ByteRepr.HEX_DELIM_OPTIONS}]},"From Charcode":{description:"Converts unicode character codes back into text.

          e.g. 0393 03b5 03b9 03ac 20 03c3 03bf 03c5 becomes \u0393\u03b5\u03b9\u03ac \u03c3\u03bf\u03c5",run:ByteRepr.run_from_charcode,highlight:ByteRepr.highlight_from,highlight_reverse:ByteRepr.highlight_to,input_type:"string",output_type:"byte_array",args:[{name:"Delimiter",type:"option",value:ByteRepr.DELIM_OPTIONS},{name:"Base",type:"number",value:ByteRepr.CHARCODE_BASE}]},"To Charcode":{description:"Converts text to its unicode character code equivalent.

          e.g. \u0393\u03b5\u03b9\u03ac \u03c3\u03bf\u03c5 becomes 0393 03b5 03b9 03ac 20 03c3 03bf 03c5",run:ByteRepr.run_to_charcode,highlight:ByteRepr.highlight_to,highlight_reverse:ByteRepr.highlight_from,input_type:"string",output_type:"string",args:[{name:"Delimiter",type:"option",value:ByteRepr.DELIM_OPTIONS},{name:"Base",type:"number",value:ByteRepr.CHARCODE_BASE}]},"From Binary":{description:"Converts a binary string back into its raw form.

          e.g. 01001000 01101001 becomes Hi",run:ByteRepr.run_from_binary,highlight:ByteRepr.highlight_from_binary,highlight_reverse:ByteRepr.highlight_to_binary,input_type:"string",output_type:"byte_array",args:[{name:"Delimiter",type:"option",value:ByteRepr.BIN_DELIM_OPTIONS}]},"To Binary":{description:"Displays the input data as a binary string.

          e.g. Hi becomes 01001000 01101001",run:ByteRepr.run_to_binary,highlight:ByteRepr.highlight_to_binary,highlight_reverse:ByteRepr.highlight_from_binary,input_type:"byte_array",output_type:"string",args:[{name:"Delimiter",type:"option",value:ByteRepr.BIN_DELIM_OPTIONS}]},"From Decimal":{description:"Converts the data from an ordinal integer array back into its raw form.

          e.g. 72 101 108 108 111 becomes Hello",run:ByteRepr.run_from_decimal,input_type:"string",output_type:"byte_array",args:[{name:"Delimiter",type:"option",value:ByteRepr.DELIM_OPTIONS}]},"To Decimal":{description:"Converts the input data to an ordinal integer array.

          e.g. Hello becomes 72 101 108 108 111",run:ByteRepr.run_to_decimal,input_type:"byte_array",output_type:"string",args:[{name:"Delimiter",type:"option",value:ByteRepr.DELIM_OPTIONS}]},"From Hexdump":{description:"Attempts to convert a hexdump back into raw data. This operation supports many different hexdump variations, but probably not all. Make sure you verify that the data it gives you is correct before continuing analysis.",run:Hexdump.run_from,highlight:Hexdump.highlight_from,highlight_reverse:Hexdump.highlight_to,input_type:"string",output_type:"byte_array",args:[]},"To Hexdump":{description:"Creates a hexdump of the input data, displaying both the hexademinal values of each byte and an ASCII representation alongside.",run:Hexdump.run_to,highlight:Hexdump.highlight_to,highlight_reverse:Hexdump.highlight_from,input_type:"byte_array",output_type:"string",args:[{name:"Width",type:"number",value:Hexdump.WIDTH},{name:"Upper case hex",type:"boolean",value:Hexdump.UPPER_CASE},{name:"Include final length",type:"boolean",value:Hexdump.INCLUDE_FINAL_LENGTH}]},"From Base":{description:"Converts a number to decimal from a given numerical base.",run:Base.run_from,input_type:"string",output_type:"number",args:[{name:"Radix",type:"number",value:Base.DEFAULT_RADIX}]},"To Base":{description:"Converts a decimal number to a given numerical base.",run:Base.run_to,input_type:"number",output_type:"string",args:[{name:"Radix",type:"number",value:Base.DEFAULT_RADIX}]},"From HTML Entity":{description:"Converts HTML entities back to characters

          e.g. &amp; becomes &",run:HTML.run_from_entity,input_type:"string",output_type:"string",args:[]},"To HTML Entity":{description:"Converts characters to HTML entities

          e.g. & becomes &amp;",run:HTML.run_to_entity,input_type:"string",output_type:"string",args:[{name:"Convert all characters",type:"boolean",value:HTML.CONVERT_ALL},{name:"Convert to",type:"option",value:HTML.CONVERT_OPTIONS}]},"Strip HTML tags":{description:"Removes all HTML tags from the input.",run:HTML.run_strip_tags,input_type:"string",output_type:"string",args:[{name:"Remove indentation",type:"boolean",value:HTML.REMOVE_INDENTATION},{name:"Remove excess line breaks",type:"boolean",value:HTML.REMOVE_LINE_BREAKS}]},"URL Decode":{description:"Converts URI/URL percent-encoded characters back to their raw values.

          e.g. %3d becomes =",run:URL_.run_from,input_type:"string",output_type:"string",args:[]},"URL Encode":{description:"Encodes problematic characters into percent-encoding, a format supported by URIs/URLs.

          e.g. = becomes %3d",run:URL_.run_to,input_type:"string",output_type:"string",args:[{name:"Encode all special chars",type:"boolean",value:URL_.ENCODE_ALL}]},"Parse URI":{description:"Pretty prints complicated Uniform Resource Identifier (URI) strings for ease of reading. Particularly useful for Uniform Resource Locators (URLs) with a lot of arguments.",run:URL_.run_parse,input_type:"string",output_type:"string",args:[]},"Unescape Unicode Characters":{description:"Converts unicode-escaped character notation back into raw characters.

          Supports the prefixes:
          • \\u
          • %u
          • U+
          e.g. \\u03c3\\u03bf\\u03c5 becomes \u03c3\u03bf\u03c5",run:Unicode.run_unescape,input_type:"string",output_type:"string",args:[{name:"Prefix",type:"option",value:Unicode.PREFIXES}]},"From Quoted Printable":{description:"Converts QP-encoded text back to standard text.",run:QuotedPrintable.run_from,input_type:"string",output_type:"byte_array",args:[]},"To Quoted Printable":{description:"Quoted-Printable, or QP encoding, is an encoding using printable ASCII characters (alphanumeric and the equals sign '=') to transmit 8-bit data over a 7-bit data path or, generally, over a medium which is not 8-bit clean. It is defined as a MIME content transfer encoding for use in e-mail.

          QP works by using the equals sign '=' as an escape character. It also limits line length to 76, as some software has limits on line length.",run:QuotedPrintable.run_to,input_type:"byte_array",output_type:"string",args:[]},"From Punycode":{description:"Punycode is a way to represent Unicode with the limited character subset of ASCII supported by the Domain Name System.

          e.g. mnchen-3ya decodes to m\xfcnchen",run:Punycode.run_to_unicode,input_type:"string",output_type:"string",args:[{name:"Internationalised domain name",type:"boolean",value:Punycode.IDN}]},"To Punycode":{description:"Punycode is a way to represent Unicode with the limited character subset of ASCII supported by the Domain Name System.

          e.g. m\xfcnchen encodes to mnchen-3ya",run:Punycode.run_to_ascii,input_type:"string",output_type:"string",args:[{name:"Internationalised domain name",type:"boolean",value:Punycode.IDN}]},"From Hex Content":{description:"Translates hexadecimal bytes in text back to raw bytes.

          e.g. foo|3d|bar becomes foo=bar.",run:ByteRepr.run_from_hex_content,input_type:"string",output_type:"byte_array",args:[]},"To Hex Content":{description:"Converts special characters in a string to hexadecimal.

          e.g. foo=bar becomes foo|3d|bar.",run:ByteRepr.run_to_hex_content,input_type:"byte_array",output_type:"string",args:[{name:"Convert",type:"option",value:ByteRepr.HEX_CONTENT_CONVERT_WHICH},{name:"Print spaces between bytes",type:"boolean",value:ByteRepr.HEX_CONTENT_SPACES_BETWEEN_BYTES}]},"Change IP format":{description:"Convert an IP address from one format to another, e.g. 172.20.23.54 to ac141736",run:IP.run_change_ip_format,input_type:"string",output_type:"string",args:[{name:"Input format",type:"option",value:IP.IP_FORMAT_LIST},{name:"Output format",type:"option",value:IP.IP_FORMAT_LIST}]},"Parse IP range":{description:"Given a CIDR range (e.g. 10.0.0.0/24) or a hyphenated range (e.g. 10.0.0.0 - 10.0.1.0), this operation provides network information and enumerates all IP addresses in the range.

          IPv6 is supported but will not be enumerated.",run:IP.run_parse_ip_range,input_type:"string",output_type:"string",args:[{name:"Include network info",type:"boolean",value:IP.INCLUDE_NETWORK_INFO},{name:"Enumerate IP addresses",type:"boolean",value:IP.ENUMERATE_ADDRESSES},{name:"Allow large queries",type:"boolean",value:IP.ALLOW_LARGE_LIST}]},"Group IP addresses":{description:"Groups a list of IP addresses into subnets. Supports both IPv4 and IPv6 addresses.",run:IP.run_group_ips,input_type:"string",output_type:"string",args:[{name:"Delimiter",type:"option",value:IP.DELIM_OPTIONS},{name:"Subnet (CIDR)",type:"number",value:IP.GROUP_CIDR},{name:"Only show the subnets",type:"boolean",value:IP.GROUP_ONLY_SUBNET}]},"Parse IPv6 address":{description:"Displays the longhand and shorthand versions of a valid IPv6 address.

          Recognises all reserved ranges and parses encapsulated or tunnelled addresses including Teredo and 6to4.",run:IP.run_parse_ipv6,input_type:"string",output_type:"string",args:[]},"Text encoding":{description:"Translates the data between different character encodings.

          Supported charsets are:
          • UTF8
          • UTF16
          • UTF16LE (little-endian)
          • UTF16BE (big-endian)
          • Hex
          • Base64
          • Latin1 (ISO-8859-1)
          • Windows-1251
          ",run:CharEnc.run,input_type:"string",output_type:"string",args:[{name:"Input type",type:"option",value:CharEnc.IO_FORMAT},{name:"Output type",type:"option",value:CharEnc.IO_FORMAT}]},"AES Decrypt":{description:"To successfully decrypt AES, you need either:
          • The passphrase
          • Or the key and IV
          The IV should be the first 16 bytes of encrypted material.",run:Cipher.run_aes_dec,input_type:"string",output_type:"string",args:[{name:"Passphrase/Key",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT2},{name:"IV",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Salt",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Mode",type:"option",value:Cipher.MODES},{name:"Padding",type:"option",value:Cipher.PADDING},{name:"Input format",type:"option",value:Cipher.IO_FORMAT1},{name:"Output format",type:"option",value:Cipher.IO_FORMAT2}]},"AES Encrypt":{description:"Input: Either enter a passphrase (which will be used to derive a key using the OpenSSL KDF) or both the key and IV.

          Advanced Encryption Standard (AES) is a U.S. Federal Information Processing Standard (FIPS). It was selected after a 5-year process where 15 competing designs were evaluated.

          AES-128, AES-192, and AES-256 are supported. The variant will be chosen based on the size of the key passed in. If a passphrase is used, a 256-bit key will be generated.",run:Cipher.run_aes_enc,input_type:"string",output_type:"string",args:[{name:"Passphrase/Key",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT2},{name:"IV",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Salt",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Mode",type:"option",value:Cipher.MODES},{name:"Padding",type:"option",value:Cipher.PADDING},{name:"Output result",type:"option",value:Cipher.RESULT_TYPE},{name:"Output format",type:"option",value:Cipher.IO_FORMAT1}]},"DES Decrypt":{description:"To successfully decrypt DES, you need either:
          • The passphrase
          • Or the key and IV
          The IV should be the first 8 bytes of encrypted material.",run:Cipher.run_des_dec,input_type:"string",output_type:"string",args:[{name:"Passphrase/Key",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT2},{name:"IV",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Salt",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Mode",type:"option",value:Cipher.MODES},{name:"Padding",type:"option",value:Cipher.PADDING},{name:"Input format",type:"option",value:Cipher.IO_FORMAT1},{name:"Output format",type:"option",value:Cipher.IO_FORMAT2}]},"DES Encrypt":{description:"Input: Either enter a passphrase (which will be used to derive a key using the OpenSSL KDF) or both the key and IV.

          DES is a previously dominant algorithm for encryption, and was published as an official U.S. Federal Information Processing Standard (FIPS). It is now considered to be insecure due to its small key size.",run:Cipher.run_des_enc,input_type:"string",output_type:"string",args:[{name:"Passphrase/Key",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT2},{name:"IV",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Salt",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Mode",type:"option",value:Cipher.MODES},{name:"Padding",type:"option",value:Cipher.PADDING},{name:"Output result",type:"option",value:Cipher.RESULT_TYPE},{name:"Output format",type:"option",value:Cipher.IO_FORMAT1}]},"Triple DES Decrypt":{description:"To successfully decrypt Triple DES, you need either:
          • The passphrase
          • Or the key and IV
          The IV should be the first 8 bytes of encrypted material.",run:Cipher.run_triple_des_dec,input_type:"string",output_type:"string",args:[{name:"Passphrase/Key",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT2},{name:"IV",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Salt",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Mode",type:"option",value:Cipher.MODES},{name:"Padding",type:"option",value:Cipher.PADDING},{name:"Input format",type:"option",value:Cipher.IO_FORMAT1},{name:"Output format",type:"option",value:Cipher.IO_FORMAT2}]},"Triple DES Encrypt":{description:"Input: Either enter a passphrase (which will be used to derive a key using the OpenSSL KDF) or both the key and IV.

          Triple DES applies DES three times to each block to increase key size.",run:Cipher.run_triple_des_enc,input_type:"string",output_type:"string",args:[{name:"Passphrase/Key",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT2},{name:"IV",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Salt",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Mode",type:"option",value:Cipher.MODES},{name:"Padding",type:"option",value:Cipher.PADDING},{name:"Output result",type:"option",value:Cipher.RESULT_TYPE},{name:"Output format",type:"option",value:Cipher.IO_FORMAT1}]},"Blowfish Decrypt":{description:"Blowfish is a symmetric-key block cipher designed in 1993 by Bruce Schneier and included in a large number of cipher suites and encryption products. AES now receives more attention.",run:Cipher.run_blowfish_dec,input_type:"string",output_type:"string",args:[{name:"Key",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT2},{name:"Mode",type:"option",value:Cipher.BLOWFISH_MODES},{name:"Input format",type:"option",value:Cipher.IO_FORMAT3}]},"Blowfish Encrypt":{description:"Blowfish is a symmetric-key block cipher designed in 1993 by Bruce Schneier and included in a large number of cipher suites and encryption products. AES now receives more attention.",run:Cipher.run_blowfish_enc,input_type:"string",output_type:"string",args:[{name:"Key",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT2},{name:"Mode",type:"option",value:Cipher.BLOWFISH_MODES},{name:"Output format",type:"option",value:Cipher.IO_FORMAT3}]},"Rabbit Decrypt":{description:"To successfully decrypt Rabbit, you need either:
          • The passphrase
          • Or the key and IV (This is currently broken. You need the key and salt at the moment.)
          The IV should be the first 8 bytes of encrypted material.",run:Cipher.run_rabbit_dec,input_type:"string",output_type:"string",args:[{name:"Passphrase/Key",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT2},{name:"IV",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Salt",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Mode",type:"option",value:Cipher.MODES},{name:"Padding",type:"option",value:Cipher.PADDING},{name:"Input format",type:"option",value:Cipher.IO_FORMAT1},{name:"Output format",type:"option",value:Cipher.IO_FORMAT2}]},"Rabbit Encrypt":{description:"Input: Either enter a passphrase (which will be used to derive a key using the OpenSSL KDF) or both the key and IV.

          Rabbit is a high-performance stream cipher and a finalist in the eSTREAM Portfolio. It is one of the four designs selected after a 3 1/2 year process where 22 designs were evaluated.",run:Cipher.run_rabbit_enc,input_type:"string",output_type:"string",args:[{name:"Passphrase/Key",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT2},{name:"IV",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Salt",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT1},{name:"Mode",type:"option",value:Cipher.MODES},{name:"Padding",type:"option",value:Cipher.PADDING},{name:"Output result",type:"option",value:Cipher.RESULT_TYPE},{name:"Output format",type:"option",value:Cipher.IO_FORMAT1}]},RC4:{description:"RC4 is a widely-used stream cipher. It is used in popular protocols such as SSL and WEP. Although remarkable for its simplicity and speed, the algorithm's history doesn't inspire confidence in its security.",run:Cipher.run_rc4,highlight:!0,highlight_reverse:!0,input_type:"string",output_type:"string",args:[{name:"Passphrase",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT2},{name:"Input format",type:"option",value:Cipher.IO_FORMAT4},{name:"Output format",type:"option",value:Cipher.IO_FORMAT4}]},"RC4 Drop":{description:"It was discovered that the first few bytes of the RC4 keystream are strongly non-random and leak information about the key. We can defend against this attack by discarding the initial portion of the keystream. This modified algorithm is traditionally called RC4-drop.",run:Cipher.run_rc4drop,highlight:!0,highlight_reverse:!0,input_type:"string",output_type:"string",args:[{name:"Passphrase",type:"toggle_string",value:"",toggle_values:Cipher.IO_FORMAT2},{name:"Input format",type:"option",value:Cipher.IO_FORMAT4},{name:"Output format",type:"option",value:Cipher.IO_FORMAT4},{name:"Number of bytes to drop",type:"number",value:Cipher.RC4DROP_BYTES}]},"Derive PBKDF2 key":{description:"PBKDF2 is a password-based key derivation function. In many applications of cryptography, user security is ultimately dependent on a password, and because a password usually can't be used directly as a cryptographic key, some processing is required.

          A salt provides a large set of keys for any given password, and an iteration count increases the cost of producing keys from a password, thereby also increasing the difficulty of attack.

          Enter your passphrase as the input and then set the relevant options to generate a key.",run:Cipher.run_pbkdf2,input_type:"string",output_type:"string",args:[{name:"Key size",type:"number",value:Cipher.KDF_KEY_SIZE},{name:"Iterations",type:"number",value:Cipher.KDF_ITERATIONS},{name:"Salt (hex)",type:"string",value:""},{name:"Input format",type:"option",value:Cipher.IO_FORMAT2},{name:"Output format",type:"option",value:Cipher.IO_FORMAT3}]},"Derive EVP key":{description:"EVP is a password-based key derivation function used extensively in OpenSSL. In many applications of cryptography, user security is ultimately dependent on a password, and because a password usually can't be used directly as a cryptographic key, some processing is required.

          A salt provides a large set of keys for any given password, and an iteration count increases the cost of producing keys from a password, thereby also increasing the difficulty of attack.

          Enter your passphrase as the input and then set the relevant options to generate a key.",run:Cipher.run_evpkdf,input_type:"string",output_type:"string",args:[{name:"Key size",type:"number",value:Cipher.KDF_KEY_SIZE},{name:"Iterations",type:"number",value:Cipher.KDF_ITERATIONS},{name:"Salt (hex)",type:"string",value:""},{name:"Input format",type:"option",value:Cipher.IO_FORMAT2},{name:"Output format",type:"option",value:Cipher.IO_FORMAT3}]},"Rotate right":{description:"Rotates each byte to the right by the number of bits specified. Currently only supports 8-bit values.",run:Rotate.run_rotr,highlight:!0,highlight_reverse:!0,input_type:"byte_array",output_type:"byte_array",args:[{name:"Number of bits",type:"number",value:Rotate.ROTATE_AMOUNT},{name:"Rotate as a whole",type:"boolean",value:Rotate.ROTATE_WHOLE}]},"Rotate left":{description:"Rotates each byte to the left by the number of bits specified. Currently only supports 8-bit values.",run:Rotate.run_rotl,highlight:!0,highlight_reverse:!0,input_type:"byte_array",output_type:"byte_array",args:[{name:"Number of bits",type:"number",value:Rotate.ROTATE_AMOUNT},{name:"Rotate as a whole",type:"boolean",value:Rotate.ROTATE_WHOLE}]},ROT13:{description:"A simple caesar substitution cipher which rotates alphabet characters by the specified amount (default 13).",run:Rotate.run_rot13,highlight:!0,highlight_reverse:!0,input_type:"byte_array",output_type:"byte_array",args:[{name:"Rotate lower case chars",type:"boolean",value:Rotate.ROT13_LOWERCASE},{name:"Rotate upper case chars",type:"boolean",value:Rotate.ROT13_UPPERCASE},{name:"Amount",type:"number",value:Rotate.ROT13_AMOUNT}]},"Strip HTTP headers":{description:"Removes HTTP headers from a request or response by looking for the first instance of a double newline.",run:HTTP.run_strip_headers,input_type:"string",output_type:"string",args:[]},"Parse User Agent":{description:"Attempts to identify and categorise information contained in a user-agent string.",run:HTTP.run_parse_user_agent,input_type:"string",output_type:"string",args:[]},"Format MAC addresses":{description:"Displays given MAC addresses in multiple different formats.

          Expects addresses in a list separated by newlines, spaces or commas.

          WARNING: There are no validity checks.",run:MAC.run_format,input_type:"string",output_type:"string",args:[{name:"Output case",type:"option",value:MAC.OUTPUT_CASE},{name:"No delimiter",type:"boolean",value:MAC.NO_DELIM},{name:"Dash delimiter",type:"boolean",value:MAC.DASH_DELIM},{name:"Colon delimiter",type:"boolean",value:MAC.COLON_DELIM},{name:"Cisco style",type:"boolean",value:MAC.CISCO_STYLE}]},"Offset checker":{description:"Compares multiple inputs (separated by the specified delimiter) and highlights matching characters which appear at the same position in all samples.",run:StrUtils.run_offset_checker,input_type:"string",output_type:"html",args:[{name:"Sample delimiter",type:"binary_string",value:StrUtils.OFF_CHK_SAMPLE_DELIMITER}]},"Remove whitespace":{description:"Optionally removes all spaces, carriage returns, line feeds, tabs and form feeds from the input data.

          This operation also supports the removal of full stops which are sometimes used to represent non-printable bytes in ASCII output.",run:Tidy.run_remove_whitespace,input_type:"string",output_type:"string",args:[{name:"Spaces",type:"boolean",value:Tidy.REMOVE_SPACES},{name:"Carriage returns (\\r)",type:"boolean",value:Tidy.REMOVE_CARIAGE_RETURNS},{name:"Line feeds (\\n)",type:"boolean",value:Tidy.REMOVE_LINE_FEEDS},{name:"Tabs",type:"boolean",value:Tidy.REMOVE_TABS},{name:"Form feeds (\\f)",type:"boolean",value:Tidy.REMOVE_FORM_FEEDS},{name:"Full stops",type:"boolean",value:Tidy.REMOVE_FULL_STOPS}]},"Remove null bytes":{description:"Removes all null bytes (0x00) from the input.",run:Tidy.run_remove_nulls,input_type:"byte_array",output_type:"byte_array",args:[]},"Drop bytes":{description:"Cuts the specified number of bytes out of the data.",run:Tidy.run_drop_bytes,input_type:"byte_array",output_type:"byte_array", args:[{name:"Start",type:"number",value:Tidy.DROP_START},{name:"Length",type:"number",value:Tidy.DROP_LENGTH},{name:"Apply to each line",type:"boolean",value:Tidy.APPLY_TO_EACH_LINE}]},"Take bytes":{description:"Takes a slice of the specified number of bytes from the data.",run:Tidy.run_take_bytes,input_type:"byte_array",output_type:"byte_array",args:[{name:"Start",type:"number",value:Tidy.TAKE_START},{name:"Length",type:"number",value:Tidy.TAKE_LENGTH},{name:"Apply to each line",type:"boolean",value:Tidy.APPLY_TO_EACH_LINE}]},"Pad lines":{description:"Add the specified number of the specified character to the beginning or end of each line",run:Tidy.run_pad,input_type:"string",output_type:"string",args:[{name:"Position",type:"option",value:Tidy.PAD_POSITION},{name:"Length",type:"number",value:Tidy.PAD_LENGTH},{name:"Character",type:"binary_short_string",value:Tidy.PAD_CHAR}]},Reverse:{description:"Reverses the input string.",run:SeqUtils.run_reverse,input_type:"byte_array",output_type:"byte_array",args:[{name:"By",type:"option",value:SeqUtils.REVERSE_BY}]},Sort:{description:"Alphabetically sorts strings separated by the specified delimiter.

          The IP address option supports IPv4 only.",run:SeqUtils.run_sort,input_type:"string",output_type:"string",args:[{name:"Delimiter",type:"option",value:SeqUtils.DELIMITER_OPTIONS},{name:"Reverse",type:"boolean",value:SeqUtils.SORT_REVERSE},{name:"Order",type:"option",value:SeqUtils.SORT_ORDER}]},Unique:{description:"Removes duplicate strings from the input.",run:SeqUtils.run_unique,input_type:"string",output_type:"string",args:[{name:"Delimiter",type:"option",value:SeqUtils.DELIMITER_OPTIONS}]},"Count occurrences":{description:"Counts the number of times the provided string occurs in the input.",run:SeqUtils.run_count,input_type:"string",output_type:"number",args:[{name:"Search string",type:"toggle_string",value:"",toggle_values:SeqUtils.SEARCH_TYPE}]},"Add line numbers":{description:"Adds line numbers to the output.",run:SeqUtils.run_add_line_numbers,input_type:"string",output_type:"string",args:[]},"Remove line numbers":{description:"Removes line numbers from the output if they can be trivially detected.",run:SeqUtils.run_remove_line_numbers,input_type:"string",output_type:"string",args:[]},"Find / Replace":{description:"Replaces all occurrences of the first string with the second.

          The three match options are only relevant to regex search strings.",run:StrUtils.run_find_replace,manual_bake:!0,input_type:"string",output_type:"string",args:[{name:"Find",type:"toggle_string",value:"",toggle_values:StrUtils.SEARCH_TYPE},{name:"Replace",type:"binary_string",value:""},{name:"Global match",type:"boolean",value:StrUtils.FIND_REPLACE_GLOBAL},{name:"Case insensitive",type:"boolean",value:StrUtils.FIND_REPLACE_CASE},{name:"Multiline matching",type:"boolean",value:StrUtils.FIND_REPLACE_MULTILINE}]},"To Upper case":{description:"Converts the input string to upper case, optionally limiting scope to only the first character in each word, sentence or paragraph.",run:StrUtils.run_upper,highlight:!0,highlight_reverse:!0,input_type:"string",output_type:"string",args:[{name:"Scope",type:"option",value:StrUtils.CASE_SCOPE}]},"To Lower case":{description:"Converts every character in the input to lower case.",run:StrUtils.run_lower,highlight:!0,highlight_reverse:!0,input_type:"string",output_type:"string",args:[]},Split:{description:"Splits a string into sections around a given delimiter.",run:StrUtils.run_split,input_type:"string",output_type:"string",args:[{name:"Split delimiter",type:"binary_short_string",value:StrUtils.SPLIT_DELIM},{name:"Join delimiter",type:"option",value:StrUtils.DELIMITER_OPTIONS}]},Strings:{description:"Extracts all strings from the input.",run:Extract.run_strings,input_type:"string",output_type:"string",args:[{name:"Minimum length",type:"number",value:Extract.MIN_STRING_LEN},{name:"Display total",type:"boolean",value:Extract.DISPLAY_TOTAL}]},"Extract IP addresses":{description:"Extracts all IPv4 and IPv6 addresses.

          Warning: Given a string 710.65.0.456, this will match 10.65.0.45 so always check the original input!",run:Extract.run_ip,input_type:"string",output_type:"string",args:[{name:"IPv4",type:"boolean",value:Extract.INCLUDE_IPV4},{name:"IPv6",type:"boolean",value:Extract.INCLUDE_IPV6},{name:"Remove local IPv4 addresses",type:"boolean",value:Extract.REMOVE_LOCAL},{name:"Display total",type:"boolean",value:Extract.DISPLAY_TOTAL}]},"Extract email addresses":{description:"Extracts all email addresses from the input.",run:Extract.run_email,input_type:"string",output_type:"string",args:[{name:"Display total",type:"boolean",value:Extract.DISPLAY_TOTAL}]},"Extract MAC addresses":{description:"Extracts all Media Access Control (MAC) addresses from the input.",run:Extract.run_mac,input_type:"string",output_type:"string",args:[{name:"Display total",type:"boolean",value:Extract.DISPLAY_TOTAL}]},"Extract URLs":{description:"Extracts Uniform Resource Locators (URLs) from the input. The protocol (http, ftp etc.) is required otherwise there will be far too many false positives.",run:Extract.run_urls,input_type:"string",output_type:"string",args:[{name:"Display total",type:"boolean",value:Extract.DISPLAY_TOTAL}]},"Extract domains":{description:"Extracts domain names with common Top-Level Domains (TLDs).
          Note that this will not include paths. Use Extract URLs to find entire URLs.",run:Extract.run_domains,input_type:"string",output_type:"string",args:[{name:"Display total",type:"boolean",value:Extract.DISPLAY_TOTAL}]},"Extract file paths":{description:"Extracts anything that looks like a Windows or UNIX file path.

          Note that if UNIX is selected, there will likely be a lot of false positives.",run:Extract.run_file_paths,input_type:"string",output_type:"string",args:[{name:"Windows",type:"boolean",value:Extract.INCLUDE_WIN_PATH},{name:"UNIX",type:"boolean",value:Extract.INCLUDE_UNIX_PATH},{name:"Display total",type:"boolean",value:Extract.DISPLAY_TOTAL}]},"Extract dates":{description:"Extracts dates in the following formats
          • yyyy-mm-dd
          • dd/mm/yyyy
          • mm/dd/yyyy
          Dividers can be any of /, -, . or space",run:Extract.run_dates,input_type:"string",output_type:"string",args:[{name:"Display total",type:"boolean",value:Extract.DISPLAY_TOTAL}]},"Regular expression":{description:"Define your own regular expression to search the input data with, optionally choosing from a list of pre-defined patterns.",run:StrUtils.run_regex,manual_bake:!0,input_type:"string",output_type:"html",args:[{name:"Built in regexes",type:"populate_option",value:StrUtils.REGEX_PRE_POPULATE,target:1},{name:"Regex",type:"text",value:""},{name:"Case insensitive",type:"boolean",value:StrUtils.REGEX_CASE_INSENSITIVE},{name:"Multiline matching",type:"boolean",value:StrUtils.REGEX_MULTILINE_MATCHING},{name:"Display total",type:"boolean",value:StrUtils.DISPLAY_TOTAL},{name:"Output format",type:"option",value:StrUtils.OUTPUT_FORMAT}]},"From UNIX Timestamp":{description:"Converts a UNIX timestamp to a datetime string.

          e.g. 978346800 becomes Mon 1 January 2001 11:00:00 UTC",run:DateTime.run_from_unix_timestamp,input_type:"number",output_type:"string",args:[{name:"Units",type:"option",value:DateTime.UNITS}]},"To UNIX Timestamp":{description:"Parses a datetime string and returns the corresponding UNIX timestamp.

          e.g. Mon 1 January 2001 11:00:00 UTC becomes 978346800",run:DateTime.run_to_unix_timestamp,input_type:"string",output_type:"number",args:[{name:"Units",type:"option",value:DateTime.UNITS}]},"Translate DateTime Format":{description:"Parses a datetime string in one format and re-writes it in another.

          Run with no input to see the relevant format string examples.",run:DateTime.run_translate_format,input_type:"string",output_type:"html",args:[{name:"Built in formats",type:"populate_option",value:DateTime.DATETIME_FORMATS,target:1},{name:"Input format string",type:"binary_string",value:DateTime.INPUT_FORMAT_STRING},{name:"Input timezone",type:"option",value:DateTime.TIMEZONES},{name:"Output format string",type:"binary_string",value:DateTime.OUTPUT_FORMAT_STRING},{name:"Output timezone",type:"option",value:DateTime.TIMEZONES}]},"Parse DateTime":{description:"Parses a DateTime string in your specified format and displays it in whichever timezone you choose with the following information:
          • Date
          • Time
          • Period (AM/PM)
          • Timezone
          • UTC offset
          • Daylight Saving Time
          • Leap year
          • Days in this month
          • Day of year
          • Week number
          • Quarter
          Run with no input to see format string examples if required.",run:DateTime.run_parse,input_type:"string",output_type:"html",args:[{name:"Built in formats",type:"populate_option",value:DateTime.DATETIME_FORMATS,target:1},{name:"Input format string",type:"binary_string",value:DateTime.INPUT_FORMAT_STRING},{name:"Input timezone",type:"option",value:DateTime.TIMEZONES}]},"Convert distance":{description:"Converts a unit of distance to another format.",run:Convert.run_distance,input_type:"number",output_type:"number",args:[{name:"Input units",type:"option",value:Convert.DISTANCE_UNITS},{name:"Output units",type:"option",value:Convert.DISTANCE_UNITS}]},"Convert area":{description:"Converts a unit of area to another format.",run:Convert.run_area,input_type:"number",output_type:"number",args:[{name:"Input units",type:"option",value:Convert.AREA_UNITS},{name:"Output units",type:"option",value:Convert.AREA_UNITS}]},"Convert mass":{description:"Converts a unit of mass to another format.",run:Convert.run_mass,input_type:"number",output_type:"number",args:[{name:"Input units",type:"option",value:Convert.MASS_UNITS},{name:"Output units",type:"option",value:Convert.MASS_UNITS}]},"Convert speed":{description:"Converts a unit of speed to another format.",run:Convert.run_speed,input_type:"number",output_type:"number",args:[{name:"Input units",type:"option",value:Convert.SPEED_UNITS},{name:"Output units",type:"option",value:Convert.SPEED_UNITS}]},"Convert data units":{description:"Converts a unit of data to another format.",run:Convert.run_data_size,input_type:"number",output_type:"number",args:[{name:"Input units",type:"option",value:Convert.DATA_UNITS},{name:"Output units",type:"option",value:Convert.DATA_UNITS}]},"Raw Deflate":{description:"Compresses data using the deflate algorithm with no headers.",run:Compress.run_raw_deflate,input_type:"byte_array",output_type:"byte_array",args:[{name:"Compression type",type:"option",value:Compress.COMPRESSION_TYPE}]},"Raw Inflate":{description:"Decompresses data which has been compressed using the deflate algorithm with no headers.",run:Compress.run_raw_inflate,input_type:"byte_array",output_type:"byte_array",args:[{name:"Start index",type:"number",value:Compress.INFLATE_INDEX},{name:"Initial output buffer size",type:"number",value:Compress.INFLATE_BUFFER_SIZE},{name:"Buffer expansion type",type:"option",value:Compress.INFLATE_BUFFER_TYPE},{name:"Resize buffer after decompression",type:"boolean",value:Compress.INFLATE_RESIZE},{name:"Verify result",type:"boolean",value:Compress.INFLATE_VERIFY}]},"Zlib Deflate":{description:"Compresses data using the deflate algorithm adding zlib headers.",run:Compress.run_zlib_deflate,input_type:"byte_array",output_type:"byte_array",args:[{name:"Compression type",type:"option",value:Compress.COMPRESSION_TYPE}]},"Zlib Inflate":{description:"Decompresses data which has been compressed using the deflate algorithm with zlib headers.",run:Compress.run_zlib_inflate,input_type:"byte_array",output_type:"byte_array",args:[{name:"Start index",type:"number",value:Compress.INFLATE_INDEX},{name:"Initial output buffer size",type:"number",value:Compress.INFLATE_BUFFER_SIZE},{name:"Buffer expansion type",type:"option",value:Compress.INFLATE_BUFFER_TYPE},{name:"Resize buffer after decompression",type:"boolean",value:Compress.INFLATE_RESIZE},{name:"Verify result",type:"boolean",value:Compress.INFLATE_VERIFY}]},Gzip:{description:"Compresses data using the deflate algorithm with gzip headers.",run:Compress.run_gzip,input_type:"byte_array",output_type:"byte_array",args:[{name:"Compression type",type:"option",value:Compress.COMPRESSION_TYPE},{name:"Filename (optional)",type:"string",value:""},{name:"Comment (optional)",type:"string",value:""},{name:"Include file checksum",type:"boolean",value:Compress.GZIP_CHECKSUM}]},Gunzip:{description:"Decompresses data which has been compressed using the deflate algorithm with gzip headers.",run:Compress.run_gunzip,input_type:"byte_array",output_type:"byte_array",args:[]},Zip:{description:"Compresses data using the PKZIP algorithm with the given filename.

          No support for multiple files at this time.",run:Compress.run_pkzip,input_type:"byte_array",output_type:"byte_array",args:[{name:"Filename",type:"string",value:Compress.PKZIP_FILENAME},{name:"Comment",type:"string",value:""},{name:"Password",type:"binary_string",value:""},{name:"Compression method",type:"option",value:Compress.COMPRESSION_METHOD},{name:"Operating system",type:"option",value:Compress.OS},{name:"Compression type",type:"option",value:Compress.COMPRESSION_TYPE}]},Unzip:{description:"Decompresses data using the PKZIP algorithm and displays it per file, with support for passwords.",run:Compress.run_pkunzip,input_type:"byte_array",output_type:"html",args:[{name:"Password",type:"binary_string",value:""},{name:"Verify result",type:"boolean",value:Compress.PKUNZIP_VERIFY}]},"Bzip2 Decompress":{description:"Decompresses data using the Bzip2 algorithm.",run:Compress.run_bzip2_decompress,input_type:"byte_array",output_type:"string",args:[]},"Generic Code Beautify":{description:"Attempts to pretty print C-style languages such as C, C++, C#, Java, PHP, JavaScript etc.

          This will not do a perfect job, and the resulting code may not work any more. This operation is designed purely to make obfuscated or minified code more easy to read and understand.

          Things which will not work properly:
          • For loop formatting
          • Do-While loop formatting
          • Switch/Case indentation
          • Certain bit shift operators
          ",run:Code.run_generic_beautify,input_type:"string",output_type:"string",args:[]},"JavaScript Parser":{description:"Returns an Abstract Syntax Tree for valid JavaScript code.",run:JS.run_parse,input_type:"string",output_type:"string",args:[{name:"Location info",type:"boolean",value:JS.PARSE_LOC},{name:"Range info",type:"boolean",value:JS.PARSE_RANGE},{name:"Include tokens array",type:"boolean",value:JS.PARSE_TOKENS},{name:"Include comments array",type:"boolean",value:JS.PARSE_COMMENT},{name:"Report errors and try to continue",type:"boolean",value:JS.PARSE_TOLERANT}]},"JavaScript Beautify":{description:"Parses and pretty prints valid JavaScript code. Also works with JavaScript Object Notation (JSON).",run:JS.run_beautify,input_type:"string",output_type:"string",args:[{name:"Indent string",type:"binary_short_string",value:JS.BEAUTIFY_INDENT},{name:"Quotes",type:"option",value:JS.BEAUTIFY_QUOTES},{name:"Semicolons before closing braces",type:"boolean",value:JS.BEAUTIFY_SEMICOLONS},{name:"Include comments",type:"boolean",value:JS.BEAUTIFY_COMMENT}]},"JavaScript Minify":{description:"Compresses JavaScript code.",run:JS.run_minify,input_type:"string",output_type:"string",args:[]},"XML Beautify":{description:"Indents and prettifies eXtensible Markup Language (XML) code.",run:Code.run_xml_beautify,input_type:"string",output_type:"string",args:[{name:"Indent string",type:"binary_short_string",value:Code.BEAUTIFY_INDENT}]},"JSON Beautify":{description:"Indents and prettifies JavaScript Object Notation (JSON) code.",run:Code.run_json_beautify,input_type:"string",output_type:"string",args:[{name:"Indent string",type:"binary_short_string",value:Code.BEAUTIFY_INDENT}]},"CSS Beautify":{description:"Indents and prettifies Cascading Style Sheets (CSS) code.",run:Code.run_css_beautify,input_type:"string",output_type:"string",args:[{name:"Indent string",type:"binary_short_string",value:Code.BEAUTIFY_INDENT}]},"SQL Beautify":{description:"Indents and prettifies Structured Query Language (SQL) code.",run:Code.run_sql_beautify,input_type:"string",output_type:"string",args:[{name:"Indent string",type:"binary_short_string",value:Code.BEAUTIFY_INDENT}]},"XML Minify":{description:"Compresses eXtensible Markup Language (XML) code.",run:Code.run_xml_minify,input_type:"string",output_type:"string",args:[{name:"Preserve comments",type:"boolean",value:Code.PRESERVE_COMMENTS}]},"JSON Minify":{description:"Compresses JavaScript Object Notation (JSON) code.",run:Code.run_json_minify,input_type:"string",output_type:"string",args:[]},"CSS Minify":{description:"Compresses Cascading Style Sheets (CSS) code.",run:Code.run_css_minify,input_type:"string",output_type:"string",args:[{name:"Preserve comments",type:"boolean",value:Code.PRESERVE_COMMENTS}]},"SQL Minify":{description:"Compresses Structured Query Language (SQL) code.",run:Code.run_sql_minify,input_type:"string",output_type:"string",args:[]},"Analyse hash":{description:"Tries to determine information about a given hash and suggests which algorithm may have been used to generate it based on its length.",run:Hash.run_analyse,input_type:"string",output_type:"string",args:[]},MD5:{description:"MD5 (Message-Digest 5) is a widely used hash function. It has been used in a variety of security applications and is also commonly used to check the integrity of files.

          However, MD5 is not collision resistant and it isn't suitable for applications like SSL/TLS certificates or digital signatures that rely on this property.",run:Hash.run_md5,input_type:"string",output_type:"string",args:[]},SHA1:{description:"The SHA (Secure Hash Algorithm) hash functions were designed by the NSA. SHA-1 is the most established of the existing SHA hash functions and it is used in a variety of security applications and protocols.

          However, SHA-1's collision resistance has been weakening as new attacks are discovered or improved.",run:Hash.run_sha1,input_type:"string",output_type:"string",args:[]},SHA224:{description:"SHA-224 is largely identical to SHA-256 but is truncated to 224 bytes.",run:Hash.run_sha224,input_type:"string",output_type:"string",args:[]},SHA256:{description:"SHA-256 is one of the four variants in the SHA-2 set. It isn't as widely used as SHA-1, though it provides much better security.",run:Hash.run_sha256,input_type:"string",output_type:"string",args:[]},SHA384:{description:"SHA-384 is largely identical to SHA-512 but is truncated to 384 bytes.",run:Hash.run_sha384,input_type:"string",output_type:"string",args:[]},SHA512:{description:"SHA-512 is largely identical to SHA-256 but operates on 64-bit words rather than 32.",run:Hash.run_sha512,input_type:"string",output_type:"string",args:[]},SHA3:{description:"This is an implementation of Keccak[c=2d]. SHA3 functions based on different implementations of Keccak will give different results.",run:Hash.run_sha3,input_type:"string",output_type:"string",args:[{name:"Output length",type:"option",value:Hash.SHA3_LENGTH}]},"RIPEMD-160":{description:"RIPEMD (RACE Integrity Primitives Evaluation Message Digest) is a family of cryptographic hash functions developed in Leuven, Belgium, by Hans Dobbertin, Antoon Bosselaers and Bart Preneel at the COSIC research group at the Katholieke Universiteit Leuven, and first published in 1996.

          RIPEMD was based upon the design principles used in MD4, and is similar in performance to the more popular SHA-1.

          RIPEMD-160 is an improved, 160-bit version of the original RIPEMD, and the most common version in the family.",run:Hash.run_ripemd160,input_type:"string",output_type:"string",args:[]},HMAC:{description:"Keyed-Hash Message Authentication Codes (HMAC) are a mechanism for message authentication using cryptographic hash functions.",run:Hash.run_hmac,input_type:"string",output_type:"string",args:[{name:"Password",type:"binary_string",value:""},{name:"Hashing function",type:"option",value:Hash.HMAC_FUNCTIONS}]},"Fletcher-16 Checksum":{description:"The Fletcher checksum is an algorithm for computing a position-dependent checksum devised by John Gould Fletcher at Lawrence Livermore Labs in the late 1970s.

          The objective of the Fletcher checksum was to provide error-detection properties approaching those of a cyclic redundancy check but with the lower computational effort associated with summation techniques.",run:Checksum.run_fletcher16,input_type:"byte_array",output_type:"string",args:[]},"Adler-32 Checksum":{description:"Adler-32 is a checksum algorithm which was invented by Mark Adler in 1995, and is a modification of the Fletcher checksum. Compared to a cyclic redundancy check of the same length, it trades reliability for speed (preferring the latter).

          Adler-32 is more reliable than Fletcher-16, and slightly less reliable than Fletcher-32.",run:Checksum.run_adler32,input_type:"byte_array",output_type:"string",args:[]},"CRC-32 Checksum":{description:"A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.

          The CRC was invented by W. Wesley Peterson in 1961; the 32-bit CRC function of Ethernet and many other standards is the work of several researchers and was published in 1975.",run:Checksum.run_crc32,input_type:"byte_array",output_type:"string",args:[]},"Generate all hashes":{description:"Generates all available hashes and checksums for the input.",run:Hash.run_all,input_type:"string",output_type:"string",args:[]},Entropy:{description:"Calculates the Shannon entropy of the input data which gives an idea of its randomness. 8 is the maximum.",run:Entropy.run_entropy,input_type:"byte_array",output_type:"html",args:[{name:"Chunk size",type:"number",value:Entropy.CHUNK_SIZE}]},"Frequency distribution":{description:"Displays the distribution of bytes in the data as a graph.",run:Entropy.run_freq_distrib,input_type:"byte_array",output_type:"html",args:[{name:"Show 0%'s",type:"boolean",value:Entropy.FREQ_ZEROS}]},Numberwang:{description:"Based on the popular gameshow by Mitchell and Webb.",run:Numberwang.run,input_type:"string",output_type:"string",args:[]},"Parse X.509 certificate":{description:"X.509 is an ITU-T standard for a public key infrastructure (PKI) and Privilege Management Infrastructure (PMI). It is commonly involved with SSL/TLS security.

          This operation displays the contents of a certificate in a human readable format, similar to the openssl command line tool.",run:PublicKey.run_parse_x509,input_type:"string",output_type:"string",args:[{name:"Input format",type:"option",value:PublicKey.X509_INPUT_FORMAT}]},"PEM to Hex":{description:"Converts PEM (Privacy Enhanced Mail) format to a hexadecimal DER (Distinguished Encoding Rules) string.",run:PublicKey.run_pem_to_hex,input_type:"string",output_type:"string",args:[]},"Hex to PEM":{description:"Converts a hexadecimal DER (Distinguished Encoding Rules) string into PEM (Privacy Enhanced Mail) format.",run:PublicKey.run_hex_to_pem,input_type:"string",output_type:"string",args:[{name:"Header string",type:"string",value:PublicKey.PEM_HEADER_STRING}]},"Hex to Object Identifier":{description:"Converts a hexadecimal string into an object identifier (OID).",run:PublicKey.run_hex_to_object_identifier,input_type:"string",output_type:"string",args:[]},"Object Identifier to Hex":{description:"Converts an object identifier (OID) into a hexadecimal string.",run:PublicKey.run_object_identifier_to_hex,input_type:"string",output_type:"string",args:[]},"Parse ASN.1 hex string":{description:"Abstract Syntax Notation One (ASN.1) is a standard and notation that describes rules and structures for representing, encoding, transmitting, and decoding data in telecommunications and computer networking.

          This operation parses arbitrary ASN.1 data and presents the resulting tree.",run:PublicKey.run_parse_asn1_hex_string,input_type:"string",output_type:"string",args:[{name:"Starting index",type:"number",value:0},{name:"Truncate octet strings longer than",type:"number",value:PublicKey.ASN1_TRUNCATE_LENGTH}]},"Detect File Type":{description:"Attempts to guess the MIME (Multipurpose Internet Mail Extensions) type of the data based on 'magic bytes'.

          Currently supports the following file types: 7z, amr, avi, bmp, bz2, class, cr2, crx, dex, dmg, doc, elf, eot, epub, exe, flac, flv, gif, gz, ico, iso, jpg, jxr, m4a, m4v, mid, mkv, mov, mp3, mp4, mpg, ogg, otf, pdf, png, ppt, ps, psd, rar, rtf, sqlite, swf, tar, tar.z, tif, ttf, utf8, vmdk, wav, webm, webp, wmv, woff, woff2, xls, xz, zip.",run:FileType.run_detect,input_type:"byte_array",output_type:"string",args:[]},"Scan for Embedded Files":{description:"Scans the data for potential embedded files by looking for magic bytes at all offsets. This operation is prone to false positives.

          WARNING: Files over about 100KB in size will take a VERY long time to process.",run:FileType.run_scan_for_embedded_files,input_type:"byte_array",output_type:"string",args:[{name:"Ignore common byte sequences",type:"boolean",value:FileType.IGNORE_COMMON_BYTE_SEQUENCES}]},"Expand alphabet range":{description:"Expand an alphabet range string into a list of the characters in that range.

          e.g. a-z becomes abcdefghijklmnopqrstuvwxyz.",run:SeqUtils.run_expand_alph_range,input_type:"string",output_type:"string",args:[{name:"Delimiter",type:"binary_string",value:""}]},Diff:{description:"Compares two inputs (separated by the specified delimiter) and highlights the differences between them.",run:StrUtils.run_diff,input_type:"string",output_type:"html",args:[{name:"Sample delimiter",type:"binary_string",value:StrUtils.DIFF_SAMPLE_DELIMITER},{name:"Diff by",type:"option",value:StrUtils.DIFF_BY},{name:"Show added",type:"boolean",value:!0},{name:"Show removed",type:"boolean",value:!0},{name:"Ignore whitespace (relevant for word and line)",type:"boolean",value:!1}]},"Parse UNIX file permissions":{description:"Given a UNIX/Linux file permission string in octal or textual format, this operation explains which permissions are granted to which user groups.

          Input should be in either octal (e.g. 755) or textual (e.g. drwxr-xr-x) format.",run:OS.run_parse_unix_perms,input_type:"string",output_type:"string",args:[]},"Swap endianness":{description:"Switches the data from big-endian to little-endian or vice-versa. Data can be read in as hexadecimal or raw bytes. It will be returned in the same format as it is entered.",run:Endian.run_swap_endianness,highlight:!0,highlight_reverse:!0,input_type:"string",output_type:"string",args:[{name:"Data format",type:"option",value:Endian.DATA_FORMAT},{name:"Word length (bytes)",type:"number",value:Endian.WORD_LENGTH},{name:"Pad incomplete words",type:"boolean",value:Endian.PAD_INCOMPLETE_WORDS}]},"Syntax highlighter":{description:"Adds syntax highlighting to a range of source code languages. Note that this will not indent the code. Use one of the 'Beautify' operations for that.",run:Code.run_syntax_highlight,highlight:!0,highlight_reverse:!0,input_type:"string",output_type:"html",args:[{name:"Language/File extension",type:"option",value:Code.LANGUAGES},{name:"Display line numbers",type:"boolean",value:Code.LINE_NUMS}]},"Parse escaped string":{description:"Replaces escaped characters with the bytes they represent.

          e.g.Hello\\nWorld becomes Hello
          World
          ",run:StrUtils.run_parse_escaped_string,input_type:"string",output_type:"string",args:[]},"TCP/IP Checksum":{description:"Calculates the checksum for a TCP (Transport Control Protocol) or IP (Internet Protocol) header from an input of raw bytes.",run:Checksum.run_tcp_ip,input_type:"byte_array",output_type:"string",args:[]},"Parse colour code":{description:"Converts a colour code in a standard format to other standard formats and displays the colour itself.

          Example inputs
          • #d9edf7
          • rgba(217,237,247,1)
          • hsla(200,65%,91%,1)
          • cmyk(0.12, 0.04, 0.00, 0.03)
          ",run:HTML.run_parse_colour_code,input_type:"string",output_type:"html",args:[]},"Generate UUID":{description:"Generates an RFC 4122 version 4 compliant Universally Unique Identifier (UUID), also known as a Globally Unique Identifier (GUID).

          A version 4 UUID relies on random numbers, in this case generated using window.crypto if available and falling back to Math.random if not.",run:UUID.run_generate_v4,input_type:"string",output_type:"string",args:[]}},ControlsWaiter=function(a,b){this.app=a,this.manager=b};ControlsWaiter.prototype.adjust_width=function(){var a=document.getElementById("controls"),b=document.getElementById("step"),c=document.getElementById("clr-breaks"),d=document.querySelector("#save img"),e=document.querySelector("#load img"),f=document.querySelector("#step img"),g=document.querySelector("#clr-recipe img"),h=document.querySelector("#clr-breaks img");a.clientWidth<470?b.childNodes[1].nodeValue=" Step":b.childNodes[1].nodeValue=" Step through",a.clientWidth<400?(d.style.display="none",e.style.display="none",f.style.display="none",g.style.display="none",h.style.display="none"):(d.style.display="inline",e.style.display="inline",f.style.display="inline",g.style.display="inline",h.style.display="inline"),a.clientWidth<330?c.childNodes[1].nodeValue=" Clear breaks":c.childNodes[1].nodeValue=" Clear breakpoints"},ControlsWaiter.prototype.set_auto_bake=function(a){var b=document.getElementById("auto-bake");b.checked!=a&&b.click()},ControlsWaiter.prototype.bake_click=function(){this.app.bake(),$("#output-text").selectRange(0)},ControlsWaiter.prototype.step_click=function(){this.app.bake(!0),$("#output-text").selectRange(0)},ControlsWaiter.prototype.auto_bake_change=function(){var a=document.getElementById("auto-bake-label"),b=document.getElementById("auto-bake");this.app.auto_bake_=b.checked,b.checked?(a.classList.remove("btn-default"),a.classList.add("btn-success")):(a.classList.remove("btn-success"),a.classList.add("btn-default"))},ControlsWaiter.prototype.clear_recipe_click=function(){this.manager.recipe.clear_recipe()},ControlsWaiter.prototype.clear_breaks_click=function(){for(var a=document.querySelectorAll("#rec_list li.operation .breakpoint"),b=0;b0,b=b&&f.length>0&&f.length<8e3,a&&(d+="?recipe="+encodeURIComponent(e)),a&&b?d+="&input="+encodeURIComponent(f):b&&(d+="?input="+encodeURIComponent(f)),d},ControlsWaiter.prototype.save_text_change=function(){try{var a=JSON.parse(document.getElementById("save-text").value);this.initialise_save_link(a)}catch(a){}},ControlsWaiter.prototype.save_click=function(){var a=this.app.get_recipe_config(),b=JSON.stringify(a).replace(/},{/g,"},\n{");document.getElementById("save-text").value=b,this.initialise_save_link(a),$("#save-modal").modal()},ControlsWaiter.prototype.slr_check_change=function(){this.initialise_save_link(); -},ControlsWaiter.prototype.sli_check_change=function(){this.initialise_save_link()},ControlsWaiter.prototype.load_click=function(){this.populate_load_recipes_list(),$("#load-modal").modal()},ControlsWaiter.prototype.save_button_click=function(){var a=document.getElementById("save-name").value,b=document.getElementById("save-text").value;if(!a)return void this.app.alert("Please enter a recipe name","danger",2e3);var c=localStorage.saved_recipes?JSON.parse(localStorage.saved_recipes):[],d=localStorage.recipe_id||0;c.push({id:++d,name:a,recipe:b}),localStorage.saved_recipes=JSON.stringify(c),localStorage.recipe_id=d,this.app.alert('Recipe saved as "'+a+'".',"success",2e3)},ControlsWaiter.prototype.populate_load_recipes_list=function(){for(var a=document.getElementById("load-name"),b=a.options.length;b--;)a.remove(b);var c=localStorage.saved_recipes?JSON.parse(localStorage.saved_recipes):[];for(b=0;bthis.options.auto_bake_threshold&&this.auto_bake_&&(this.manager.controls.set_auto_bake(!1),this.alert("Baking took longer than "+this.options.auto_bake_threshold+"ms, Auto Bake has been disabled.","warning",5e3))}},HTMLApp.prototype.auto_bake=function(){this.auto_bake_&&this.bake()},HTMLApp.prototype.silent_bake=function(){var a=(new Date).getTime(),b=this.get_recipe_config();return this.auto_bake_&&this.chef.silent_bake(b),(new Date).getTime()-a},HTMLApp.prototype.get_input=function(){var a=this.manager.input.get();return sessionStorage.setItem("input_length",a.length),sessionStorage.setItem("input",a),a},HTMLApp.prototype.set_input=function(a){sessionStorage.setItem("input_length",a.length),sessionStorage.setItem("input",a),this.manager.input.set(a)},HTMLApp.prototype.populate_operations_list=function(){document.body.appendChild(document.getElementById("edit-favourites"));for(var a="",b=0;b2?JSON.parse(localStorage.favourites):this.dfavourites;a=this.valid_favourites(a),this.save_favourites(a);var b=this.categories.filter(function(a){return"Favourites"==a.name})[0];b?b.ops=a:this.categories.unshift({name:"Favourites",ops:a})},HTMLApp.prototype.valid_favourites=function(a){for(var b=[],c=0;c=0?void this.alert("'"+a+"' is already in your favourites","info",2e3):(b.push(a),this.save_favourites(b),this.load_favourites(),this.populate_operations_list(),void this.manager.recipe.initialise_operation_drag_n_drop())},HTMLApp.prototype.load_URI_params=function(){this.query_string=function(a){if(""===a)return{};for(var b={},c=0;c"):d[e].value=a[b].args[e];a[b].disabled&&c.querySelector(".disable-icon").click(),a[b].breakpoint&&c.querySelector(".breakpoint").click(),this.progress=0}},HTMLApp.prototype.reset_layout=function(){document.getElementById("operations").style.width="calc(20% - 2px)",document.getElementById("recipe").style.width="calc(30% - 4px)",document.getElementById("IO").style.width="calc(50% - 2px)",document.getElementById("input").style.height="calc(50% - 2px)",document.getElementById("output").style.height="calc(50% - 2px)",this.manager.controls.adjust_width()},HTMLApp.prototype.set_compile_message=function(){var a=new Date,b=Utils.fuzzy_time(a.getTime()-window.compile_time),c='Last build: '+b.substr(0,1).toUpperCase()+b.substr(1)+" ago";""!==window.compile_message&&(c+=" - "+window.compile_message),c+="",document.getElementById("notice").innerHTML=c},HTMLApp.prototype.alert=function(a,b,c,d){var e=new Date;if(console.log("["+e.toLocaleString()+"] "+a),!d){b=b||"danger",c=c||0;var f=document.getElementById("alert"),g=document.getElementById("alert-content");f.classList.remove("alert-danger"),f.classList.remove("alert-warning"),f.classList.remove("alert-info"),f.classList.remove("alert-success"),f.classList.add("alert-"+b),"block"==f.style.display?g.innerHTML+="

          ["+e.toLocaleTimeString()+"] "+a:g.innerHTML="["+e.toLocaleTimeString()+"] "+a,$("#alert").stop(),f.style.display="block",f.style.opacity=1,c>0&&(clearTimeout(this.alert_timeout),this.alert_timeout=setTimeout(function(){$("#alert").slideUp(100)},c))}},HTMLApp.prototype.confirm=function(a,b,c,d){d=d||this,document.getElementById("confirm-title").innerHTML=a,document.getElementById("confirm-body").innerHTML=b,document.getElementById("confirm-modal").style.display="block",this.confirm_closed=!1,$("#confirm-modal").modal().one("show.bs.modal",function(a){this.confirm_closed=!1}.bind(this)).one("click","#confirm-yes",function(){this.confirm_closed=!0,c.bind(d)(!0),$("#confirm-modal").modal("hide")}.bind(this)).one("hide.bs.modal",function(a){this.confirm_closed||c.bind(d)(!1),this.confirm_closed=!0}.bind(this))},HTMLApp.prototype.alert_close_click=function(){document.getElementById("alert").style.display="none"},HTMLApp.prototype.state_change=function(a){this.auto_bake(),this.options.update_url&&(this.last_state_url=this.manager.controls.generate_state_url(!0,!0),window.history.replaceState({},"CyberChef",this.last_state_url))},HTMLApp.prototype.pop_state=function(a){window.location.href.split("#")[0]!==this.last_state_url&&this.load_URI_params()},HTMLApp.prototype.call_api=function(a,b,c,d,e){b=b||"POST",c=c||{},d=d||void 0,e=e||"application/json";var f=null,g=!1;return $.ajax({url:a,async:!1,type:b,data:c,dataType:d,contentType:e,success:function(a){g=!0,f=a},error:function(a){g=!1,f=a}}),{success:g,response:f}};var HTMLCategory=function(a,b){this.name=a,this.selected=b,this.op_list=[]};HTMLCategory.prototype.add_operation=function(a){this.op_list.push(a)},HTMLCategory.prototype.to_html=function(){for(var a="cat"+this.name.replace(/[\s\/-:_]/g,""),b="
          "+this.name+"
            ",c=0;c 
          ";switch(d+="
          ",this.type){case"string":case"binary_string":case"byte_array":d+="";break;case"short_string":case"binary_short_string":d+="";break;case"toggle_string":for(d+="
          ";break;case"number":d+="";break;case"boolean":d+="",this.disable_args&&this.manager.add_dynamic_listener("#"+this.id,"click",this.toggle_disable_args,this);break;case"option":for(d+="";break;case"populate_option":for(d+="",this.manager.add_dynamic_listener("#"+this.id,"change",this.populate_option_change,this);break;case"editable_option":for(d+="
          ",d+="",d+="",d+="
          ",this.manager.add_dynamic_listener("#sel-"+this.id,"change",this.editable_option_change,this);break;case"text":d+=""}return d+="
          "},HTMLIngredient.prototype.toggle_disable_args=function(a){for(var b,c=a.target,d=c.parentNode.parentNode,e=d.querySelectorAll(".arg-group"),f=0;f"),this.description&&(b+=""),b+=""},HTMLOperation.prototype.to_full_html=function(){for(var a="
          "+this.name+"
          ",b=0;b=0&&(this.name=this.name.slice(0,b)+""+this.name.slice(b,b+a.length)+""+this.name.slice(b+a.length)),this.description&&c>=0&&(this.description=this.description.slice(0,c)+""+this.description.slice(c,c+a.length)+""+this.description.slice(c+a.length))};var HighlighterWaiter=function(a){this.app=a,this.mouse_button_down=!1,this.mouse_target=null};HighlighterWaiter.INPUT=0,HighlighterWaiter.OUTPUT=1,HighlighterWaiter.prototype._is_selection_backwards=function(){var a=!1,b=window.getSelection();if(!b.isCollapsed){var c=document.createRange();c.setStart(b.anchorNode,b.anchorOffset),c.setEnd(b.focusNode,b.focusOffset),a=c.collapsed,c.detach()}return a},HighlighterWaiter.prototype._get_output_html_offset=function(a,b){var c=window.getSelection(),d=document.createRange();return d.selectNodeContents(document.getElementById("output-html")),d.setEnd(a,b),c.removeAllRanges(),c.addRange(d),c.toString().length},HighlighterWaiter.prototype._get_output_html_selection_offsets=function(){var a,b=window.getSelection(),c=0,d=0,e=!1;return b.rangeCount&&(a=b.getRangeAt(b.rangeCount-1),e=this._is_selection_backwards(),c=this._get_output_html_offset(a.startContainer,a.startOffset),d=this._get_output_html_offset(a.endContainer,a.endOffset),b.removeAllRanges(),b.addRange(a),e&&(b.collapseToEnd(),b.extend(b.anchorNode,a.startOffset))),{start:c,end:d}},HighlighterWaiter.prototype.input_scroll=function(a){var b=a.target;document.getElementById("input-highlighter").scrollTop=b.scrollTop,document.getElementById("input-highlighter").scrollLeft=b.scrollLeft},HighlighterWaiter.prototype.output_scroll=function(a){var b=a.target;document.getElementById("output-highlighter").scrollTop=b.scrollTop,document.getElementById("output-highlighter").scrollLeft=b.scrollLeft},HighlighterWaiter.prototype.input_mousedown=function(a){this.mouse_button_down=!0,this.mouse_target=HighlighterWaiter.INPUT,this.remove_highlights();var b=a.target,c=b.selectionStart,d=b.selectionEnd;0===c&&0===d||(document.getElementById("input-selection-info").innerHTML=this.selection_info(c,d),this.highlight_output([{start:c,end:d}]))},HighlighterWaiter.prototype.output_mousedown=function(a){this.mouse_button_down=!0,this.mouse_target=HighlighterWaiter.OUTPUT,this.remove_highlights();var b=a.target,c=b.selectionStart,d=b.selectionEnd;0===c&&0===d||(document.getElementById("output-selection-info").innerHTML=this.selection_info(c,d),this.highlight_input([{start:c,end:d}]))},HighlighterWaiter.prototype.output_html_mousedown=function(a){this.mouse_button_down=!0,this.mouse_target=HighlighterWaiter.OUTPUT;var b=this._get_output_html_selection_offsets();0===b.start&&0===b.end||(document.getElementById("output-selection-info").innerHTML=this.selection_info(b.start,b.end))},HighlighterWaiter.prototype.input_mouseup=function(a){this.mouse_button_down=!1},HighlighterWaiter.prototype.output_mouseup=function(a){this.mouse_button_down=!1},HighlighterWaiter.prototype.output_html_mouseup=function(a){this.mouse_button_down=!1},HighlighterWaiter.prototype.input_mousemove=function(a){if(this.mouse_button_down&&1==a.which&&this.mouse_target==HighlighterWaiter.INPUT){var b=a.target,c=b.selectionStart,d=b.selectionEnd;0===c&&0===d||(document.getElementById("input-selection-info").innerHTML=this.selection_info(c,d),this.highlight_output([{start:c,end:d}]))}},HighlighterWaiter.prototype.output_mousemove=function(a){if(this.mouse_button_down&&1==a.which&&this.mouse_target==HighlighterWaiter.OUTPUT){var b=a.target,c=b.selectionStart,d=b.selectionEnd;0===c&&0===d||(document.getElementById("output-selection-info").innerHTML=this.selection_info(c,d),this.highlight_input([{start:c,end:d}]))}},HighlighterWaiter.prototype.output_html_mousemove=function(a){if(this.mouse_button_down&&1==a.which&&this.mouse_target==HighlighterWaiter.OUTPUT){var b=this._get_output_html_selection_offsets();0===b.start&&0===b.end||(document.getElementById("output-selection-info").innerHTML=this.selection_info(b.start,b.end))}},HighlighterWaiter.prototype.selection_info=function(a,b){var c=b.toString().length;c=c<2?2:c;var d=Utils.pad(a.toString(),c," ").replace(/ /g," "),e=Utils.pad(b.toString(),c," ").replace(/ /g," "),f=Utils.pad((b-a).toString(),c," ").replace(/ /g," ");return"start: "+d+"
          end: "+e+"
          length: "+f},HighlighterWaiter.prototype.remove_highlights=function(){document.getElementById("input-highlighter").innerHTML="",document.getElementById("output-highlighter").innerHTML="",document.getElementById("input-selection-info").innerHTML="",document.getElementById("output-selection-info").innerHTML=""},HighlighterWaiter.prototype.generate_highlight_list=function(){for(var a=this.app.get_recipe_config(),b=[],c=0;c=0)return!1;var d="[start_highlight]",e=/\[start_highlight\]/g,f="[end_highlight]",g=/\[end_highlight\]/g,h=a.value;if(1==c.length){if(c[0].end/g,">").replace(/\n/g," ").replace(e,'').replace(g,"")+" ",b.style.width=a.clientWidth+"px",b.innerHTML=h,b.scrollTop=a.scrollTop,b.scrollLeft=a.scrollLeft};var InputWaiter=function(a,b){this.app=a,this.manager=b,this.bad_keys=[16,17,18,19,20,27,33,34,35,36,37,38,39,40,44,91,92,93,112,113,114,115,116,117,118,119,120,121,122,123,144,145]};InputWaiter.prototype.get=function(){return document.getElementById("input-text").value},InputWaiter.prototype.set=function(a){document.getElementById("input-text").value=a,window.dispatchEvent(this.manager.statechange)},InputWaiter.prototype.set_input_info=function(a,b){var c=a.toString().length;c=c<2?2:c;var d=Utils.pad(a.toString(),c," ").replace(/ /g," "),e=Utils.pad(b.toString(),c," ").replace(/ /g," ");document.getElementById("input-info").innerHTML="length: "+d+"
          lines: "+e},InputWaiter.prototype.input_change=function(a){this.manager.highlighter.remove_highlights(),this.app.progress=0;var b=this.get(),c=b.count("\n")+1;this.set_input_info(b.length,c),this.bad_keys.indexOf(a.keyCode)<0&&window.dispatchEvent(this.manager.statechange)},InputWaiter.prototype.input_dragover=function(a){return"move"!==a.dataTransfer.effectAllowed&&(a.stopPropagation(),a.preventDefault(),void a.target.classList.add("dropping-file"))},InputWaiter.prototype.input_dragleave=function(a){a.stopPropagation(),a.preventDefault(),a.target.classList.remove("dropping-file")},InputWaiter.prototype.input_drop=function(a){if("move"===a.dataTransfer.effectAllowed)return!1;a.stopPropagation(),a.preventDefault();var b=a.target,c=a.dataTransfer.files[0],d=a.dataTransfer.getData("Text"),e=new FileReader,f="",g=0,h=20480,i=function(){f.length>1e5&&this.app.auto_bake_&&(this.manager.controls.set_auto_bake(!1),this.app.alert("Turned off Auto Bake as the input is large","warning",5e3)),this.set(f);var a=this.app.get_recipe_config();a[0]&&"From Hex"==a[0].op||(a.unshift({op:"From Hex",args:["Space"]}),this.app.set_recipe_config(a)),b.classList.remove("loading_file")}.bind(this),j=function(){if(g>=c.size)return void i();b.value="Processing... "+Math.round(g/c.size*100)+"%";var a=c.slice(g,g+h);e.readAsArrayBuffer(a)}.bind(this);e.onload=function(a){var b=new Uint8Array(e.result);f+=Utils.to_hex_fast(b),g+=h,j()}.bind(this),b.classList.remove("dropping-file"),c?(b.classList.add("loading_file"),j()):d&&this.set(d)},InputWaiter.prototype.clear_io_click=function(){this.manager.highlighter.remove_highlights(),document.getElementById("input-text").value="",document.getElementById("output-text").value="",document.getElementById("input-info").innerHTML="",document.getElementById("output-info").innerHTML="",document.getElementById("input-selection-info").innerHTML="",document.getElementById("output-selection-info").innerHTML="",window.dispatchEvent(this.manager.statechange)};var Manager=function(a){this.app=a,this.appstart=new CustomEvent("appstart",{bubbles:!0}),this.operationadd=new CustomEvent("operationadd",{bubbles:!0}),this.operationremove=new CustomEvent("operationremove",{bubbles:!0}),this.oplistcreate=new CustomEvent("oplistcreate",{bubbles:!0}),this.statechange=new CustomEvent("statechange",{bubbles:!0}),this.window=new WindowWaiter(this.app),this.controls=new ControlsWaiter(this.app,this),this.recipe=new RecipeWaiter(this.app,this),this.ops=new OperationsWaiter(this.app,this),this.input=new InputWaiter(this.app,this),this.output=new OutputWaiter(this.app,this),this.options=new OptionsWaiter(this.app),this.highlighter=new HighlighterWaiter(this.app),this.seasonal=new SeasonalWaiter(this.app,this),this.dynamic_handlers={},this.initialise_event_listeners()};Manager.prototype.setup=function(){this.recipe.initialise_operation_drag_n_drop(),this.controls.auto_bake_change(),this.seasonal.load()},Manager.prototype.initialise_event_listeners=function(){window.addEventListener("resize",this.window.window_resize.bind(this.window)),window.addEventListener("blur",this.window.window_blur.bind(this.window)),window.addEventListener("focus",this.window.window_focus.bind(this.window)),window.addEventListener("statechange",this.app.state_change.bind(this.app)),window.addEventListener("popstate",this.app.pop_state.bind(this.app)),document.getElementById("bake").addEventListener("click",this.controls.bake_click.bind(this.controls)),document.getElementById("auto-bake").addEventListener("change",this.controls.auto_bake_change.bind(this.controls)),document.getElementById("step").addEventListener("click",this.controls.step_click.bind(this.controls)),document.getElementById("clr-recipe").addEventListener("click",this.controls.clear_recipe_click.bind(this.controls)),document.getElementById("clr-breaks").addEventListener("click",this.controls.clear_breaks_click.bind(this.controls)),document.getElementById("save").addEventListener("click",this.controls.save_click.bind(this.controls)),document.getElementById("save-button").addEventListener("click",this.controls.save_button_click.bind(this.controls)),document.getElementById("save-link-recipe-checkbox").addEventListener("change",this.controls.slr_check_change.bind(this.controls)),document.getElementById("save-link-input-checkbox").addEventListener("change",this.controls.sli_check_change.bind(this.controls)),document.getElementById("load").addEventListener("click",this.controls.load_click.bind(this.controls)),document.getElementById("load-delete-button").addEventListener("click",this.controls.load_delete_click.bind(this.controls)),document.getElementById("load-name").addEventListener("change",this.controls.load_name_change.bind(this.controls)),document.getElementById("load-button").addEventListener("click",this.controls.load_button_click.bind(this.controls)),this.add_multi_event_listener("#save-text","keyup paste",this.controls.save_text_change,this.controls),this.add_multi_event_listener("#search","keyup paste search",this.ops.search_operations,this.ops),this.add_dynamic_listener(".op_list li.operation","dblclick",this.ops.operation_dblclick,this.ops),document.getElementById("edit-favourites").addEventListener("click",this.ops.edit_favourites_click.bind(this.ops)),document.getElementById("save-favourites").addEventListener("click",this.ops.save_favourites_click.bind(this.ops)),document.getElementById("reset-favourites").addEventListener("click",this.ops.reset_favourites_click.bind(this.ops)),this.add_dynamic_listener(".op_list .op-icon","mouseover",this.ops.op_icon_mouseover,this.ops), -this.add_dynamic_listener(".op_list .op-icon","mouseleave",this.ops.op_icon_mouseleave,this.ops),this.add_dynamic_listener(".op_list","oplistcreate",this.ops.op_list_create,this.ops),this.add_dynamic_listener("li.operation","operationadd",this.recipe.op_add.bind(this.recipe)),this.add_dynamic_listener(".arg","keyup",this.recipe.ing_change,this.recipe),this.add_dynamic_listener(".arg","change",this.recipe.ing_change,this.recipe),this.add_dynamic_listener(".disable-icon","click",this.recipe.disable_click,this.recipe),this.add_dynamic_listener(".breakpoint","click",this.recipe.breakpoint_click,this.recipe),this.add_dynamic_listener("#rec_list li.operation","dblclick",this.recipe.operation_dblclick,this.recipe),this.add_dynamic_listener("#rec_list li.operation > div","dblclick",this.recipe.operation_child_dblclick,this.recipe),this.add_dynamic_listener("#rec_list .input-group .dropdown-menu a","click",this.recipe.dropdown_toggle_click,this.recipe),this.add_dynamic_listener("#rec_list","operationremove",this.recipe.op_remove.bind(this.recipe)),this.add_multi_event_listener("#input-text","keyup paste",this.input.input_change,this.input),document.getElementById("reset-layout").addEventListener("click",this.app.reset_layout.bind(this.app)),document.getElementById("clr-io").addEventListener("click",this.input.clear_io_click.bind(this.input)),document.getElementById("input-text").addEventListener("dragover",this.input.input_dragover.bind(this.input)),document.getElementById("input-text").addEventListener("dragleave",this.input.input_dragleave.bind(this.input)),document.getElementById("input-text").addEventListener("drop",this.input.input_drop.bind(this.input)),document.getElementById("input-text").addEventListener("scroll",this.highlighter.input_scroll.bind(this.highlighter)),document.getElementById("input-text").addEventListener("mouseup",this.highlighter.input_mouseup.bind(this.highlighter)),document.getElementById("input-text").addEventListener("mousemove",this.highlighter.input_mousemove.bind(this.highlighter)),this.add_multi_event_listener("#input-text","mousedown dblclick select",this.highlighter.input_mousedown,this.highlighter),document.getElementById("save-to-file").addEventListener("click",this.output.save_click.bind(this.output)),document.getElementById("switch").addEventListener("click",this.output.switch_click.bind(this.output)),document.getElementById("undo-switch").addEventListener("click",this.output.undo_switch_click.bind(this.output)),document.getElementById("output-text").addEventListener("scroll",this.highlighter.output_scroll.bind(this.highlighter)),document.getElementById("output-text").addEventListener("mouseup",this.highlighter.output_mouseup.bind(this.highlighter)),document.getElementById("output-text").addEventListener("mousemove",this.highlighter.output_mousemove.bind(this.highlighter)),document.getElementById("output-html").addEventListener("mouseup",this.highlighter.output_html_mouseup.bind(this.highlighter)),document.getElementById("output-html").addEventListener("mousemove",this.highlighter.output_html_mousemove.bind(this.highlighter)),this.add_multi_event_listener("#output-text","mousedown dblclick select",this.highlighter.output_mousedown,this.highlighter),this.add_multi_event_listener("#output-html","mousedown dblclick select",this.highlighter.output_html_mousedown,this.highlighter),document.getElementById("options").addEventListener("click",this.options.options_click.bind(this.options)),document.getElementById("reset-options").addEventListener("click",this.options.reset_options_click.bind(this.options)),$(".option-item input:checkbox").on("switchChange.bootstrapSwitch",this.options.switch_change.bind(this.options)),$(".option-item input:checkbox").on("switchChange.bootstrapSwitch",this.options.set_word_wrap.bind(this.options)),this.add_dynamic_listener(".option-item input[type=number]","keyup",this.options.number_change,this.options),this.add_dynamic_listener(".option-item input[type=number]","change",this.options.number_change,this.options),this.add_dynamic_listener(".option-item select","change",this.options.select_change,this.options),document.getElementById("alert-close").addEventListener("click",this.app.alert_close_click.bind(this.app))},Manager.prototype.add_listeners=function(a,b,c,d){d=d||this,[].forEach.call(document.querySelectorAll(a),function(a){a.addEventListener(b,c.bind(d))})},Manager.prototype.add_multi_event_listener=function(a,b,c,d){for(var e=b.split(" "),f=0;f-1&&(this.manager.recipe.add_operation(b[c].innerHTML),this.app.auto_bake()))),13==a.keyCode)a.preventDefault();else if(40==a.keyCode)a.preventDefault(),b=document.querySelectorAll("#search-results li"),b.length&&(c=this.get_selected_op(b),c>-1&&b[c].classList.remove("selected-op"),c==b.length-1&&(c=-1),b[c+1].classList.add("selected-op"));else if(38==a.keyCode)a.preventDefault(),b=document.querySelectorAll("#search-results li"),b.length&&(c=this.get_selected_op(b),c>-1&&b[c].classList.remove("selected-op"),0===c&&(c=b.length),b[c-1].classList.add("selected-op"));else{for(var d=document.getElementById("search-results"),e=a.target,f=e.value;d.firstChild;)d.removeChild(d.firstChild);if($("#categories .in").collapse("hide"),f){for(var g=this.filter_operations(f,!0),h="",i=0;i=0||h>=0){var i=new HTMLOperation(e,this.app.operations[e],this.app,this.manager);b&&i.highlight_search_string(a,g,h),g<0?c.push(i):d.push(i)}}return d.concat(c)},OperationsWaiter.prototype.get_selected_op=function(a){for(var b=0;blength: "+e+"
          lines: "+f,document.getElementById("input-selection-info").innerHTML="",document.getElementById("output-selection-info").innerHTML=""},OutputWaiter.prototype.save_click=function(){var a=Utils.to_base64(this.app.dish_str),b=window.prompt("Please enter a filename:","download.dat");if(b){var c=document.createElement("a");c.setAttribute("href","data:application/octet-stream;base64;charset=utf-8,"+a),c.setAttribute("download",b),c.style.display="none",document.body.appendChild(c),c.click(),c.remove()}},OutputWaiter.prototype.switch_click=function(){this.switch_orig_data=this.manager.input.get(),document.getElementById("undo-switch").disabled=!1,this.app.set_input(this.app.dish_str)},OutputWaiter.prototype.undo_switch_click=function(){this.app.set_input(this.switch_orig_data),document.getElementById("undo-switch").disabled=!0};var RecipeWaiter=function(a,b){this.app=a,this.manager=b,this.remove_intent=!1};RecipeWaiter.prototype.initialise_operation_drag_n_drop=function(){var a=document.getElementById("rec_list");document.querySelectorAll(".category .op_list");Sortable.create(a,{group:"recipe",sort:!0,animation:0,delay:0,filter:".arg-input,.arg",setData:function(a,b){a.setData("Text",b.querySelector(".arg-title").textContent)},onEnd:function(a){this.remove_intent&&(a.item.remove(),a.target.dispatchEvent(this.manager.operationremove))}.bind(this)}),Sortable.utils.on(a,"dragover",function(){this.remove_intent=!1}.bind(this)),Sortable.utils.on(a,"dragleave",function(){this.remove_intent=!0,this.app.progress=0}.bind(this)),document.querySelector("#categories a").addEventListener("dragover",this.fav_dragover.bind(this)),document.querySelector("#categories a").addEventListener("dragleave",this.fav_dragleave.bind(this)),document.querySelector("#categories a").addEventListener("drop",this.fav_drop.bind(this))},RecipeWaiter.prototype.create_sortable_seed_list=function(a){Sortable.create(a,{group:{name:"recipe",pull:"clone",put:!1},sort:!1,setData:function(a,b){a.setData("Text",b.textContent)},onStart:function(a){$(a.item).popover("destroy"),a.item.setAttribute("data-toggle","popover-disabled")},onEnd:this.op_sort_end.bind(this)})},RecipeWaiter.prototype.op_sort_end=function(a){return this.remove_intent?void("rec_list"==a.item.parentNode.id&&a.item.remove()):($(a.clone).popover(),$(a.clone).children("[data-toggle=popover]").popover(),void("rec_list"===a.item.parentNode.id&&(this.build_recipe_operation(a.item),a.item.dispatchEvent(this.manager.operationadd))))},RecipeWaiter.prototype.fav_dragover=function(a){return"move"===a.dataTransfer.effectAllowed&&(a.stopPropagation(),a.preventDefault(),void(a.target.className&&a.target.className.indexOf("category-title")>-1?a.target.classList.add("favourites-hover"):a.target.parentNode.className&&a.target.parentNode.className.indexOf("category-title")>-1?a.target.parentNode.classList.add("favourites-hover"):a.target.parentNode.parentNode.className&&a.target.parentNode.parentNode.className.indexOf("category-title")>-1&&a.target.parentNode.parentNode.classList.add("favourites-hover")))},RecipeWaiter.prototype.fav_dragleave=function(a){a.stopPropagation(),a.preventDefault(),document.querySelector("#categories a").classList.remove("favourites-hover")},RecipeWaiter.prototype.fav_drop=function(a){a.stopPropagation(),a.preventDefault(),a.target.classList.remove("favourites-hover");var b=a.dataTransfer.getData("Text");this.app.add_favourite(b)},RecipeWaiter.prototype.ing_change=function(){window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.disable_click=function(a){var b=a.target;"false"==b.getAttribute("disabled")?(b.setAttribute("disabled","true"),b.classList.add("disable-icon-selected"),b.parentNode.parentNode.classList.add("disabled")):(b.setAttribute("disabled","false"),b.classList.remove("disable-icon-selected"),b.parentNode.parentNode.classList.remove("disabled")),this.app.progress=0,window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.breakpoint_click=function(a){var b=a.target;"false"==b.getAttribute("break")?(b.setAttribute("break","true"),b.classList.add("breakpoint-selected")):(b.setAttribute("break","false"),b.classList.remove("breakpoint-selected")),window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.operation_dblclick=function(a){a.target.remove(),window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.operation_child_dblclick=function(a){a.target.parentNode.remove(),window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.get_config=function(){for(var a,b,c,d,e,f=[],g=document.querySelectorAll("#rec_list li.operation"),h=0;h",this.ing_change()},RecipeWaiter.prototype.op_add=function(a){window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.op_remove=function(a){window.dispatchEvent(this.manager.statechange)};var SeasonalWaiter=function(a,b){this.app=a,this.manager=b};SeasonalWaiter.prototype.load=function(){var a=new Date;11==a.getMonth()&&a.getDate()>12&&(this.app.options.snow=!1,this.create_snow_option(),this.manager.add_dynamic_listener(".option-item input:checkbox[option='snow']","switchChange.bootstrapSwitch",this.let_it_snow,this),this.manager.add_window_listener("resize",this.let_it_snow,this),this.manager.add_listeners(".btn","click",this.shake_off_snow,this),25==a.getDate()&&this.let_it_snow()),this.kkeys=[],window.addEventListener("keydown",this.konami_code_listener.bind(this))},SeasonalWaiter.prototype.insert_spider_icons=function(){var a="iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB3UlEQVQ4y2NgGJaAmYGBgVnf0oKJgYGBobWtXamqqoYTn2I4CI+LTzM2NTulpKbu+vPHz2dV5RWlluZmi3j5+KqFJSSEzpw8uQPdAEYYIzo5Kfjrl28rWFlZzjAzMYuEBQao3Lh+g+HGvbsMzExMDN++fWf4/PXLBzY2tqYNK1f2+4eHM2xcuRLigsT09Igf3384MTExbf767etBI319jU8fPsi+//jx/72HDxh5uLkZ7ty7y/Dz1687Avz8n2UUFR3Z2NjOySoqfmdhYGBg+PbtuwI7O8e5H79+8X379t357PnzYo+ePP7y6cuXc9++f69nYGRsvf/w4XdtLS2R799/bBUWFHr57sP7Jbs3b/ZkzswvUP3165fZ7z9//r988WIVAyPDr8tXr576+u3bpb9//7YwMjKeV1dV41NWVGoVEhDgPH761DJREeHaz1+/lqlpafUx6+jrRfz4+fPy+w8fTu/fsf3uw7t3L39+//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mmhks6b5j1ezkAkAKZBe5QvPPcNBnoCawMwT66Qxk0R2xwwRAui2iSDGuaPDcubzo3EJq8wcx/9Vmk3QryH42QBQCFF0UagIiJtjX6DskIXTLEucJSHIIIMuO0BOcjn3A3ybU/lu5RCUBc5qA0Ih0Q2EWiCPRk7VfMNhjLW1zETic1tLYZDMKyuSsdfh5l6bwho5+0il4kyA0VohlNcF5FP8DlWo/VB16HYB2hJ0pzgIe2mcXxP2IOumPRY17U0tll8KIkZNb+sppafOxYkQPSaYfchyYoL9GMqWYpTLRIq1QUcT4O3aPQgqVqPwIOIMwDhzX6mQUFIQAgo+9MzcrWrML3mj6+YIKiFCZyhL87RqVQKrEskF+P1BUvfLCAkfRwoPUtq6l5o5+lZb5SolJo6oT8avTCl+c9OTmat6pKW8mLkvBpGzlvsiGuQr4ZEEwA1EQgoR/gNtxIxKBluz+OtMJiF31jHxqXBiAqAUj4WRxpADFM0DCFlv1khvX7Wol4vF4AIldVVxdZqlrIfiCYQPHDy6bAGv7nKYRVY6JewExZVAP+ey5Rv+Ba97aaUHMW5NauLmMZFkegBb/EP14d6NoS9QLWFSzWBmuZza8CQmSpXsAqmGtVy14VALWuuYWWy+W3OteXa4jwceQX6+BKG6J1/8+2VCNkm2222WabbbbZZpttttlmm22rt38DCdA0vq3bcAkAAAAASUVORK5CYII=";document.querySelector("link[rel=icon]").setAttribute("href","data:image/png;base64,"+a),document.querySelector("#bake img").setAttribute("src","data:image/png;base64,"+b),document.querySelector(".about-img-left").setAttribute("src","data:image/png;base64,"+c)},SeasonalWaiter.prototype.insert_spider_text=function(){document.title=document.title.replace(/Cyber/g,"Spider"),SeasonalWaiter.tree_walk(document.body,function(a){3==a.nodeType&&(a.nodeValue=a.nodeValue.replace(/Cyber/g,"Spider"))},!0),SeasonalWaiter.tree_walk(document.getElementById("bake-group"),function(a){3==a.nodeType&&(a.nodeValue=a.nodeValue.replace(/Bake/g,"Spin"))},!0),document.querySelector("#recipe .title").innerHTML="Web"},SeasonalWaiter.prototype.create_snow_option=function(){var a=document.getElementById("options-body"),b=document.createElement("div");b.className="option-item",b.innerHTML=" Let it snow",a.appendChild(b),this.manager.options.load()},SeasonalWaiter.prototype.let_it_snow=function(){if($(document).snowfall("clear"),this.app.options.snow){var a={},b=navigator.userAgent.match(/Firefox\/(\d\d?)/);a=b&&parseInt(b[1],10)<30?{flakeCount:10,flakeColor:"#fff",flakePosition:"absolute",minSize:1,maxSize:2,minSpeed:1,maxSpeed:5,round:!1,shadow:!1,collection:!1,collectionHeight:20,deviceorientation:!0}:{flakeCount:35,flakeColor:"#fff",flakePosition:"absolute",minSize:5,maxSize:8,minSpeed:1,maxSpeed:5,round:!0,shadow:!0,collection:".btn",collectionHeight:20,deviceorientation:!0},$(document).snowfall(a)}},SeasonalWaiter.prototype.shake_off_snow=function(a){for(var b=a.target,c=b.getBoundingClientRect(),d=document.querySelectorAll("canvas.snowfall-canvas"),e=null,f=function(){h.clearRect(0,0,e.width,e.height),$(this).fadeIn()},g=0;g6e4&&this.app.silent_bake()};var main=function(){var a=["To Base64","From Base64","To Hex","From Hex","To Hexdump","From Hexdump","URL Decode","Regular expression","Entropy","Fork"],b={update_url:!0,show_highlighter:!0,treat_as_utf8:!0,word_wrap:!0,show_errors:!0,error_timeout:4e3,auto_bake_threshold:200,attempt_highlight:!0,snow:!1};document.removeEventListener("DOMContentLoaded",main,!1),window.app=new HTMLApp(Categories,OperationConfig,a,b),window.app.setup()};window.console=console||{log:function(){},error:function(){}},window.compile_time=moment.tz("Wed Nov 30 2016 19:49:18","ddd MMM D YYYY HH:mm:ss","UTC").valueOf(),window.compile_message="",document.addEventListener("DOMContentLoaded",main,!1); \ No newline at end of file +},ControlsWaiter.prototype.sli_check_change=function(){this.initialise_save_link()},ControlsWaiter.prototype.load_click=function(){this.populate_load_recipes_list(),$("#load-modal").modal()},ControlsWaiter.prototype.save_button_click=function(){var a=document.getElementById("save-name").value,b=document.getElementById("save-text").value;if(!a)return void this.app.alert("Please enter a recipe name","danger",2e3);var c=localStorage.saved_recipes?JSON.parse(localStorage.saved_recipes):[],d=localStorage.recipe_id||0;c.push({id:++d,name:a,recipe:b}),localStorage.saved_recipes=JSON.stringify(c),localStorage.recipe_id=d,this.app.alert('Recipe saved as "'+a+'".',"success",2e3)},ControlsWaiter.prototype.populate_load_recipes_list=function(){for(var a=document.getElementById("load-name"),b=a.options.length;b--;)a.remove(b);var c=localStorage.saved_recipes?JSON.parse(localStorage.saved_recipes):[];for(b=0;bthis.options.auto_bake_threshold&&this.auto_bake_&&(this.manager.controls.set_auto_bake(!1),this.alert("Baking took longer than "+this.options.auto_bake_threshold+"ms, Auto Bake has been disabled.","warning",5e3))}},HTMLApp.prototype.auto_bake=function(){this.auto_bake_&&this.bake()},HTMLApp.prototype.silent_bake=function(){var a=(new Date).getTime(),b=this.get_recipe_config();return this.auto_bake_&&this.chef.silent_bake(b),(new Date).getTime()-a},HTMLApp.prototype.get_input=function(){var a=this.manager.input.get();return sessionStorage.setItem("input_length",a.length),sessionStorage.setItem("input",a),a},HTMLApp.prototype.set_input=function(a){sessionStorage.setItem("input_length",a.length),sessionStorage.setItem("input",a),this.manager.input.set(a)},HTMLApp.prototype.populate_operations_list=function(){document.body.appendChild(document.getElementById("edit-favourites"));for(var a="",b=0;b2?JSON.parse(localStorage.favourites):this.dfavourites;a=this.valid_favourites(a),this.save_favourites(a);var b=this.categories.filter(function(a){return"Favourites"==a.name})[0];b?b.ops=a:this.categories.unshift({name:"Favourites",ops:a})},HTMLApp.prototype.valid_favourites=function(a){for(var b=[],c=0;c=0?void this.alert("'"+a+"' is already in your favourites","info",2e3):(b.push(a),this.save_favourites(b),this.load_favourites(),this.populate_operations_list(),void this.manager.recipe.initialise_operation_drag_n_drop())},HTMLApp.prototype.load_URI_params=function(){this.query_string=function(a){if(""===a)return{};for(var b={},c=0;c"):d[e].value=a[b].args[e];a[b].disabled&&c.querySelector(".disable-icon").click(),a[b].breakpoint&&c.querySelector(".breakpoint").click(),this.progress=0}},HTMLApp.prototype.reset_layout=function(){document.getElementById("operations").style.width="calc(20% - 2px)",document.getElementById("recipe").style.width="calc(30% - 4px)",document.getElementById("IO").style.width="calc(50% - 2px)",document.getElementById("input").style.height="calc(50% - 2px)",document.getElementById("output").style.height="calc(50% - 2px)",this.manager.controls.adjust_width()},HTMLApp.prototype.set_compile_message=function(){var a=new Date,b=Utils.fuzzy_time(a.getTime()-window.compile_time),c='Last build: '+b.substr(0,1).toUpperCase()+b.substr(1)+" ago";""!==window.compile_message&&(c+=" - "+window.compile_message),c+="",document.getElementById("notice").innerHTML=c},HTMLApp.prototype.alert=function(a,b,c,d){var e=new Date;if(console.log("["+e.toLocaleString()+"] "+a),!d){b=b||"danger",c=c||0;var f=document.getElementById("alert"),g=document.getElementById("alert-content");f.classList.remove("alert-danger"),f.classList.remove("alert-warning"),f.classList.remove("alert-info"),f.classList.remove("alert-success"),f.classList.add("alert-"+b),"block"==f.style.display?g.innerHTML+="

          ["+e.toLocaleTimeString()+"] "+a:g.innerHTML="["+e.toLocaleTimeString()+"] "+a,$("#alert").stop(),f.style.display="block",f.style.opacity=1,c>0&&(clearTimeout(this.alert_timeout),this.alert_timeout=setTimeout(function(){$("#alert").slideUp(100)},c))}},HTMLApp.prototype.confirm=function(a,b,c,d){d=d||this,document.getElementById("confirm-title").innerHTML=a,document.getElementById("confirm-body").innerHTML=b,document.getElementById("confirm-modal").style.display="block",this.confirm_closed=!1,$("#confirm-modal").modal().one("show.bs.modal",function(a){this.confirm_closed=!1}.bind(this)).one("click","#confirm-yes",function(){this.confirm_closed=!0,c.bind(d)(!0),$("#confirm-modal").modal("hide")}.bind(this)).one("hide.bs.modal",function(a){this.confirm_closed||c.bind(d)(!1),this.confirm_closed=!0}.bind(this))},HTMLApp.prototype.alert_close_click=function(){document.getElementById("alert").style.display="none"},HTMLApp.prototype.state_change=function(a){this.auto_bake(),this.options.update_url&&(this.last_state_url=this.manager.controls.generate_state_url(!0,!0),window.history.replaceState({},"CyberChef",this.last_state_url))},HTMLApp.prototype.pop_state=function(a){window.location.href.split("#")[0]!==this.last_state_url&&this.load_URI_params()},HTMLApp.prototype.call_api=function(a,b,c,d,e){b=b||"POST",c=c||{},d=d||void 0,e=e||"application/json";var f=null,g=!1;return $.ajax({url:a,async:!1,type:b,data:c,dataType:d,contentType:e,success:function(a){g=!0,f=a},error:function(a){g=!1,f=a}}),{success:g,response:f}};var HTMLCategory=function(a,b){this.name=a,this.selected=b,this.op_list=[]};HTMLCategory.prototype.add_operation=function(a){this.op_list.push(a)},HTMLCategory.prototype.to_html=function(){for(var a="cat"+this.name.replace(/[\s\/-:_]/g,""),b="
          "+this.name+"
            ",c=0;c 
          ";switch(d+="
          ",this.type){case"string":case"binary_string":case"byte_array":d+="";break;case"short_string":case"binary_short_string":d+="";break;case"toggle_string":for(d+="
          ";break;case"number":d+="";break;case"boolean":d+="",this.disable_args&&this.manager.add_dynamic_listener("#"+this.id,"click",this.toggle_disable_args,this);break;case"option":for(d+="";break;case"populate_option":for(d+="",this.manager.add_dynamic_listener("#"+this.id,"change",this.populate_option_change,this);break;case"editable_option":for(d+="
          ",d+="",d+="",d+="
          ",this.manager.add_dynamic_listener("#sel-"+this.id,"change",this.editable_option_change,this);break;case"text":d+=""}return d+="
          "},HTMLIngredient.prototype.toggle_disable_args=function(a){for(var b,c=a.target,d=c.parentNode.parentNode,e=d.querySelectorAll(".arg-group"),f=0;f"),this.description&&(b+=""),b+=""},HTMLOperation.prototype.to_full_html=function(){for(var a="
          "+this.name+"
          ",b=0;b=0&&(this.name=this.name.slice(0,b)+""+this.name.slice(b,b+a.length)+""+this.name.slice(b+a.length)),this.description&&c>=0&&(this.description=this.description.slice(0,c)+""+this.description.slice(c,c+a.length)+""+this.description.slice(c+a.length))};var HighlighterWaiter=function(a){this.app=a,this.mouse_button_down=!1,this.mouse_target=null};HighlighterWaiter.INPUT=0,HighlighterWaiter.OUTPUT=1,HighlighterWaiter.prototype._is_selection_backwards=function(){var a=!1,b=window.getSelection();if(!b.isCollapsed){var c=document.createRange();c.setStart(b.anchorNode,b.anchorOffset),c.setEnd(b.focusNode,b.focusOffset),a=c.collapsed,c.detach()}return a},HighlighterWaiter.prototype._get_output_html_offset=function(a,b){var c=window.getSelection(),d=document.createRange();return d.selectNodeContents(document.getElementById("output-html")),d.setEnd(a,b),c.removeAllRanges(),c.addRange(d),c.toString().length},HighlighterWaiter.prototype._get_output_html_selection_offsets=function(){var a,b=window.getSelection(),c=0,d=0,e=!1;return b.rangeCount&&(a=b.getRangeAt(b.rangeCount-1),e=this._is_selection_backwards(),c=this._get_output_html_offset(a.startContainer,a.startOffset),d=this._get_output_html_offset(a.endContainer,a.endOffset),b.removeAllRanges(),b.addRange(a),e&&(b.collapseToEnd(),b.extend(b.anchorNode,a.startOffset))),{start:c,end:d}},HighlighterWaiter.prototype.input_scroll=function(a){var b=a.target;document.getElementById("input-highlighter").scrollTop=b.scrollTop,document.getElementById("input-highlighter").scrollLeft=b.scrollLeft},HighlighterWaiter.prototype.output_scroll=function(a){var b=a.target;document.getElementById("output-highlighter").scrollTop=b.scrollTop,document.getElementById("output-highlighter").scrollLeft=b.scrollLeft},HighlighterWaiter.prototype.input_mousedown=function(a){this.mouse_button_down=!0,this.mouse_target=HighlighterWaiter.INPUT,this.remove_highlights();var b=a.target,c=b.selectionStart,d=b.selectionEnd;0===c&&0===d||(document.getElementById("input-selection-info").innerHTML=this.selection_info(c,d),this.highlight_output([{start:c,end:d}]))},HighlighterWaiter.prototype.output_mousedown=function(a){this.mouse_button_down=!0,this.mouse_target=HighlighterWaiter.OUTPUT,this.remove_highlights();var b=a.target,c=b.selectionStart,d=b.selectionEnd;0===c&&0===d||(document.getElementById("output-selection-info").innerHTML=this.selection_info(c,d),this.highlight_input([{start:c,end:d}]))},HighlighterWaiter.prototype.output_html_mousedown=function(a){this.mouse_button_down=!0,this.mouse_target=HighlighterWaiter.OUTPUT;var b=this._get_output_html_selection_offsets();0===b.start&&0===b.end||(document.getElementById("output-selection-info").innerHTML=this.selection_info(b.start,b.end))},HighlighterWaiter.prototype.input_mouseup=function(a){this.mouse_button_down=!1},HighlighterWaiter.prototype.output_mouseup=function(a){this.mouse_button_down=!1},HighlighterWaiter.prototype.output_html_mouseup=function(a){this.mouse_button_down=!1},HighlighterWaiter.prototype.input_mousemove=function(a){if(this.mouse_button_down&&1==a.which&&this.mouse_target==HighlighterWaiter.INPUT){var b=a.target,c=b.selectionStart,d=b.selectionEnd;0===c&&0===d||(document.getElementById("input-selection-info").innerHTML=this.selection_info(c,d),this.highlight_output([{start:c,end:d}]))}},HighlighterWaiter.prototype.output_mousemove=function(a){if(this.mouse_button_down&&1==a.which&&this.mouse_target==HighlighterWaiter.OUTPUT){var b=a.target,c=b.selectionStart,d=b.selectionEnd;0===c&&0===d||(document.getElementById("output-selection-info").innerHTML=this.selection_info(c,d),this.highlight_input([{start:c,end:d}]))}},HighlighterWaiter.prototype.output_html_mousemove=function(a){if(this.mouse_button_down&&1==a.which&&this.mouse_target==HighlighterWaiter.OUTPUT){var b=this._get_output_html_selection_offsets();0===b.start&&0===b.end||(document.getElementById("output-selection-info").innerHTML=this.selection_info(b.start,b.end))}},HighlighterWaiter.prototype.selection_info=function(a,b){var c=b.toString().length;c=c<2?2:c;var d=Utils.pad(a.toString(),c," ").replace(/ /g," "),e=Utils.pad(b.toString(),c," ").replace(/ /g," "),f=Utils.pad((b-a).toString(),c," ").replace(/ /g," ");return"start: "+d+"
          end: "+e+"
          length: "+f},HighlighterWaiter.prototype.remove_highlights=function(){document.getElementById("input-highlighter").innerHTML="",document.getElementById("output-highlighter").innerHTML="",document.getElementById("input-selection-info").innerHTML="",document.getElementById("output-selection-info").innerHTML=""},HighlighterWaiter.prototype.generate_highlight_list=function(){for(var a=this.app.get_recipe_config(),b=[],c=0;c=0)return!1;var d="[start_highlight]",e=/\[start_highlight\]/g,f="[end_highlight]",g=/\[end_highlight\]/g,h=a.value;if(1==c.length){if(c[0].end/g,">").replace(/\n/g," ").replace(e,'').replace(g,"")+" ",b.style.width=a.clientWidth+"px",b.innerHTML=h,b.scrollTop=a.scrollTop,b.scrollLeft=a.scrollLeft};var InputWaiter=function(a,b){this.app=a,this.manager=b,this.bad_keys=[16,17,18,19,20,27,33,34,35,36,37,38,39,40,44,91,92,93,112,113,114,115,116,117,118,119,120,121,122,123,144,145]};InputWaiter.prototype.get=function(){return document.getElementById("input-text").value},InputWaiter.prototype.set=function(a){document.getElementById("input-text").value=a,window.dispatchEvent(this.manager.statechange)},InputWaiter.prototype.set_input_info=function(a,b){var c=a.toString().length;c=c<2?2:c;var d=Utils.pad(a.toString(),c," ").replace(/ /g," "),e=Utils.pad(b.toString(),c," ").replace(/ /g," ");document.getElementById("input-info").innerHTML="length: "+d+"
          lines: "+e},InputWaiter.prototype.input_change=function(a){this.manager.highlighter.remove_highlights(),this.app.progress=0;var b=this.get(),c=b.count("\n")+1;this.set_input_info(b.length,c),this.bad_keys.indexOf(a.keyCode)<0&&window.dispatchEvent(this.manager.statechange)},InputWaiter.prototype.input_dragover=function(a){return"move"!==a.dataTransfer.effectAllowed&&(a.stopPropagation(),a.preventDefault(),void a.target.classList.add("dropping-file"))},InputWaiter.prototype.input_dragleave=function(a){a.stopPropagation(),a.preventDefault(),a.target.classList.remove("dropping-file")},InputWaiter.prototype.input_drop=function(a){if("move"===a.dataTransfer.effectAllowed)return!1;a.stopPropagation(),a.preventDefault();var b=a.target,c=a.dataTransfer.files[0],d=a.dataTransfer.getData("Text"),e=new FileReader,f="",g=0,h=20480,i=function(){f.length>1e5&&this.app.auto_bake_&&(this.manager.controls.set_auto_bake(!1),this.app.alert("Turned off Auto Bake as the input is large","warning",5e3)),this.set(f);var a=this.app.get_recipe_config();a[0]&&"From Hex"==a[0].op||(a.unshift({op:"From Hex",args:["Space"]}),this.app.set_recipe_config(a)),b.classList.remove("loading_file")}.bind(this),j=function(){if(g>=c.size)return void i();b.value="Processing... "+Math.round(g/c.size*100)+"%";var a=c.slice(g,g+h);e.readAsArrayBuffer(a)}.bind(this);e.onload=function(a){var b=new Uint8Array(e.result);f+=Utils.to_hex_fast(b),g+=h,j()}.bind(this),b.classList.remove("dropping-file"),c?(b.classList.add("loading_file"),j()):d&&this.set(d)},InputWaiter.prototype.clear_io_click=function(){this.manager.highlighter.remove_highlights(),document.getElementById("input-text").value="",document.getElementById("output-text").value="",document.getElementById("input-info").innerHTML="",document.getElementById("output-info").innerHTML="",document.getElementById("input-selection-info").innerHTML="",document.getElementById("output-selection-info").innerHTML="",window.dispatchEvent(this.manager.statechange)};var Manager=function(a){this.app=a,this.appstart=new CustomEvent("appstart",{bubbles:!0}),this.operationadd=new CustomEvent("operationadd",{bubbles:!0}),this.operationremove=new CustomEvent("operationremove",{bubbles:!0}),this.oplistcreate=new CustomEvent("oplistcreate",{bubbles:!0}),this.statechange=new CustomEvent("statechange",{bubbles:!0}),this.window=new WindowWaiter(this.app),this.controls=new ControlsWaiter(this.app,this),this.recipe=new RecipeWaiter(this.app,this),this.ops=new OperationsWaiter(this.app,this),this.input=new InputWaiter(this.app,this),this.output=new OutputWaiter(this.app,this),this.options=new OptionsWaiter(this.app),this.highlighter=new HighlighterWaiter(this.app),this.seasonal=new SeasonalWaiter(this.app,this),this.dynamic_handlers={},this.initialise_event_listeners()};Manager.prototype.setup=function(){this.recipe.initialise_operation_drag_n_drop(),this.controls.auto_bake_change(),this.seasonal.load()},Manager.prototype.initialise_event_listeners=function(){window.addEventListener("resize",this.window.window_resize.bind(this.window)),window.addEventListener("blur",this.window.window_blur.bind(this.window)),window.addEventListener("focus",this.window.window_focus.bind(this.window)),window.addEventListener("statechange",this.app.state_change.bind(this.app)),window.addEventListener("popstate",this.app.pop_state.bind(this.app)),document.getElementById("bake").addEventListener("click",this.controls.bake_click.bind(this.controls)),document.getElementById("auto-bake").addEventListener("change",this.controls.auto_bake_change.bind(this.controls)),document.getElementById("step").addEventListener("click",this.controls.step_click.bind(this.controls)),document.getElementById("clr-recipe").addEventListener("click",this.controls.clear_recipe_click.bind(this.controls)),document.getElementById("clr-breaks").addEventListener("click",this.controls.clear_breaks_click.bind(this.controls)),document.getElementById("save").addEventListener("click",this.controls.save_click.bind(this.controls)),document.getElementById("save-button").addEventListener("click",this.controls.save_button_click.bind(this.controls)),document.getElementById("save-link-recipe-checkbox").addEventListener("change",this.controls.slr_check_change.bind(this.controls)),document.getElementById("save-link-input-checkbox").addEventListener("change",this.controls.sli_check_change.bind(this.controls)),document.getElementById("load").addEventListener("click",this.controls.load_click.bind(this.controls)),document.getElementById("load-delete-button").addEventListener("click",this.controls.load_delete_click.bind(this.controls)),document.getElementById("load-name").addEventListener("change",this.controls.load_name_change.bind(this.controls)),document.getElementById("load-button").addEventListener("click",this.controls.load_button_click.bind(this.controls)),this.add_multi_event_listener("#save-text","keyup paste",this.controls.save_text_change,this.controls),this.add_multi_event_listener("#search","keyup paste search",this.ops.search_operations,this.ops),this.add_dynamic_listener(".op_list li.operation","dblclick",this.ops.operation_dblclick,this.ops),document.getElementById("edit-favourites").addEventListener("click",this.ops.edit_favourites_click.bind(this.ops)),document.getElementById("save-favourites").addEventListener("click",this.ops.save_favourites_click.bind(this.ops)),document.getElementById("reset-favourites").addEventListener("click",this.ops.reset_favourites_click.bind(this.ops)),this.add_dynamic_listener(".op_list .op-icon","mouseover",this.ops.op_icon_mouseover,this.ops), +this.add_dynamic_listener(".op_list .op-icon","mouseleave",this.ops.op_icon_mouseleave,this.ops),this.add_dynamic_listener(".op_list","oplistcreate",this.ops.op_list_create,this.ops),this.add_dynamic_listener("li.operation","operationadd",this.recipe.op_add.bind(this.recipe)),this.add_dynamic_listener(".arg","keyup",this.recipe.ing_change,this.recipe),this.add_dynamic_listener(".arg","change",this.recipe.ing_change,this.recipe),this.add_dynamic_listener(".disable-icon","click",this.recipe.disable_click,this.recipe),this.add_dynamic_listener(".breakpoint","click",this.recipe.breakpoint_click,this.recipe),this.add_dynamic_listener("#rec_list li.operation","dblclick",this.recipe.operation_dblclick,this.recipe),this.add_dynamic_listener("#rec_list li.operation > div","dblclick",this.recipe.operation_child_dblclick,this.recipe),this.add_dynamic_listener("#rec_list .input-group .dropdown-menu a","click",this.recipe.dropdown_toggle_click,this.recipe),this.add_dynamic_listener("#rec_list","operationremove",this.recipe.op_remove.bind(this.recipe)),this.add_multi_event_listener("#input-text","keyup paste",this.input.input_change,this.input),document.getElementById("reset-layout").addEventListener("click",this.app.reset_layout.bind(this.app)),document.getElementById("clr-io").addEventListener("click",this.input.clear_io_click.bind(this.input)),document.getElementById("input-text").addEventListener("dragover",this.input.input_dragover.bind(this.input)),document.getElementById("input-text").addEventListener("dragleave",this.input.input_dragleave.bind(this.input)),document.getElementById("input-text").addEventListener("drop",this.input.input_drop.bind(this.input)),document.getElementById("input-text").addEventListener("scroll",this.highlighter.input_scroll.bind(this.highlighter)),document.getElementById("input-text").addEventListener("mouseup",this.highlighter.input_mouseup.bind(this.highlighter)),document.getElementById("input-text").addEventListener("mousemove",this.highlighter.input_mousemove.bind(this.highlighter)),this.add_multi_event_listener("#input-text","mousedown dblclick select",this.highlighter.input_mousedown,this.highlighter),document.getElementById("save-to-file").addEventListener("click",this.output.save_click.bind(this.output)),document.getElementById("switch").addEventListener("click",this.output.switch_click.bind(this.output)),document.getElementById("undo-switch").addEventListener("click",this.output.undo_switch_click.bind(this.output)),document.getElementById("output-text").addEventListener("scroll",this.highlighter.output_scroll.bind(this.highlighter)),document.getElementById("output-text").addEventListener("mouseup",this.highlighter.output_mouseup.bind(this.highlighter)),document.getElementById("output-text").addEventListener("mousemove",this.highlighter.output_mousemove.bind(this.highlighter)),document.getElementById("output-html").addEventListener("mouseup",this.highlighter.output_html_mouseup.bind(this.highlighter)),document.getElementById("output-html").addEventListener("mousemove",this.highlighter.output_html_mousemove.bind(this.highlighter)),this.add_multi_event_listener("#output-text","mousedown dblclick select",this.highlighter.output_mousedown,this.highlighter),this.add_multi_event_listener("#output-html","mousedown dblclick select",this.highlighter.output_html_mousedown,this.highlighter),document.getElementById("options").addEventListener("click",this.options.options_click.bind(this.options)),document.getElementById("reset-options").addEventListener("click",this.options.reset_options_click.bind(this.options)),$(".option-item input:checkbox").on("switchChange.bootstrapSwitch",this.options.switch_change.bind(this.options)),$(".option-item input:checkbox").on("switchChange.bootstrapSwitch",this.options.set_word_wrap.bind(this.options)),this.add_dynamic_listener(".option-item input[type=number]","keyup",this.options.number_change,this.options),this.add_dynamic_listener(".option-item input[type=number]","change",this.options.number_change,this.options),this.add_dynamic_listener(".option-item select","change",this.options.select_change,this.options),document.getElementById("alert-close").addEventListener("click",this.app.alert_close_click.bind(this.app))},Manager.prototype.add_listeners=function(a,b,c,d){d=d||this,[].forEach.call(document.querySelectorAll(a),function(a){a.addEventListener(b,c.bind(d))})},Manager.prototype.add_multi_event_listener=function(a,b,c,d){for(var e=b.split(" "),f=0;f-1&&(this.manager.recipe.add_operation(b[c].innerHTML),this.app.auto_bake()))),13==a.keyCode)a.preventDefault();else if(40==a.keyCode)a.preventDefault(),b=document.querySelectorAll("#search-results li"),b.length&&(c=this.get_selected_op(b),c>-1&&b[c].classList.remove("selected-op"),c==b.length-1&&(c=-1),b[c+1].classList.add("selected-op"));else if(38==a.keyCode)a.preventDefault(),b=document.querySelectorAll("#search-results li"),b.length&&(c=this.get_selected_op(b),c>-1&&b[c].classList.remove("selected-op"),0===c&&(c=b.length),b[c-1].classList.add("selected-op"));else{for(var d=document.getElementById("search-results"),e=a.target,f=e.value;d.firstChild;)d.removeChild(d.firstChild);if($("#categories .in").collapse("hide"),f){for(var g=this.filter_operations(f,!0),h="",i=0;i=0||h>=0){var i=new HTMLOperation(e,this.app.operations[e],this.app,this.manager);b&&i.highlight_search_string(a,g,h),g<0?c.push(i):d.push(i)}}return d.concat(c)},OperationsWaiter.prototype.get_selected_op=function(a){for(var b=0;blength: "+e+"
          lines: "+f,document.getElementById("input-selection-info").innerHTML="",document.getElementById("output-selection-info").innerHTML=""},OutputWaiter.prototype.save_click=function(){var a=Utils.to_base64(this.app.dish_str),b=window.prompt("Please enter a filename:","download.dat");if(b){var c=document.createElement("a");c.setAttribute("href","data:application/octet-stream;base64;charset=utf-8,"+a),c.setAttribute("download",b),c.style.display="none",document.body.appendChild(c),c.click(),c.remove()}},OutputWaiter.prototype.switch_click=function(){this.switch_orig_data=this.manager.input.get(),document.getElementById("undo-switch").disabled=!1,this.app.set_input(this.app.dish_str)},OutputWaiter.prototype.undo_switch_click=function(){this.app.set_input(this.switch_orig_data),document.getElementById("undo-switch").disabled=!0};var RecipeWaiter=function(a,b){this.app=a,this.manager=b,this.remove_intent=!1};RecipeWaiter.prototype.initialise_operation_drag_n_drop=function(){var a=document.getElementById("rec_list");document.querySelectorAll(".category .op_list");Sortable.create(a,{group:"recipe",sort:!0,animation:0,delay:0,filter:".arg-input,.arg",setData:function(a,b){a.setData("Text",b.querySelector(".arg-title").textContent)},onEnd:function(a){this.remove_intent&&(a.item.remove(),a.target.dispatchEvent(this.manager.operationremove))}.bind(this)}),Sortable.utils.on(a,"dragover",function(){this.remove_intent=!1}.bind(this)),Sortable.utils.on(a,"dragleave",function(){this.remove_intent=!0,this.app.progress=0}.bind(this)),document.querySelector("#categories a").addEventListener("dragover",this.fav_dragover.bind(this)),document.querySelector("#categories a").addEventListener("dragleave",this.fav_dragleave.bind(this)),document.querySelector("#categories a").addEventListener("drop",this.fav_drop.bind(this))},RecipeWaiter.prototype.create_sortable_seed_list=function(a){Sortable.create(a,{group:{name:"recipe",pull:"clone",put:!1},sort:!1,setData:function(a,b){a.setData("Text",b.textContent)},onStart:function(a){$(a.item).popover("destroy"),a.item.setAttribute("data-toggle","popover-disabled")},onEnd:this.op_sort_end.bind(this)})},RecipeWaiter.prototype.op_sort_end=function(a){return this.remove_intent?void("rec_list"==a.item.parentNode.id&&a.item.remove()):($(a.clone).popover(),$(a.clone).children("[data-toggle=popover]").popover(),void("rec_list"===a.item.parentNode.id&&(this.build_recipe_operation(a.item),a.item.dispatchEvent(this.manager.operationadd))))},RecipeWaiter.prototype.fav_dragover=function(a){return"move"===a.dataTransfer.effectAllowed&&(a.stopPropagation(),a.preventDefault(),void(a.target.className&&a.target.className.indexOf("category-title")>-1?a.target.classList.add("favourites-hover"):a.target.parentNode.className&&a.target.parentNode.className.indexOf("category-title")>-1?a.target.parentNode.classList.add("favourites-hover"):a.target.parentNode.parentNode.className&&a.target.parentNode.parentNode.className.indexOf("category-title")>-1&&a.target.parentNode.parentNode.classList.add("favourites-hover")))},RecipeWaiter.prototype.fav_dragleave=function(a){a.stopPropagation(),a.preventDefault(),document.querySelector("#categories a").classList.remove("favourites-hover")},RecipeWaiter.prototype.fav_drop=function(a){a.stopPropagation(),a.preventDefault(),a.target.classList.remove("favourites-hover");var b=a.dataTransfer.getData("Text");this.app.add_favourite(b)},RecipeWaiter.prototype.ing_change=function(){window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.disable_click=function(a){var b=a.target;"false"==b.getAttribute("disabled")?(b.setAttribute("disabled","true"),b.classList.add("disable-icon-selected"),b.parentNode.parentNode.classList.add("disabled")):(b.setAttribute("disabled","false"),b.classList.remove("disable-icon-selected"),b.parentNode.parentNode.classList.remove("disabled")),this.app.progress=0,window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.breakpoint_click=function(a){var b=a.target;"false"==b.getAttribute("break")?(b.setAttribute("break","true"),b.classList.add("breakpoint-selected")):(b.setAttribute("break","false"),b.classList.remove("breakpoint-selected")),window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.operation_dblclick=function(a){a.target.remove(),window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.operation_child_dblclick=function(a){a.target.parentNode.remove(),window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.get_config=function(){for(var a,b,c,d,e,f=[],g=document.querySelectorAll("#rec_list li.operation"),h=0;h",this.ing_change()},RecipeWaiter.prototype.op_add=function(a){window.dispatchEvent(this.manager.statechange)},RecipeWaiter.prototype.op_remove=function(a){window.dispatchEvent(this.manager.statechange)};var SeasonalWaiter=function(a,b){this.app=a,this.manager=b};SeasonalWaiter.prototype.load=function(){var a=new Date;11==a.getMonth()&&a.getDate()>12&&(this.app.options.snow=!1,this.create_snow_option(),this.manager.add_dynamic_listener(".option-item input:checkbox[option='snow']","switchChange.bootstrapSwitch",this.let_it_snow,this),this.manager.add_window_listener("resize",this.let_it_snow,this),this.manager.add_listeners(".btn","click",this.shake_off_snow,this),25==a.getDate()&&this.let_it_snow()),this.kkeys=[],window.addEventListener("keydown",this.konami_code_listener.bind(this))},SeasonalWaiter.prototype.insert_spider_icons=function(){var a="iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB3UlEQVQ4y2NgGJaAmYGBgVnf0oKJgYGBobWtXamqqoYTn2I4CI+LTzM2NTulpKbu+vPHz2dV5RWlluZmi3j5+KqFJSSEzpw8uQPdAEYYIzo5Kfjrl28rWFlZzjAzMYuEBQao3Lh+g+HGvbsMzExMDN++fWf4/PXLBzY2tqYNK1f2+4eHM2xcuRLigsT09Igf3384MTExbf767etBI319jU8fPsi+//jx/72HDxh5uLkZ7ty7y/Dz1687Avz8n2UUFR3Z2NjOySoqfmdhYGBg+PbtuwI7O8e5H79+8X379t357PnzYo+ePP7y6cuXc9++f69nYGRsvf/w4XdtLS2R799/bBUWFHr57sP7Jbs3b/ZkzswvUP3165fZ7z9//r988WIVAyPDr8tXr576+u3bpb9//7YwMjKeV1dV41NWVGoVEhDgPH761DJREeHaz1+/lqlpafUx6+jrRfz4+fPy+w8fTu/fsf3uw7t3L39+//4cv7DwGQYGhpdPbt9m4BcRFlNWVJC4fuvWASszs4C379792Ldt2xZBUdEdDP5hYSqQGIjDGa965uYKCalpZQwMDAxhMTG9DAwMDLaurhIkJY7A8IgGBgYGBgd3Dz2yUpeFo6O4rasrA9T24ZRxAAMTwMpgEJwLAAAAAElFTkSuQmCC",b="iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACYVBMVEUAAAAcJ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gIe2mcXxP2IOumPRY17U0tll8KIkZNb+sppafOxYkQPSaYfchyYoL9GMqWYpTLRIq1QUcT4O3aPQgqVqPwIOIMwDhzX6mQUFIQAgo+9MzcrWrML3mj6+YIKiFCZyhL87RqVQKrEskF+P1BUvfLCAkfRwoPUtq6l5o5+lZb5SolJo6oT8avTCl+c9OTmat6pKW8mLkvBpGzlvsiGuQr4ZEEwA1EQgoR/gNtxIxKBluz+OtMJiF31jHxqXBiAqAUj4WRxpADFM0DCFlv1khvX7Wol4vF4AIldVVxdZqlrIfiCYQPHDy6bAGv7nKYRVY6JewExZVAP+ey5Rv+Ba97aaUHMW5NauLmMZFkegBb/EP14d6NoS9QLWFSzWBmuZza8CQmSpXsAqmGtVy14VALWuuYWWy+W3OteXa4jwceQX6+BKG6J1/8+2VCNkm2222WabbbbZZpttttlmm22rt38DCdA0vq3bcAkAAAAASUVORK5CYII=";document.querySelector("link[rel=icon]").setAttribute("href","data:image/png;base64,"+a),document.querySelector("#bake img").setAttribute("src","data:image/png;base64,"+b),document.querySelector(".about-img-left").setAttribute("src","data:image/png;base64,"+c)},SeasonalWaiter.prototype.insert_spider_text=function(){document.title=document.title.replace(/Cyber/g,"Spider"),SeasonalWaiter.tree_walk(document.body,function(a){3==a.nodeType&&(a.nodeValue=a.nodeValue.replace(/Cyber/g,"Spider"))},!0),SeasonalWaiter.tree_walk(document.getElementById("bake-group"),function(a){3==a.nodeType&&(a.nodeValue=a.nodeValue.replace(/Bake/g,"Spin"))},!0),document.querySelector("#recipe .title").innerHTML="Web"},SeasonalWaiter.prototype.create_snow_option=function(){var a=document.getElementById("options-body"),b=document.createElement("div");b.className="option-item",b.innerHTML=" Let it snow",a.appendChild(b),this.manager.options.load()},SeasonalWaiter.prototype.let_it_snow=function(){if($(document).snowfall("clear"),this.app.options.snow){var a={},b=navigator.userAgent.match(/Firefox\/(\d\d?)/);a=b&&parseInt(b[1],10)<30?{flakeCount:10,flakeColor:"#fff",flakePosition:"absolute",minSize:1,maxSize:2,minSpeed:1,maxSpeed:5,round:!1,shadow:!1,collection:!1,collectionHeight:20,deviceorientation:!0}:{flakeCount:35,flakeColor:"#fff",flakePosition:"absolute",minSize:5,maxSize:8,minSpeed:1,maxSpeed:5,round:!0,shadow:!0,collection:".btn",collectionHeight:20,deviceorientation:!0},$(document).snowfall(a)}},SeasonalWaiter.prototype.shake_off_snow=function(a){for(var b=a.target,c=b.getBoundingClientRect(),d=document.querySelectorAll("canvas.snowfall-canvas"),e=null,f=function(){h.clearRect(0,0,e.width,e.height),$(this).fadeIn()},g=0;g6e4&&this.app.silent_bake()};var main=function(){var a=["To Base64","From Base64","To Hex","From Hex","To Hexdump","From Hexdump","URL Decode","Regular expression","Entropy","Fork"],b={update_url:!0,show_highlighter:!0,treat_as_utf8:!0,word_wrap:!0,show_errors:!0,error_timeout:4e3,auto_bake_threshold:200,attempt_highlight:!0,snow:!1};document.removeEventListener("DOMContentLoaded",main,!1),window.app=new HTMLApp(Categories,OperationConfig,a,b),window.app.setup()};window.console=console||{log:function(){},error:function(){}},window.compile_time=moment.tz("Wed Nov 30 2016 23:09:33","ddd MMM D YYYY HH:mm:ss","UTC").valueOf(),window.compile_message="",document.addEventListener("DOMContentLoaded",main,!1); \ No newline at end of file diff --git a/src/js/views/html/HTMLApp.js b/src/js/views/html/HTMLApp.js index 5cf8f759..d8634272 100755 --- a/src/js/views/html/HTMLApp.js +++ b/src/js/views/html/HTMLApp.js @@ -279,8 +279,8 @@ HTMLApp.prototype.valid_favourites = function(favourites) { if (this.operations.hasOwnProperty(favourites[i])) { valid_favs.push(favourites[i]); } else { - this.alert("The operation \"" + favourites[i] + "\" is no longer " + - "available. It has been removed from your favourites.", "info"); + this.alert("The operation \"" + Utils.escape_html(favourites[i]) + + "\" is no longer available. It has been removed from your favourites.", "info"); } } return valid_favs;