403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/adeetie_hellogtx/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/adeetie_hellogtx/assets/js/ajax_actions.js
/**
 * CodeIgniter Secured AJAX ACTIONS V1.2
 * --------------------------------------
 * Copyright (c) [2016] [ Rajakanna Kalathoti <rajakanna.k5@gmail.com> ]

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
 * 
 */

function return_ajax_response(url,data,serverProcessing)
{   
    serverProcessing = (serverProcessing === undefined) ? true : false;

    var out_response=0;
    
    /*--------------------------------------------- RECHEK AND REFINE IT ------------------------------------------*/
    var datax = '';

    if(ci_csrf_enabled)    
            datax=ci_token_name+'='+ci_token_val;
    if(! data) data = '';
    datax = (data === undefined) ? datax : datax+data;
    /*--------------------------------------------------------------------------------------------------------------*/
   // console.log(datax);
   if(debug_enable) 
        console.log('ajax_action URL: '+url);
    
    $.ajax({
             type: 'POST',
             async: false,
             cache: false,    
             url: url,
             data: datax,
             processData: serverProcessing,
             success: function(response,txtStatus,xhr) 
                    {
                        
                        // -------------------------------
                        // START PARSING RESPONSE HEADER
                        //--------------------------------

                        var rheader = xhr.getAllResponseHeaders().toLowerCase().split('\n'); // Separate header elements by \n
                        
                        $.each(rheader,function(index,value){                                // For each key
                            var line =value.split(':');
                            if(line[0].toLowerCase()=='refresh'){                            // Find if key Refresh is specified
                                var refresh_target = value.split(/=(.+)?/)[1];               // Get refresh URL
                                window.location.replace(refresh_target);                     // Relocate to URL
                            }
                        });
                        
                        // -----------------------------
                        // END PARSING RESPONSE HEADER
                        // -----------------------------
                        if(debug_enable) console.log(response);
                        dta = $.parseJSON(response);    // Parse JSON Formatted response

                        if(ci_csrf_enabled)             // If CI CSRF Protection is enabled update Global token value
                        {
                            ci_token_val=dta.token;
                            $('input[name="'+ci_token_name+'"]').val(ci_token_val);
                        }
                        
                        if(dta.hasOwnProperty('redirect'))  window.location.replace(dta.redirect);

                        out_response = dta;
                        
                        if(typeof(ciformJqsubmit)=='function')
                         ciformJqsubmit();
                        if(typeof(prepare_ajax_actions)=='function')
                        prepare_ajax_actions(); 

                    },

             error: function(e)
                  {
                    
                       if(! debug_enable) window.location.replace(error_redirect+e.status);
                   
                  }                  
          });
    return out_response;
}

Youez - 2016 - github.com/yon3zu
LinuXploit