ShellBanner
System:Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686
Software:Apache. PHP/5.3.6-13ubuntu3.10
ID:uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
Safe Mode:OFF
Open_Basedir:OFF
Freespace:23.97 GB of 70.42 GB (34.05%)
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,

/ http/ root/ hls/ src/ utils/ - drwxr-xr-x

Directory:
Viewing file:     fetch-loader.js (2.22 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/**
 * Fetch based loader
 * timeout / abort / onprogress not supported for now
 * timeout / abort : some ideas here : https://github.com/whatwg/fetch/issues/20#issuecomment-196113354
 * but still it is not bullet proof as it fails to avoid data waste....
*/

class FetchLoader {
  constructor (config) {
    this.fetchSetup = config.fetchSetup;
  }

  destroy () {}

  abort () {}

  load (context, config, callbacks) {
    let stats = {
      trequest: window.performance.now(),
      retry: 0
    };

    let targetURL = context.url;
    let request;

    const initParams = {
      method: 'GET',
      mode: 'cors',
      credentials: 'same-origin'
    };

    const headersObj = {};

    if (context.rangeEnd) {
      headersObj['Range'] = 'bytes=' + context.rangeStart + '-' + String(context.rangeEnd - 1);
    } /* jshint ignore:line */

    initParams.headers = new window.Headers(headersObj);

    if (this.fetchSetup) {
      request = this.fetchSetup(context, initParams);
    } else {
      request = new window.Request(context.url, initParams);
    }

    let fetchPromise = window.fetch(request, initParams);

    // process fetchPromise
    let responsePromise = fetchPromise.then(function (response) {
      if (response.ok) {
        stats.tfirst = Math.max(stats.trequest, window.performance.now());
        targetURL = response.url;
        if (context.responseType === 'arraybuffer') {
          return response.arrayBuffer();
        } else {
          return response.text();
        }
      } else {
        callbacks.onError({ text: 'fetch, bad network response' }, context);
      }
    }).catch(function (error) {
      callbacks.onError({ text: error.message }, context);
    });
    // process response Promise
    responsePromise.then(function (responseData) {
      if (responseData) {
        stats.tload = Math.max(stats.tfirst, window.performance.now());
        let len;
        if (typeof responseData === 'string') {
          len = responseData.length;
        } else {
          len = responseData.byteLength;
        }

        stats.loaded = stats.total = len;
        let response = { url: targetURL, data: responseData };
        callbacks.onSuccess(response, stats, context);
      }
    });
  }
}

export default FetchLoader;
Command:
Quick Commands:
Upload:
[Read-Only] Max size: 100MB
PHP Filesystem: <@ Ú
Search File:
regexp
Create File:
Overwrite [Read-Only]
View File:
Mass Defacement:
[+] Main Directory: [+] Defacement Url:
LmfaoX Shell - Private Build [BETA] - v0.1 -; Generated: 0.1752 seconds