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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/rentals.picotech.app/public_html/node_modules/cron-parser/lib/   drwxr-xr-x
Free 23.74 GB of 117.98 GB (20.12%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     field_compactor.js (2.1 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
'use strict';

function buildRange(item) {
  return {
    start: item,
    count: 1
  };
}

function completeRangeWithItem(range, item) {
  range.end = item;
  range.step = item - range.start;
  range.count = 2;
}

function finalizeCurrentRange(results, currentRange, currentItemRange) {
  if (currentRange) {
    // Two elements do not form a range so split them into 2 single elements
    if (currentRange.count === 2) {
      results.push(buildRange(currentRange.start));
      results.push(buildRange(currentRange.end));
    } else {
      results.push(currentRange);
    }
  }
  if (currentItemRange) {
    results.push(currentItemRange);
  }
}

function compactField(arr) {
  var results = [];
  var currentRange = undefined;

  for (var i = 0; i < arr.length; i++) {
    var currentItem = arr[i];
    if (typeof currentItem !== 'number') {
      // String elements can't form a range
      finalizeCurrentRange(results, currentRange, buildRange(currentItem));
      currentRange = undefined;
    } else if (!currentRange) {
      // Start a new range
      currentRange = buildRange(currentItem);
    } else if (currentRange.count === 1) {
      // Guess that the current item starts a range
      completeRangeWithItem(currentRange, currentItem);
    } else {
      if (currentRange.step === currentItem - currentRange.end) {
        // We found another item that matches the current range
        currentRange.count++;
        currentRange.end = currentItem;
      } else if (currentRange.count === 2) { // The current range can't be continued
        // Break the first item of the current range into a single element, and try to start a new range with the second item
        results.push(buildRange(currentRange.start));
        currentRange = buildRange(currentRange.end);
        completeRangeWithItem(currentRange, currentItem);
      } else {
        // Persist the current range and start a new one with current item
        finalizeCurrentRange(results, currentRange);
        currentRange = buildRange(currentItem);
      }
    }
  }

  finalizeCurrentRange(results, currentRange);

  return results;
}

module.exports = compactField;

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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