403Webshell
Server IP : 157.230.181.24  /  Your IP : 216.73.217.11
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64
User :  ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /opt/smarterchild/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/smarterchild/__pycache__/interactive.cpython-312.pyc
�

?`j�'��4�dZddlmZddlZddlZddlmZdZgd�ZeZ	gd�Z
gd�Zgd	�Zejd
ej�Zejdej�Zejdej�Zejd
ej�Zejdej�Zejdej�Zejdej�Zejdej�Zejdej�Zejdej�Zejdej�Zejdej�Zdd�Zdd�ZGd�d�Zy)uIMenus, surveys, quizzes — classic SmarterChild-style interactive flows.�)�annotationsN)�	UserStoreu�Welcome home. Here is what we can do:
· survey - get-to-know-you questions (I remember answers)
· quiz or trivia - trivia with score
· profile - what I remember about you
· profile setup - questions one at a time
· note [text] - save a note | notes - list notes
· joke | define [word] | horoscope [sign]
· weather [city] - I will ask for your zip if needed
Or ask me anything. I may turn the question back on you.))�namez3Very well. First question: what is your first name?)�agez"Nice to meet you. How old are you?)�cityzWhat city do you live in?)�bandzFavorite band or musician?)�moviezFavorite movie?)�colorzFavorite color?)�foodzFavorite food?)
)z'What planet is known as the Red Planet?�mars)zHow many continents are there?�7)zWhat is H2O commonly called?�water)zWho wrote Romeo and Juliet?�shakespeare)zWhat is the capital of France?�paris)z#How many sides does a hexagon have?�6)z'What gas do plants absorb from the air?�co2)z"In what year did the Titanic sink?�1912)zWhat is the largest ocean?�pacific)z6What element does 'O' stand for on the periodic table?�oxygen)zHWhy did the computer go to therapy? Too many bytes of emotional baggage.z/What do you call a computer that sings? A Dell.zQWhy was the JavaScript developer sad? They didn't Node how to Express themselves.z<I tried to write a joke about UDP, but you might not get it.zNThere are 10 kinds of people: those who understand binary and those who don't.)uAToday favors bold moves — but maybe finish your homework first.zBSomeone might IM you with good news. Or spam. Could go either way.z+Creative energy is high. Also snack energy.z*A surprise awaits. Possibly lunch-related.z(Good day for music. Bad day for dial-up.u8Trust your instincts — unless they say 'reply to all'.z$^(home|menu|help|commands|\?|start)$z^(quiz|trivia|trivia time)$z#^(survey|interview|get to know me)$z	^profile$z^profile setup$z^notes?$z
^note\s+(.+)$z^define\s+(.+)$z^horoscope\s+(\w+)$z^weather\s+(.+)$z^remember\s+(.+)$z.^(quit|exit|stop|cancel|nevermind|never mind)$c�h�tjdd|j�j��S)Nz\s+� )�re�sub�strip�lower)�texts � /opt/smarterchild/interactive.py�_norm_answerrQs$��
�6�6�&�#�t�z�z�|�1�1�3�4�4�c��t|�}t|�}||vs||vry|j�r|j�r||k(Sy)NTF)r�isdigit)�user�answer�u�as    r�_quiz_okr&UsC���T��A��V��A��A�v��a����y�y�{�q�y�y�{��A�v�
�rc�<�eZdZdd�Zd	d�Zd
d�Zdd�Zdd�Zdd�Zy)
�InteractiveHandlerc��||_y)N)�store)�selfr*s  r�__init__zInteractiveHandler.__init__`s	����
rc	�V�|jj||d|ddd��|ddS)Nr)�kind�step�steps�
quiz_index�
quiz_score�)r*�set_flow)r+�buddyr.r0s    r�_start_flowzInteractiveHandler._start_flowcs6���
�
�����1�u�A�UV�W�	
��Q�x��{�rc
�	�|j�}|j�}|jj|�}|r2tj|�r|jj
|d�y|r|j|||�}|�|Stj|�rtStj|�r�tjt�\}}|jj
|dd||ftvrtj||f�nd|jj|�j!di�j!dd�||d��d|jj|�j!di�j!dd��d|��St"j|�r|j%|dt&�St(j|�r|j%|d	t*�St,j|�r|jj/|�St0j|�rs|jj|�j!d
�xsg}	|	sydg}
|	d
dD]&}|
j3d|j!dd�����(dj5|
�St6j|�}|r,|jj9||j;d��yt<j|�}|r>|j;d�j�}
|jj?||
d��y|dvrtjt@�dzStBj|�}|r%|j;d�j�}d|�d�StDj|�}|r>|j;d�}|jG��dtjtH��d�StJj|�}|r�|j;d�j�}|jj|�j!d�xsi}|j!d�rd|j!d �xs|�d!�S|jjM|d |�|jj
|d"d#i�d$|�d%�S|jOd&�r|sy'y)(NuHOK, stopped that. Type menu if you want ideas — or just keep chatting.�quizr�score)r.r/r1r2�	current_q�	current_azTrivia time! Score so far: z. �survey�
profile_setup�notesz2No notes saved. Type note [something] to save one.zYour notes:i����u· r�rr3u7Got it — saved that note. Type notes to see them all.�remember_cmd)�sourcez%OK I'll remember that. Anything else?>�tell me a joke�jokez Want another? Type joke again.u+I can't pull live dictionary data — but 'z?' is a word you should look up! What made you curious about it?z: u7 (For entertainment only — I'm a bot, not a psychic!)�profile�zipzLI can't check live weather from here (AIM 2006 vibes). You said you're near ru) — what's it look like out your window?r.�	await_zipuGot it — z7. What's your zip code? I'll remember it for next time.�weatheru*Try weather [city] — e.g. weather Denver)(rrr*�get_flow�	QUIT_FLOW�matchr4�_continue_flow�
MENU_TRIGGERS�	MENU_TEXT�
QUIZ_TRIGGERS�random�choice�TRIVIA�index�load�get�SURVEY_TRIGGERSr6�SURVEY_STEPS�PROFILE_SETUP_TRIGGERS�PROFILE_SETUP_STEPS�PROFILE_TRIGGERS�format_profile_display�NOTES_TRIGGERS�append�join�NOTE_CMD�add_note�group�REMEMBER_CMD�add_fact�JOKES�
DEFINE_CMD�HORO_CMD�
capitalize�
HOROSCOPES�WEATHER_CMD�set_profile_field�
startswith)r+r5�messagerr�flow�reply�q�_r>�lines�n�m�fact�word�signr�profs                  r�handlezInteractiveHandler.handlejs/���}�}����
�
����z�z�"�"�5�)���I�O�O�E�*��J�J����t�,�]���'�'��t�T�:�E�� ������u�%������u�%��=�=��(�D�A�q��J�J����"��;<�a�&�F�:J�&�,�,��1�v�"6�PQ�"&�*�*�/�/�%�"8�"<�"<�V�R�"H�"L�"L�W�VW�"X�!"�!"�
�

�1�������1G�1K�1K�F�TV�1W�1[�1[�\c�ef�1g�0h�hj�kl�jm�n�n�� � ��'��#�#�E�8�\�B�B�!�'�'��.��#�#�E�?�<O�P�P��!�!�%�(��:�:�4�4�U�;�;�����&��J�J�O�O�E�*�.�.�w�7�=�2�E��K�"�O�E��3�4�[�
8�����s�1�5�5���#4�"5�6�7�
8��8�8�E�?�"��N�N�4� ����J�J����q�w�w�q�z�2�L����t�$����7�7�1�:�#�#�%�D��J�J����t�N��C�:��.�.��=�=��'�*K�K�K����T�"����7�7�1�:�#�#�%�D�=�d�V�D2�3�
�
�N�N�4� ����7�7�1�:�D��o�o�'�(��6�=�=��+D�*E�E|�}�}����d�#����7�7�1�:�#�#�%�D��:�:�?�?�5�)�-�-�i�8�>�B�D��x�x���,�,0�H�H�V�,<�,D��+E�En�p��
�J�J�(�(����=��J�J������'<�=� ���&]�^�^����I�&�q�?�rc�Z�|jd�}|dk(r|j|||�S|dvr|j|||�S|dk(rf|j�}t	j
d|�r?|jj|d|�|jj|d�d|�d�Sy	y)
Nr.r8>r<r=rFz^\d{5}(-\d{4})?$rEuThanks — saved zip zA. I still can't pull live radar, but I'll remember where you are!u>That doesn't look like a zip — try 5 digits, or type cancel.)	rT�
_quiz_step�_survey_steprrrJr*rir4)r+r5rrlr.�zip_codes      rrKz!InteractiveHandler._continue_flow�s����x�x�����6�>��?�?�5�$��5�5��.�.��$�$�U�D�$�7�7��;���z�z�|�H��x�x�+�X�6��
�
�,�,�U�E�8�D��
�
�#�#�E�4�0�.�x�j�8y�z�z�S�rc���|jd�xst}t|jdd��}|t|�k\r|jj|d�y||\}}|j
�}t|�dkry|jj|||�|dz}	|	t|�k\rk|jj|d�|jj|�jdi�jd�xsd	}
d
|
xrd|
zxsd�d
�S|	|d<|jj||�||	\}}|dk(r|jdd|���}|S)Nr0r/rz1Survey done! Type profile to see what I remember.r3u#Say something — even 'idk' works.rDr�friendzAll donerr?uP! I saved your answers — type profile anytime. What should we talk about next?zNice to meet youzNice to meet you, )
rTrV�int�lenr*r4rrirS�replace)r+r5rrlr0r/�fieldror#�	next_stepr�questions            rrzzInteractiveHandler._survey_step�s\��'+�x�x��'8�'H�L���4�8�8�F�A�&�'���3�u�:���J�J����t�,�F���;���q�������v�;��?�8��
�
�$�$�U�E�6�:��1�H�	���E�
�"��J�J����t�,��:�:�?�?�5�)�-�-�i��<�@�@��H�T�H�D��4�.�C�$�J�4�"�5�62�3�
�
!��V���
�
���E�4�(��I�&���8��F�?��'�'�(:�>P�QW�PX�<Y�Z�H��rc�^�|jdd�}t|jdd��}t||�r|dz
}tjgd��}nd|�d�}|j
j
|�}t|jd	�xsi�}||d
<t|jdd��dz|d<||d	<|j
j||�tjt�\}	}
||d<|	|d<|
|d<|j
j||�|�d
|�d|	�d�S)Nr;r?r2rr3)zCorrect!zNiiice!zYou got it!zYep!uNot quite — it was �.r8r9�askedr:z Score: z. Next: z (type cancel to stop))rTr~r&rOrPr*rS�dict�saverQr4)r+r5rrl�expectedr9�msg�datar8rnr%s           rryzInteractiveHandler._quiz_step�s!���8�8�K��,���D�H�H�\�1�-�.���D�(�#��Q�J�E��-�-� N�O�C�)�(��1�5�C��z�z���u�%���D�H�H�V�$�*��+����W�
��D�H�H�W�a�0�1�A�5��W�
���V���
�
����t�$��}�}�V�$���1�"��\����[����[���
�
���E�4�(���h�u�g�X�a�S�0F�G�GrN)r*r�return�None)r5�strr.r�r0zlist[tuple[str, str]]r�r�)r5r�rkr�r��
str | None)r5r�rr�rlr�r�r�)r5r�rr�rlr�r�r�)	�__name__�
__module__�__qualname__r,r6rwrKrzry�rrr(r(_s#����Q�f
��<Hrr()rr�r�r�)r"r�r#r�r��bool)�__doc__�
__future__rrOr�
user_storerrMrVrXrQrcrg�compile�IrLrNrUrYrWr[r^rdrerhrarIrr&r(r�rr�<module>r�su��O�"�
�	� �?�
���#��
��	���
���
�
�+��D�D��
���
�
�9�2�4�4�@�
��"�*�*�C�R�T�T�J���2�:�:�l�B�D�D�1��#����$6����=������K����.���2�:�:�&����-��
�R�Z�Z�*�B�D�D�
1�
��2�:�:�,�b�d�d�3���b�j�j�,�b�d�d�3���r�z�z�.����5���B�J�J�H�"�$�$�O�	�5��`H�`Hr

Youez - 2016 - github.com/yon3zu
LinuXploit