!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 

uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) 

Safe-mode: OFF (not secure)

/usr/lib/node_modules/npm/lib/   drwxr-xr-x
Free 6182.22 GB of 6263.42 GB (98.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

const BB = require('bluebird')

const npmConfig = require('./config/figgy-config.js')
const fetch = require('libnpm/fetch')
const figgyPudding = require('figgy-pudding')
const npm = require('./npm.js')
const output = require('./utils/output.js')

const WhoamiConfig = figgyPudding({
  json: {},
  registry: {}
})

module.exports = whoami

whoami.usage = 'npm whoami [--registry <registry>]\n(just prints username according to given registry)'

function whoami ([spec], silent, cb) {
  // FIXME: need tighter checking on this, but is a breaking change
  if (typeof cb !== 'function') {
    cb = silent
    silent = false
  }
  const opts = WhoamiConfig(npmConfig())
  return BB.try(() => {
    // First, check if we have a user/pass-based auth
    const registry = opts.registry
    if (!registry) throw new Error('no default registry set')
    return npm.config.getCredentialsByURI(registry)
  }).then(({username, token}) => {
    if (username) {
      return username
    } else if (token) {
      return fetch.json('/-/whoami', opts.concat({
        spec
      })).then(({username}) => {
        if (username) {
          return username
        } else {
          throw Object.assign(new Error(
            'Your auth token is no longer valid. Please log in again.'
          ), {code: 'ENEEDAUTH'})
        }
      })
    } else {
      // At this point, if they have a credentials object, it doesn't have a
      // token or auth in it.  Probably just the default registry.
      throw Object.assign(new Error(
        'This command requires you to be logged in.'
      ), {code: 'ENEEDAUTH'})
    }
  }).then(username => {
    if (silent) {
    } else if (opts.json) {
      output(JSON.stringify(username))
    } else {
      output(username)
    }
    return username
  }).nodeify(cb)
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.022 ]--