403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/test_json/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/test_json/__pycache__/test_fail.cpython-36.pyc
3

�w2_�"�"@s�ddlmZmZdddddddd	d
ddd
ddddddddddddddddddd d!d"d#g"Zd$d%d&�ZGd'd(�d(�ZGd)d*�d*ee�ZGd+d,�d,ee�Zd-S).�)�PyTest�CTestz<"A JSON payload should be an object or array, not a string."z["Unclosed array"z%{unquoted_key: "keys must be quoted"}z["extra comma",]z["double extra comma",,]z[   , "<-- missing value"]z["Comma after the close"],z["Extra close"]]z{"Extra comma": true,}z:{"Extra value after close": true} "misplaced quoted value"z{"Illegal expression": 1 + 2}z{"Illegal invocation": alert()}z+{"Numbers cannot have leading zeroes": 013}z{"Numbers cannot be hex": 0x14}z"["Illegal backslash escape: \x15"]z[\naked]z"["Illegal backslash escape: \017"]z2[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]z{"Missing colon" null}z{"Double colon":: null}z {"Comma instead of colon", null}z!["Colon instead of comma": false]z["Bad value", truth]z['single quote']z["	tab	character	in	string	"]z&["tab\   character\   in\  string\  "]z["line
break"]z["line\
break"]z[0e]z[0e+]z[0e+-1]z({"Comma instead if closing brace": true,z["mismatch"}z$["AZ control characters in string"]zwhy not have a string payload?z,spec doesn't specify any nesting limitations)��c@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�TestFailc
Csnxhtt�D]\\}}|d}|tkr.|j|�q
y|j|�Wn|jk
rRYq
X|jdj||��q
WdS)Nrz(Expected failure for fail{0}.json: {1!r})�	enumerate�JSONDOCS�SKIPS�loads�JSONDecodeErrorZfail�format)�self�idx�doc�r�=/opt/alt/python36/lib64/python3.6/test/test_json/test_fail.py�
test_failuresQs
zTestFail.test_failurescCs4ddddi}|jt|j|�|jt|j|dd�dS)N�ar�T)�indent)rr)�assertRaises�	TypeError�dumps)r
�datarrr�test_non_string_keys_dict^sz"TestFail.test_non_string_keys_dictcCs�d d!d"d#d$d%d&d'd(d)d*d+d,d-d.g}|d/d0g7}x�|D]�\}}}|j|j��}|j|�WdQRX|j}|j|j|�|j|j|�|j|jd�|j|j|d�|jt	|�d||d|f�q4WdS)1N��Expecting valuer�[r�[42�Expecting ',' delimiter��[42,��["�Unterminated string starting at�["spam�["spam"��["spam",��{�1Expecting property name enclosed in double quotes�{"�{"spam�{"spam"�Expecting ':' delimiter�{"spam":�
{"spam":42�
�{"spam":42,��"�"spamz%s: line 1 column %d (char %d))rrr)rrr)rrr )r!rr")r#r$r)r%r$r)r&rr')r(rr))r*r+r)r,r$r)r-r$r)r.r/r')r0rr))r1rr2)r3r+r4)r5r$r)r6r$r)
rrr
�	exception�assertEqual�msg�pos�lineno�colno�str)r
�
test_casesrr9r�cm�errrrr�test_truncated_inputgs:
zTestFail.test_truncated_inputcCs�d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8g}x�|D]�\}}}|j|j��}|j|�WdQRX|j}|j|j|�|j|j|�|j|jd�|j|j|d�|jt	|�d#||d|f�q4WdS)9N�[,�Expecting valuer�
{"spam":[}�	�[42:�Expecting ',' delimiterr �
[42 "spam"r"�[42,]�{"spam":[42}r4�["]�Unterminated string starting at�["spam":r'�	["spam",]r)�{:�1Expecting property name enclosed in double quotes�{,�{42�[{]r�{"spam",�Expecting ':' delimiter�{"spam"}�	[{"spam"]�	{"spam":}�
[{"spam":]�{"spam":42 "ham"�[{"spam":42]�{"spam":42,}z%s: line 1 column %d (char %d))rBrCr)rDrCrE)rFrGr )rHrGr")rIrCr")rJrGr4)rKrLr)rMrGr')rNrCr))rOrPr)rQrPr)rRrPr)rSrPr)rTrUr')rVrUr')rWrUr))rXrCr))rYrCrE)rZrGr4)r[rGr4)r\rPr4)
rrr
r7r8r9r:r;r<r=)r
r>rr9rr?r@rrr�test_unexpected_data�s@
zTestFail.test_unexpected_datacCs�dd
ddg}|ddg7}x�|D]�\}}}|j|j��}|j|�WdQRX|j}|j|j|�|j|j|�|j|jd
�|j|j|d
�|jt	|�d||d
|f�qWdS)N�[]]�
Extra datar�{}}�[],[]�{},{}�	42,"spam"�	"spam",42�rz%s: line 1 column %d (char %d))r^r_r)r`r_r)rar_r)rbr_r)rcr_r)rdr_re)
rrr
r7r8r9r:r;r<r=)r
r>rr9rr?r@rrr�test_extra_data�s$
zTestFail.test_extra_datacCs�d
dddg}x�|D]�\}}}}|j|j��}|j|�WdQRX|j}|j|jd�|j|j|�|j|j|�|j|j|�|jt	|�d|||f�qWdS)N�!rr� !r�
!�
  

     !r"rer2zExpecting valuez,Expecting value: line %s column %d (char %d))rgrrr)rhrrr)rirrr)rjr"rer2)
rrr
r7r8r9r:r;r<r=)r
r>r�line�colrr?r@rrr�test_linecol�s
zTestFail.test_linecolN)	�__name__�
__module__�__qualname__rrrAr]rfrmrrrrrPs
	"$rc@seZdZdS)�
TestPyFailN)rnrorprrrrrq�srqc@seZdZdS)�	TestCFailN)rnrorprrrrrr�srrN)Ztest.test_jsonrrrr	rrqrrrrrr�<module>sP

Youez - 2016 - github.com/yon3zu
LinuXploit