session_start(); $dailystormer_onion = "stormer5v52vjsw66jmds7ndeecudq444woadhzr2plxlaayexnh6eqd.onion"; $dailystormer_url = "https://dailystormer.in"; $duckduckgo_onion = "https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion"; // $duckduckgo_onion = "http://3g2upl4pq6kufc4m.onion"; // (updated 2021-11-06) $q_mark = false; $f_aquote = false; $f_dquote = false; $f_squote = false; $set_columns = false; $set_default_set = false; $set_size_columns_field = false; $set_size_font = false; $set_tag_html_property_use = false; $set_theme = false; $set_type_write_image = false; $set_type_write_image_override = false; $set_void_slash = false; $slash_even = false; $void_slash = false; $word_break = false; $columns = 80; $columns_max = 160; $i = 0; $q_mark_ = 0; $size_font = 13; $dd_str = date("d"); $mm_str = date("m"); $req = ""; $size_columns_field = "size"; $substr_ = ""; $tag_html_property_use = "first"; $theme = "evil_mode"; $tmp = ""; $type_write_image = "caca"; $type_write_image_override = "html_img"; $uri = urldecode($_SERVER["REQUEST_URI"]); $option = array(); function ascii_break($str, $columns_ascii_break, $type_return_ascii_break) { $a_trigger_break = false; $a_trigger_href = false; $a_trigger_label = false; $a_trigger_url = false; $b_trigger_break = false; $b_trigger_button = false; $b_trigger_label = false; $b_trigger_name = false; $break_spliced = false; $f_trigger_break = false; $f_trigger_input = false; $f_trigger_label = false; $f_trigger_maxlength = false; $f_trigger_name = false; $f_trigger_value = false; $f_trigger_size = false; $label_start = false; $m_trigger_alt = false; $m_trigger_break = false; $m_trigger_break_active = false; $m_trigger_file = false; $m_trigger_img = false; $m_trigger_label = false; $m_trigger_label_active = false; $m_trigger_title = false; $space = false; $t_trigger_break = false; $t_trigger_href = false; $t_trigger_label = false; $t_trigger_url = false; $tag_html = false; $tag_html_input_size_trigger = false; $tag_html_input_value_trigger = false; $tag_html_name_trigger = false; $tag_html_name_start_trigger = false; $tag_html_property_trigger = false; $tag_html_property_start_trigger = false; $tag_html_property_value_trigger = false; $tag_html_property_value_start_trigger = false; $tag_html_quote_double = false; $tag_html_quote_relevant = false; $tag_html_quote_single = false; $tag_html_space_trigger = false; $tag_trigger = false; $tag_trigger_field = false; $word_break = false; $a_count = 0; $b_count = 0; $break_size = 0; $caca_string_size = 0; $columns_count = 0; $count_slash = 0; $f_count = 0; $i = 0; $j = 0; $k = 0; $m_count = 0; $m_pixels = 0; $newline = false; $result = 0; $t_count = 0; $tag_html_name_start = 0; $tag_html_property_start = 0; $tag_html_property_value_start = 0; $tag_html_size = 0; $tag_html_value_index = 0; $break_label_tail = ""; $break_splice = ""; $caca = ""; $caca_string = ""; $caca_substr = ""; $message = ""; $message_break = ""; $substr = ""; $substr_end = ""; $substr_slash = ""; $substr_tag = ""; $substr_tag_slash = ""; $tag = ""; $tag_accessory_post = ""; $tag_accessory_pre = ""; $tag_accumulator = ""; $tag_accumulator_html = ""; $tag_accumulator_html_value = ""; $tag_html_quote_type = "none"; $tag_html_value = ""; $tag_html_value_accessory = ""; $tag_substr = ""; $arr = array(); $caca_array = array(); $message_break_arr = array(); $tag_accumulator_html_arr = array(); $tag_accumulator_html_arr_delta = array(); $tag_accumulator_html_value_arr = array(); if($type_return_ascii_break != "array" && $type_return_ascii_break != "string") $type_return_ascii_break = "string"; for($i = 0; $i < strlen($str); $i++) { $substr = substr($str, $i, 1); if($substr != " ") { if($space) { $space = false; array_push($arr, $message); $message = ""; } } else $space = true; if($substr == "<") { $message .= $substr; array_push($arr, $message); $message = ""; continue; } else if($substr == ">") { $message .= $substr; array_push($arr, $message); $message = ""; continue; } if($substr == "\\" && $i > 0) { $result = $i; $substr_slash = $substr; while($substr_slash == "\\" && $result > 0) { $result = $result - 1; $substr_slash = substr($str, $result, 1); } if(($i - $result) % 2 == 0) $slash_even = true; else $slash_even = false; } else $slash_even = false; if($substr == "\\" && !$slash_even && $i + 1 < strlen($str) && (substr($str, $i + 1, 1) == "a" || substr($str, $i + 1, 1) == "A" || substr($str, $i + 1, 1) == "B" || substr($str, $i + 1, 1) == "F" || substr($str, $i + 1, 1) == "m" || substr($str, $i + 1, 1) == "n" || substr($str, $i + 1, 1) == "T" || substr($str, $i + 1, 1) == "w")) { $message .= "\\"; $message .= substr($str, $i + 1, 1); $i = $i + 1; array_push($arr, $message); $message = ""; continue; } $message .= $substr; } array_push($arr, $message); for($i = 0; $i < sizeof($arr); $i++) { $message = $arr[$i]; if(strlen($message) > 1) { $result = strlen($message) - 2; $substr = substr($message, $result, 1); } else { $result = 0; $substr = ""; } if(strlen($message) > 0) $substr_end = substr($message, strlen($message) - 1, 1); else $substr_end = ""; if($substr == "\\") { $substr_slash = "\\"; while($substr_slash == "\\" && $result > 0) { $result = $result - 1; $substr_slash = substr($message, $result, 1); } if(strlen($message) - 2 > 0 && ((strlen($message) - 2) - $result) % 2 == 0) $slash_even = true; else $slash_even = false; } else $slash_even = false; if($substr_end == "<") { if(strlen($message) > 1) $message = substr($message, 0, strlen($message) - 1); else $message = ""; $tag_html = true; $tag_accumulator_html = "<"; } else if($tag_html) { $tag_accumulator_html .= $message; if($substr_end == ">") { $tag_html = false; $tag_html_input_size_trigger = false; $tag_html_input_value_trigger = false; $tag_html_name_trigger = false; $tag_html_name_start_trigger = false; $tag_html_property_trigger = false; $tag_html_property_start_trigger = false; $tag_html_property_value_trigger = false; $tag_html_property_value_start_trigger = false; $tag_html_quote_double = false; $tag_html_quote_relevant = false; $tag_html_quote_single = false; $tag_html_space_trigger = false; $count_slash = 0; $tag_html_name_start = 0; $tag_html_property_start = 0; $tag_html_property_value_start = 0; $tag_html_size = 0; $tag_html_value_index = 0; $tag_accumulator_html_value = ""; $tag_html_quote_type = "none"; $tag_html_value = ""; $tag_accumulator_html_arr = array(); $tag_accumulator_html_value_arr = array(); array_push($tag_accumulator_html_arr, "<"); for($j = 1; $j < strlen($tag_accumulator_html) - 1; $j++) { $substr_tag = substr($tag_accumulator_html, $j, 1); if($substr_tag == " " && !$tag_html_quote_double && !$tag_html_quote_single) $tag_html_space_trigger = true; else if($substr_tag != " ") { if($tag_html_quote_relevant) { if($substr_tag == "\"") $tag_html_quote_double = true; else if($substr_tag == "'") $tag_html_quote_single = true; } else if($tag_html_quote_double && $substr_tag == "\"" && $j - 1 > 0) { $count_slash = 0; for($k = $j - 1; $k >= 0; $k--) { $substr_tag_slash = substr($str, $k, 1); if($substr_tag_slash == "\\") $count_slash = $count_slash + 1; else break; } if($count_slash == 0 || $count_slash % 2 == 0) { $tag_html_quote_double = false; $tag_html_quote_type = "double"; } } else if($tag_html_quote_double && $substr_tag == "'" && $j - 1 > 0) { $count_slash = 0; for($k = $j - 1; $k >= 0; $k--) { $substr_tag_slash = substr($str, $k, 1); if($substr_tag_slash == "\\") $count_slash = $count_slash + 1; else break; } if($count_slash == 0 || $count_slash % 2 == 0) { $tag_html_quote_single = false; $tag_html_quote_type = "single"; } } $tag_html_space_trigger = false; $tag_html_quote_relevant = false; } if(!$tag_html_name_trigger) { if(!$tag_html_space_trigger && !$tag_html_name_start_trigger) { $tag_html_name_start_trigger = true; $tag_html_name_start = $j; } else if($tag_html_name_start_trigger && ($tag_html_space_trigger || $j + 1 >= strlen($tag_accumulator_html) - 1)) { $tag_html_name_trigger = true; if($j + 1 < strlen($tag_accumulator_html) - 1) array_push($tag_accumulator_html_arr, substr($tag_accumulator_html, $tag_html_name_start, $j - $tag_html_name_start)); else array_push($tag_accumulator_html_arr, substr($tag_accumulator_html, $tag_html_name_start, ($j + 1) - $tag_html_name_start)); $tag_html_name_start_trigger = false; $tag_html_name_start = 0; } } else if(!$tag_html_property_trigger) { if(!$tag_html_space_trigger && !$tag_html_property_start_trigger) { if($substr_tag == "/") { array_push($tag_accumulator_html_arr, "/"); break; } $tag_html_property_start_trigger = true; $tag_html_property_start = $j; } else if($tag_html_property_start_trigger && $substr_tag == "=") { $tag_html_property_trigger = true; $tag_html_quote_relevant = true; array_push($tag_accumulator_html_arr, frame_space_ditch( substr($tag_accumulator_html, $tag_html_property_start, $j - $tag_html_property_start))); $tag_html_property_start_trigger = false; $tag_html_property_start = 0; } } else if(!$tag_html_property_value_trigger) { if(!$tag_html_space_trigger && !$tag_html_property_value_start_trigger) { $tag_html_property_value_start_trigger = true; $tag_html_property_value_start = $j; } else if($tag_html_property_value_start_trigger && ($tag_html_space_trigger || $j + 1 >= strlen($tag_accumulator_html) - 1)) { $tag_html_property_value_trigger = true; if($j + 1 < strlen($tag_accumulator_html) - 1) array_push($tag_accumulator_html_arr, frame_space_ditch( substr($tag_accumulator_html, $tag_html_property_value_start, $j - $tag_html_property_value_start))); else array_push($tag_accumulator_html_arr, frame_space_ditch( substr($tag_accumulator_html, $tag_html_property_value_start, ($j + 1) - $tag_html_property_value_start))); $tag_html_property_value_start_trigger = false; $tag_html_property_value_start = 0; } } if($tag_html_property_trigger && $tag_html_property_value_trigger) { $tag_html_property_trigger = false; $tag_html_property_value_trigger = false; } } array_push($tag_accumulator_html_arr, ">"); if($tag_accumulator_html_arr[1] == "input") { for($j = 2; $j < sizeof($tag_accumulator_html_arr) - 1; $j = $j + 2) { if($tag_accumulator_html_arr[$j] == "type") { if(!$tag_html_input_size_trigger && frame_quote_ditch( $tag_accumulator_html_arr[$j + 1]) == "text") { for($k = 2; $k < sizeof($tag_accumulator_html_arr) - 1; $k = $k + 2) { if($_SESSION["size_columns_field"] == "maxlength" && $tag_accumulator_html_arr[$k] == "maxlength") { $tag_html_size = frame_quote_ditch( $tag_accumulator_html_arr[$k + 1]); if($_SESSION["tag_html_property_use"] == "first") { $tag_html_input_size_trigger = true; break; } } else if($_SESSION["size_columns_field"] == "size" && frame_quote_ditch( $tag_accumulator_html_arr[$k]) == "size") { $tag_html_size = frame_quote_ditch( $tag_accumulator_html_arr[$k + 1]); if($_SESSION["tag_html_property_use"] == "first") { $tag_html_input_size_trigger = true; break; } } } } else if(!$tag_html_input_value_trigger && frame_quote_ditch( $tag_accumulator_html_arr[$j + 1]) == "submit") { for($k = 2; $k < sizeof($tag_accumulator_html_arr) - 1; $k = $k + 2) { if($tag_accumulator_html_arr[$k] == "value") { $tag_html_value_index = $k + 1; $tag_html_value = frame_quote_ditch( $tag_accumulator_html_arr[$tag_html_value_index]); if($_SESSION["tag_html_property_use"] == "first") { $tag_html_input_value_trigger = true; break; } } } } if($_SESSION["tag_html_property_use"] == "first") break; } } } // ----------------- LOOP START ------------------------------------------------ // empty $tag_accessory_pre and $tag_accessory_post $type_return_ascii_break // "array" buffers as well ;) $tag_accessory_post = ""; $tag_accessory_pre = ""; $tag_accumulator_html_arr_delta = array(); array_push($tag_accumulator_html_arr_delta, $tag_accumulator_html_arr[0]); array_push($tag_accumulator_html_arr_delta, $tag_accumulator_html_arr[1]); for($j = 2; $j < sizeof($tag_accumulator_html_arr) - 1; $j = $j + 2) { if($tag_accumulator_html_arr[$j] == "accessory_post") { $tag_accessory_post .= frame_quote_ditch( $tag_accumulator_html_arr[$j + 1]); continue; } else if($tag_accumulator_html_arr[$j] == "accessory_pre") { $tag_accessory_pre .= frame_quote_ditch( $tag_accumulator_html_arr[$j + 1]); continue; } array_push($tag_accumulator_html_arr_delta, $tag_accumulator_html_arr[$j]); array_push($tag_accumulator_html_arr_delta, $tag_accumulator_html_arr[$j + 1]); } array_push($tag_accumulator_html_arr_delta, $tag_accumulator_html_arr[sizeof($tag_accumulator_html_arr) - 1]); $tag_accumulator_html_arr = $tag_accumulator_html_arr_delta; $tag_accumulator_html_arr_delta = array(); // -------------------- LOOP STOP ---------------------------------------------- if($tag_html_value_index > 0) { // ---------------------------- LINEBREAK START -------------------------------- // add strlen($tag_accessory_pre) and strlen($tag_accessory_post) to switch value if(strlen($tag_accessory_pre) + strlen($tag_html_value) + strlen($tag_accessory_post) + $columns_count > $columns_ascii_break) { if($type_return_ascii_break == "array") { array_push($message_break_arr, $message_break); $message_break = ""; } else $message_break .= "\n"; $tag_accumulator_html_value = ""; if(strlen($tag_html_value) > $columns_ascii_break) { if($tag_html_quote_type == "double") $tag_accumulator_html_value .= "\""; else if($tag_html_quote_type == "single") $tag_accumulator_html_value .= "'"; } // ==================== POOR PLANNING START ==================================== // ========== LITERALLY, THIS IS THE ONLY SECTION THAT REQUIRES WORK =========== // ======= AFTERWARDS, REMOVE COMMENTS AND CONTINUE WITH THE LOWER LOOP ======== // first, declare $tag_html_value_accessory; next: // empty, then append $tag_html_value_accessory with $tag_accessory_pre, // $tag_html_value, and $tag_accessory_post; use // strlen($tag_html_value_accessory) for a loop value; accumulate buffers for // $tag_accessory_pre, $tag_html_value, and $tag_accessory_post when // $type_return_ascii_break is "array"; store line break versions using // original variables $tag_html_value_accessory = $tag_accessory_pre . $tag_html_value . $tag_accessory_post; // while(strlen($tag_html_value) > $columns_ascii_break) while(strlen($tag_html_value_accessory) > $columns_ascii_break) { // $tag_accumulator_html_value .= substr($tag_html_value, 0, // $columns_ascii_break); $tag_accumulator_html_value .= substr($tag_html_value_accessory, 0, $columns_ascii_break); if($type_return_ascii_break == "array") { // THIS IS NOT WORKING!! NEED SEPARATE ARRAYS FOR PRE, VALUE, AND POST array_push($tag_accumulator_html_value_arr, $tag_accumulator_html_value); $tag_accumulator_html_value = ""; } else $tag_html_value_accessory .= "\n"; // $tag_accumulator_html_value .= "\n"; $tag_html_value = substr($tag_html_value, $columns_ascii_break, strlen($tag_html_value) - $columns_ascii_break); } // here, gotta find the last line break (across $tag_accessory_pre, // $tag_html_value, and $tag_accessory_post) and add the proceeding characters // to $columns_count; I suppose that if the last character is a line break (is // that even possible??), then $columns_count should be zero (lol) $columns_count = strlen($tag_html_value); // ==================== POOR PLANNING STOP ===================================== } else $columns_count = $columns_count + strlen($tag_accessory_pre) + strlen($tag_html_value) + strlen($tag_accessory_post); // add strlen($tag_accessory_pre) and strlen($tag_accessory_post) // ---------------------------- LINEBREAK STOP --------------------------------- } else if($tag_html_size > 0) { // well-- gotta line break $tag_accessory_pre and $tag_accessory_post *here* as // well, right? if($tag_html_size + $columns_count > $columns_ascii_break) { if($tag_html_size <= $columns_ascii_break) { if($type_return_ascii_break == "array") { array_push($message_break_arr, $message_break); $message_break = ""; } else $message_break .= "\n"; $columns_count = $tag_html_size; } else { if($type_return_ascii_break == "array") { array_push($message_break_arr, $message_break); $message_break = ""; } else $message_break .= "\n"; $columns_count = $columns_ascii_break; } } else $columns_count = $columns_count + $tag_html_size; } // ------------------- ACCESSORIES APPEND START -------------------------------- // it's a little early to be appending $tag_accessory_pre (also-- it should // *never* be appended directly to $tag_accumulator_html!!); if // $tag_html_value_index > 0, then it's already line breaked; otherwise, the // coming while needs to stick it before $tag_accumulator_html-- or, there // should be another while *here*; see discussion, below (next set of comments) // I suppose $tag_accessory_pre should start accumulating, here; however, it's // possible that it is buffered as an array (assuming $type_return_ascii_break // is "array") $tag_accumulator_html = $tag_accessory_pre; if($tag_html_value_index > 0) { if(strlen($tag_html_value) > 0) { if(strlen($tag_accumulator_html_value) <= 0) { if($tag_html_quote_type == "double") $tag_html_value = "\"" . $tag_html_value; else if($tag_html_quote_type == "single") $tag_html_value = "'" . $tag_html_value; } if($tag_html_quote_type == "double") $tag_html_value .= "\""; else if($tag_html_quote_type == "single") $tag_html_value .= "'"; } else { if($tag_html_quote_type == "double") $tag_accumulator_html_value .= "\""; else if($tag_html_quote_type == "single") $tag_accumulator_html_value .= "'"; } $tag_accumulator_html_arr[$tag_html_value_index] = $tag_accumulator_html_value . $tag_html_value; } if($type_return_ascii_break == "array" && $tag_html_value_index > 0) { for($j = 0; $j < sizeof($tag_accumulator_html_arr); $j++) { if($j == $tag_html_value_index) { array_push($message_break_arr, $message_break . $tag_accumulator_html); $message_break = ""; $tag_accumulator_html = ""; for($k = 0; $k < sizeof($tag_accumulator_html_value_arr); $k++) array_push($message_break_arr, $tag_accumulator_html_value_arr[$k]); } $tag_accumulator_html .= $tag_accumulator_html_arr[$j]; if($j == 1 && $j + 1 < sizeof($tag_accumulator_html_arr) - 1) $tag_accumulator_html .= " "; else if($j > 0 && $j % 2 == 0) $tag_accumulator_html .= "="; else if($j > 0 && $j + 1 < sizeof($tag_accumulator_html_arr) - 1) $tag_accumulator_html .= " "; } } else { for($j = 0; $j < sizeof($tag_accumulator_html_arr); $j++) { $tag_accumulator_html .= $tag_accumulator_html_arr[$j]; if($j == 1 && $j + 1 < sizeof($tag_accumulator_html_arr) - 1) $tag_accumulator_html .= " "; else if($j > 0 && $j % 2 == 0 && $j + 1 < sizeof($tag_accumulator_html_arr) - 1) $tag_accumulator_html .= "="; else if($j > 0 && $j + 1 < sizeof($tag_accumulator_html_arr) - 1) $tag_accumulator_html .= " "; } } // don't be tryin' to add $tag_accessory_post to $tag_accumulator_html, God // damn it! It should be added to $message_break *after* $tag_accumulator_html // is appended-- but ONLY when $tag_value_html_index > 0; otherwise, this // occurs later (the "lower" while, lol) // okay-- if $tag_accessory_pre is set, gotta store $tag_accumulator_html // instead of appending it, here; the lower while needs to append it after line // breaking $tag_accessory_pre ;) // now if $tag_accumulator_html_arr[1] is "input", well then I suppose // $tag_accessory_pre can be appended to $tag_accumulator_html above-- and then // $tag_accumulator_html can be appended, here (followed by // $tag_accessory_post); but if the tag type is "void", then this will have to // wait; ideally, $tag_accumulator_html should be appended after the lower // while ;) $tag_accumulator_html .= $tag_accessory_post; $tag_accessory_pre = ""; $tag_accessory_post = ""; $message_break .= $tag_accumulator_html; // ------------------------- ACCESSORIES APPEND STOP --------------------------- } continue; } if($substr == "\\" && !$slash_even && (substr($message, strlen($message) - 1, 1) == "a" || substr($message, strlen($message) - 1, 1) == "B" || substr($message, strlen($message) - 1, 1) == "F" || substr($message, strlen($message) - 1, 1) == "m" || substr($message, strlen($message) - 1, 1) == "n" || substr($message, strlen($message) - 1, 1) == "T" || substr($message, strlen($message) - 1, 1) == "w")) { if(substr($message, strlen($message) - 1, 1) == "a") { if($a_count == 0) { $a_count = $a_count + 1; $a_trigger_href = true; } else if($a_count == 1) { $a_count = $a_count + 1; $a_trigger_url = true; $tag_trigger = true; } else if($a_count == 2) { $a_count = $a_count + 1; $a_trigger_label = true; } else if($a_count == 3) { $a_count = 0; $a_trigger_break = true; } } else if(substr($message, strlen($message) - 1, 1) == "B") { if($b_count == 0) { $b_count = $b_count + 1; $b_trigger_button = true; } else if($b_count == 1) { $b_count = $b_count + 1; $b_trigger_name = true; $tag_trigger = true; } else if($b_count == 2) { $b_count = $b_count + 1; $b_trigger_label = true; } else if($b_count == 3) { $b_count = 0; $b_trigger_break = true; } } else if(substr($message, strlen($message) - 1, 1) == "F") { if($f_count == 0) { $f_count = $f_count + 1; $f_trigger_input = true; } else if($f_count == 1) { $f_count = $f_count + 1; $f_trigger_maxlength = true; $tag_trigger = true; $tag_trigger_field = true; } else if($f_count == 2) { $f_count = $f_count + 1; $f_trigger_name = true; } else if($f_count == 3) { $f_count = $f_count + 1; $f_trigger_size = true; } else if($f_count == 4) { $f_count = $f_count + 1; $f_trigger_value = true; } else if($f_count == 5) { $f_count = 0; $f_trigger_break = true; } } else if(substr($message, strlen($message) - 1, 1) == "m") { if($m_count == 0) { $m_count = $m_count + 1; $m_trigger_img = true; } else if($m_count == 1) { $m_count = $m_count + 1; $m_trigger_file = true; $tag_trigger = true; } else if($m_count == 2) { $m_count = $m_count + 1; $m_trigger_label = true; } else if($m_count == 3) { $m_count = $m_count + 1; $m_trigger_alt = true; } else if($m_count == 4) { $m_count = $m_count + 1; $m_trigger_title = true; } else if($m_count == 5) { $m_count = 0; $m_trigger_break = true; } } else if(substr($message, strlen($message) - 1, 1) == "n") $newline = true; else if(substr($message, strlen($message) - 1, 1) == "T") { if($t_count == 0) { $t_count = $t_count + 1; $t_trigger_href = true; } else if($t_count == 1) { $t_count = $t_count + 1; $t_trigger_url = true; $tag_trigger = true; } else if($t_count == 2) { $t_count = $t_count + 1; $t_trigger_label = true; } else if($t_count == 3) { $t_count = 0; $t_trigger_break = true; } } else if(substr($message, strlen($message) - 1, 1) == "w") $word_break = true; if(strlen($message) - 2 > 0) $message = substr($message, 0, strlen($message) - 2); else $message = ""; } if(!$a_trigger_label && !$a_trigger_url && !$b_trigger_name && !$b_trigger_label && !$f_trigger_label && !$f_trigger_maxlength && !$f_trigger_name && !$f_trigger_size && !$f_trigger_value && !$t_trigger_url && !$t_trigger_label && !$m_trigger_file && !$m_trigger_label && !$tag_trigger_field && ($columns_count + strlen($break_label_tail) + strlen($message) > $columns_ascii_break)) { $columns_count = 0; if(!$tag_trigger) { if($type_return_ascii_break == "array") { /* CAUGHT RED-HANDED */ array_push($message_break_arr, $message_break); $message_break = ""; } else $message_break .= "\n"; } else { if($label_start) { $tag = "\n" . $tag; $label_start = false; } else $tag .= "\n"; } while(strlen($break_label_tail) + strlen($message) > $columns_ascii_break) { if(!$tag_trigger) { $message_break .= substr($message, 0, $columns_ascii_break); if($type_return_ascii_break == "array") { array_push($message_break_arr, $message_break); $message_break = ""; } else $message_break .= "\n"; } else if(!$a_trigger_break && !$b_trigger_break && !$m_trigger_break && !$t_trigger_break && $break_label_tail == "") { $tag .= substr($message, 0, $columns_ascii_break); $tag .= "\n"; } else { if(!$break_spliced && $columns_ascii_break < strlen($break_label_tail)) { $tag .= substr($break_label_tail, 0, $columns_ascii_break); $tag .= "\n"; $break_label_tail = substr($break_label_tail, $columns_ascii_break, strlen($break_label_tail) - $columns_ascii_break); } else if(!$break_spliced && $columns_ascii_break >= strlen($break_label_tail)) { $break_spliced = true; $tag .= $break_label_tail; $tag .= $break_splice; if($columns_ascii_break == strlen($break_label_tail)) $tag .= "\n"; $break_label_tail = ""; $break_splice = ""; } if($break_spliced) { $tag .= substr($message, 0, $columns_ascii_break); $tag .= "\n"; $message = substr($message, $columns_ascii_break, strlen($message) - $columns_ascii_break); } continue; } $message = substr($message, $columns_ascii_break, strlen($message) - $columns_ascii_break); } } if(!$a_trigger_label && !$a_trigger_url && !$b_trigger_name && !$b_trigger_label && !$f_trigger_maxlength && !$f_trigger_name && !$f_trigger_size && !$f_trigger_value && !$m_trigger_label && !$t_trigger_url && !$t_trigger_label && !$tag_trigger_field && !$m_trigger_file && !($_SESSION["type_write_image"] == "caca" && ($m_trigger_alt || $m_trigger_title)) && !($_SESSION["type_write_image"] == "caca_link" && ($m_trigger_alt || $m_trigger_title)) && !($_SESSION["type_write_image"] == "html_img" && ($m_trigger_break_active || $m_trigger_label_active))) $columns_count = $columns_count + strlen($break_label_tail) + strlen($message); else if($m_trigger_file) { if($columns_count > 0) { $columns_count = 0; if($type_return_ascii_break == "array") { array_push($message_break_arr, $message_break); $message_break = ""; } else $message_break .= "\n"; } if($_SESSION["type_write_image"] == "caca") { $caca = shell_exec("columns_override=" . $columns_ascii_break . " format=html /mic/sh/image_write /iws" . $message); $caca_array = array(); $caca_string = ""; for($j = 0; $j < strlen($caca); $j++) { $caca_substr = substr($caca, $j, 1); if($caca_substr == "\n") { array_push($caca_array, $caca_string); $caca_string = ""; } else $caca_string .= $caca_substr; } for($j = 0; $j < sizeof($caca_array); $j++) { $caca_string = $caca_array[$j]; $caca_string_size = strlen($caca_string); if($caca_string_size > 4 && substr($caca_string, 0, 5) == "") $caca_string = substr($caca_string, 0, $caca_string_size - 6); $message_break .= $caca_string; if($type_return_ascii_break == "array") { array_push($message_break_arr, $message_break); $message_break = ""; } else $message_break .= "\n"; } } } } else if($f_trigger_break) { if($columns_count + $break_size + strlen($message) <= $columns_ascii_break) $columns_count = $columns_count + $break_size + strlen($message); else { $tag = "\n" . $tag; $columns_count = $break_size + strlen($message); } } /* MARK */ if(!$tag_trigger) $message_break .= $message; else if(!$a_trigger_label && !$b_trigger_label && !$m_trigger_label && !$t_trigger_label && !($_SESSION["type_write_image"] == "caca" && ($m_trigger_alt || $m_trigger_title)) && !($_SESSION["type_write_image"] == "caca_link" && ($m_trigger_alt || $m_trigger_title)) && !($_SESSION["type_write_image"] == "html_img" && ($m_trigger_break_active || $m_trigger_label_active))) { if($break_label_tail == "") $tag .= $message; else { $tag .= $break_label_tail . $break_splice . $message; $break_label_tail = ""; $break_splice = ""; } } if($a_trigger_href) { $tag = ""; $a_trigger_url = false; } else if($a_trigger_label) { $break_label_tail = $message; $break_splice = ""; $a_trigger_label = false; } else if($a_trigger_break) { if($type_return_ascii_break == "array") { $tag_accumulator = ""; for($j = 0; $j < strlen($tag); $j++) { $tag_substr = substr($tag, $j, 1); if($tag_substr == "\n" && $j + 1 < strlen($tag)) { $message_break .= $tag_accumulator; array_push($message_break_arr, $message_break); $message_break = ""; $tag_accumulator = ""; } else if($tag_substr != "\n") $tag_accumulator = $tag_accumulator . $tag_substr; } $tag = $tag_accumulator; $tag_accumulator = ""; } $message_break .= $tag; $break_spliced = false; $break_label_tail = ""; $break_splice = ""; $tag = ""; $a_trigger_break = false; $tag_trigger = false; } else if($b_trigger_button) { $tag = ""; if($_SESSION["void_slash"] == "true") $break_splice .= ""; $b_trigger_label = false; } else if($b_trigger_break) { if($type_return_ascii_break == "array") { $tag_accumulator = ""; for($j = 0; $j < strlen($tag); $j++) { $tag_substr = substr($tag, $j, 1); if($tag_substr == "\n" && $j + 1 < strlen($tag)) { $message_break .= $tag_accumulator; array_push($message_break_arr, $message_break); $message_break = ""; $tag_accumulator = ""; } else if($tag_substr != "\n") $tag_accumulator = $tag_accumulator . $tag_substr; } $tag = $tag_accumulator; $tag_accumulator = ""; } $message_break .= $tag; $break_spliced = false; $break_label_tail = ""; $break_splice = ""; $tag = ""; $b_trigger_break = false; $tag_trigger = false; $label_start = false; } else if($f_trigger_input) { $tag = ""; if($_SESSION["void_slash"] == "true") $tag .= ""; $f_trigger_value = false; } else if($f_trigger_break) { if($type_return_ascii_break == "array") { $tag_accumulator = ""; for($j = 0; $j < strlen($tag); $j++) { $tag_substr = substr($tag, $j, 1); if($tag_substr == "\n" && $j + 1 < strlen($tag)) { $message_break .= $tag_accumulator; array_push($message_break_arr, $message_break); $message_break = ""; $tag_accumulator = ""; } else if($tag_substr != "\n") $tag_accumulator = $tag_accumulator . $tag_substr; } $tag = $tag_accumulator; $tag_accumulator = ""; } $message_break .= $tag; $break_size = 0; $tag = ""; $f_trigger_break = false; $tag_trigger = false; $tag_trigger_field = false; } else if($m_trigger_img) { if($_SESSION["type_write_image"] == "caca" || $_SESSION["type_write_image"] == "caca_link") $tag = ""; else if($_SESSION["type_write_image"] == "html_img") $tag .= "\" alt=\""; $m_trigger_file = false; $m_trigger_label_active = true; } else if($m_trigger_label) { if($_SESSION["type_write_image"] == "caca" || $_SESSION["type_write_image"] == "caca_link") { $break_label_tail = $message; $break_splice = ""; } $m_trigger_label = false; $m_trigger_label_active = false; } else if($m_trigger_alt) { if($_SESSION["type_write_image"] == "html_img") $tag .= "\" title=\""; $m_trigger_alt = false; } else if($m_trigger_title) { if($_SESSION["type_write_image"] == "html_img") { $m_pixels = (((int)$_SESSION["size_font"] / 2) + 1) * (int)$_SESSION["columns"]; $tag .= "\" width=\"" . $m_pixels . "\">"; if($_SESSION["void_slash"] == "true") $tag .= ""; } $m_trigger_break_active = true; $m_trigger_title = false; } else if($m_trigger_break) { if($_SESSION["type_write_image"] == "caca" || $_SESSION["type_write_image"] == "caca_link") { if($type_return_ascii_break == "array") { $tag_accumulator = ""; for($j = 0; $j < strlen($tag); $j++) { $tag_substr = substr($tag, $j, 1); if($tag_substr == "\n" && $j + 1 < strlen($tag)) { $message_break .= $tag_accumulator; array_push($message_break_arr, $message_break); $message_break = ""; $tag_accumulator = ""; } else if($tag_substr != "\n") $tag_accumulator = $tag_accumulator . $tag_substr; } $tag = $tag_accumulator; $tag_accumulator = ""; } $message_break .= $tag; $break_spliced = false; $break_label_tail = ""; $break_splice = ""; $tag = ""; $tag_trigger = false; $m_trigger_break = false; } else if($_SESSION["type_write_image"] == "html_img") { $message_break .= $tag; $tag = ""; $tag_trigger = false; $m_trigger_break = false; } $m_trigger_break_active = false; } else if($t_trigger_href) { $tag = ""; $t_trigger_url = false; } else if($t_trigger_label) { $break_label_tail = $message; $break_splice = ""; $t_trigger_label = false; } else if($t_trigger_break) { if($type_return_ascii_break == "array") { $tag_accumulator = ""; for($j = 0; $j < strlen($tag); $j++) { $tag_substr = substr($tag, $j, 1); if($tag_substr == "\n" && $j + 1 < strlen($tag)) { $message_break .= $tag_accumulator; array_push($message_break_arr, $message_break); $message_break = ""; $tag_accumulator = ""; } else if($tag_substr != "\n") $tag_accumulator = $tag_accumulator . $tag_substr; } $tag = $tag_accumulator; $tag_accumulator = ""; } $message_break .= $tag; $break_spliced = false; $break_label_tail = ""; $break_splice = ""; $tag = ""; $t_trigger_break = false; $tag_trigger = false; } if($newline) { $newline = false; $columns_count = 0; if($type_return_ascii_break == "array") { array_push($message_break_arr, $message_break); $message_break = ""; } else $message_break .= "\n"; } else if($word_break) $word_break = false; } if($type_return_ascii_break == "array") return $message_break_arr; return $message_break; } function frame_quote_ditch($str) { $count_slash = 0; $i = 0; $result = strlen($str) - 1; $substr = ""; $str = frame_space_ditch($str); $substr = substr($str, 0, 1); if(strlen($str) < 2) return $str; if($substr == "\"") { $substr = substr($str, $result, 1); if($substr == "\"") { for($i = $result - 1; $i >= 0; $i--) { $substr = substr($str, $i, 1); if($substr == "\\") $count_slash = $count_slash + 1; else break; } if($count_slash == 0 || $count_slash % 2 == 0) $str = substr($str, 0, $result); } $str = substr($str, 1, strlen($str) - 1); } else if($substr == "'") { $substr = substr($str, $result, 1); if($substr == "'") { for($i = $result - 1; $i >= 0; $i--) { $substr = substr($str, $i, 1); if($substr == "\\") $count_slash = $count_slash + 1; else break; } if($count_slash == 0 || $count_slash % 2 == 0) $str = substr($str, 0, $result); } $str = substr($str, 1, strlen($str) - 1); } return $str; } function frame_space_ditch($str) { $i = 0; for($i = 0; $i < strlen($str); $i++) { if(substr($str, $i, 1) != " ") { if($i > 0) $str = substr($str, $i, strlen($str) - $i); break; } } for($i = strlen($str) - 1; $i >= 0; $i--) { if(substr($str, $i, 1) != " ") { if($i < strlen($str) - 1) $str = substr($str, 0, $i + 1); break; } } return $str; } function theme($str) { if($str == "evil_mode" || $str == "halloween_mode" || $str == "happy_mode") return true; return false; } function value_boolean($str) { if($str == "false" || $str == "true") return true; return false; } function value_integer($str) { $i = 0; $substr = ""; for($i = 0; $i < strlen($str); $i++) { $substr = substr($str, $i, 1); if($substr != "1" && $substr != "2" && $substr != "3" && $substr != "4" && $substr != "5" && $substr != "6" && $substr != "7" && $substr != "8" && $substr != "9" && $substr != "0") return false; } return true; } for($i = 0; $i < strlen($uri); $i++) { if(substr($uri, $i, 1) == "?") { $q_mark = true; $q_mark_ = $i; break; } } if($q_mark) $req = substr($uri, $q_mark_ + 1, strlen($uri) - ($q_mark_ - 1)); $tmp = ""; for($i = 0; $i < strlen($req); $i++) { $substr_ = substr($req, $i, 1); if(!$f_aquote && !$f_dquote && !$f_squote && $substr_ == "`") { $f_aquote = true; continue; } else if($f_aquote && !$f_dquote && !$f_squote && $substr_ == "`") { $f_aquote = false; continue; } else if(!$f_aquote && !$f_dquote && !$f_squote && $substr_ == "\"") { $f_dquote = true; continue; } else if(!$f_aquote && $f_dquote && !$f_squote && $substr_ == "\"") { $f_dquote = false; continue; } else if(!$f_aquote && !$f_dquote && !$f_squote && $substr_ == "'") { $f_squote = true; continue; } else if(!$f_aquote && !$f_dquote && $f_squote && $substr_ == "'") { $f_squote = false; continue; } else if(!$f_aquote && !$f_dquote && !$f_squote && $substr_ == " ") { if($tmp != "") { array_push($option, $tmp); $tmp = ""; } continue; } $tmp .= $substr_; } array_push($option, $tmp); for($i = 0; $i < sizeof($option); $i++) { if((!$set_columns && $option[$i] == "--columns") && ($i+1 < sizeof($option) && value_integer($option[$i+1]))) { $set_columns = true; $columns = $option[$i+1]; if($columns > $columns_max) $columns = $columns_max; $i = $i+1; continue; } if(!$set_default_set && $option[$i] == "--default-set") { $set_default_set = true; continue; } if((!$set_size_columns_field && $option[$i] == "--size-columns-field") && ($i+1 < sizeof($option))) { $set_size_columns_field = true; $size_columns_field = $option[$i+1]; if($size_columns_field != "maxlength" && $size_columns_field != "size") $size_columns_field = "size"; $i = $i+1; continue; } if((!$set_size_font && $option[$i] == "--size-font") && ($i+1 < sizeof($option) && value_integer($option[$i+1]))) { $set_size_font = true; $size_font = $option[$i+1]; $i = $i+1; continue; } if((!$set_theme && $option[$i] == "--tag-html-property-use") && ($i+1 < sizeof($option))) { $set_tag_html_property_use = true; $tag_html_property_use = $option[$i+1]; if($tag_html_property_use != "first" && $tag_html_property_use != "last") $tag_html_property_use = "first"; $i = $i+1; continue; } if((!$set_theme && $option[$i] == "--theme") && ($i+1 < sizeof($option) && theme($option[$i+1]))) { $set_theme = true; $theme = $option[$i+1]; $i = $i+1; continue; } if((!$set_type_write_image && $option[$i] == "--type-write-image") && ($i+1 < sizeof($option))) { $set_type_write_image = true; $type_write_image = $option[$i+1]; if($type_write_image != "caca" && $type_write_image != "caca_link" && $type_write_image != "html_img") $type_write_image = "caca"; $i = $i+1; continue; } if((!$set_void_slash && $option[$i] == "--void-slash") && ($i+1 < sizeof($option) && value_boolean($option[$i+1]))) { $set_void_slash = true; $void_slash = $option[$i+1]; $i = $i+1; continue; } } if(isset($_POST["evil_mode_click"])) { $_SESSION["evil_mode"] = true; $_SESSION["halloween_mode"] = false; $_SESSION["happy_mode"] = false; } else if(isset($_POST["halloween_mode_click"])) { $_SESSION["evil_mode"] = false; $_SESSION["halloween_mode"] = true; $_SESSION["happy_mode"] = false; } else if(isset($_POST["happy_mode_click"])) { $_SESSION["evil_mode"] = false; $_SESSION["halloween_mode"] = false; $_SESSION["happy_mode"] = true; } else if($set_theme && $theme == "evil_mode") { $_SESSION["evil_mode"] = true; $_SESSION["halloween_mode"] = false; $_SESSION["happy_mode"] = false; } else if($set_theme && $theme == "halloween_mode") { $_SESSION["evil_mode"] = false; $_SESSION["halloween_mode"] = true; $_SESSION["happy_mode"] = false; } else if($set_theme && $theme == "happy_mode") { $_SESSION["evil_mode"] = false; $_SESSION["halloween_mode"] = false; $_SESSION["happy_mode"] = true; } else if(!isset($_SESSION["evil_mode"])) { if($mm_str == "10" && intval($dd_str) > 0 && intval($dd_str) < 32) { $_SESSION["evil_mode"] = false; $_SESSION["halloween_mode"] = true; $_SESSION["happy_mode"] = false; } else { $_SESSION["evil_mode"] = true; $_SESSION["halloween_mode"] = false; $_SESSION["happy_mode"] = false; } } if($set_columns) $_SESSION["columns"] = $columns; else if(!isset($_SESSION["columns"])) $_SESSION["columns"] = 80; if($set_size_font) $_SESSION["size_font"] = $size_font; else if(!isset($_SESSION["size_font"])) $_SESSION["size_font"] = 13; if($set_void_slash) $_SESSION["void_slash"] = $void_slash; else if(!isset($_SESSION["void_slash"])) $_SESSION["void_slash"] = "false"; if($set_size_columns_field) $_SESSION["size_columns_field"] = $size_columns_field; else if(!isset($_SESSION["size_columns_field"])) $_SESSION["size_columns_field"] = "size"; if($set_tag_html_property_use) $_SESSION["tag_html_property_use"] = $tag_html_property_use; else if(!isset($_SESSION["tag_html_property_use"])) $_SESSION["tag_html_property_use"] = "first"; if($set_type_write_image) $_SESSION["type_write_image"] = $type_write_image; else if(!isset($_SESSION["type_write_image"])) $_SESSION["type_write_image"] = "caca"; if($set_type_write_image_override) $_SESSION["type_write_image"] = $type_write_image_override; if($set_default_set) { $set_columns = false; $columns = 80; $_SESSION["columns"] = $columns; $set_size_columns_field = false; $size_columns_field = "size"; $_SESSION["size_columns_field"] = $size_columns_field; $set_size_font = false; $size_font = "13"; $_SESSION["size_font"] = $size_font; $set_tag_html_property_use = false; $tag_html_property_use = "first"; $_SESSION["tag_html_property_use"] = $tag_html_property_use; $set_theme = false; $theme = "evil_mode"; $_SESSION["theme"] = $theme; $set_type_write_image = false; $type_write_image = "caca"; $_SESSION["type_write_image"] = $type_write_image; $set_void_slash = false; $void_slash = false; $_SESSION["void_slash"] = $void_slash; $set_default_set = false; if($set_type_write_image_override) { $type_write_image = $type_write_image_override; $_SESSION["type_write_image"] = $type_write_image_override; } }