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

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

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


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

const figgyPudding = require('figgy-pudding')
const npa = require('npm-package-arg')
const npmFetch = require('npm-registry-fetch')
const semver = require('semver')
const url = require('url')

const UnpublishConfig = figgyPudding({
  force: { default: false },
  Promise: { default: () => Promise }
})

module.exports = unpublish
function unpublish (spec, opts) {
  opts = UnpublishConfig(opts)
  return new opts.Promise(resolve => resolve()).then(() => {
    spec = npa(spec)
    // NOTE: spec is used to pick the appropriate registry/auth combo.
    opts = opts.concat({ spec })
    const pkgUri = spec.escapedName
    return npmFetch.json(pkgUri, opts.concat({
      query: { write: true }
    })).then(pkg => {
      if (!spec.rawSpec || spec.rawSpec === '*') {
        return npmFetch(`${pkgUri}/-rev/${pkg._rev}`, opts.concat({
          method: 'DELETE',
          ignoreBody: true
        }))
      } else {
        const version = spec.rawSpec
        const allVersions = pkg.versions || {}
        const versionPublic = allVersions[version]
        let dist
        if (versionPublic) {
          dist = allVersions[version].dist
        }
        delete allVersions[version]
        // if it was the only version, then delete the whole package.
        if (!Object.keys(allVersions).length) {
          return npmFetch(`${pkgUri}/-rev/${pkg._rev}`, opts.concat({
            method: 'DELETE',
            ignoreBody: true
          }))
        } else if (versionPublic) {
          const latestVer = pkg['dist-tags'].latest
          Object.keys(pkg['dist-tags']).forEach(tag => {
            if (pkg['dist-tags'][tag] === version) {
              delete pkg['dist-tags'][tag]
            }
          })

          if (latestVer === version) {
            pkg['dist-tags'].latest = Object.keys(
              allVersions
            ).sort(semver.compareLoose).pop()
          }

          delete pkg._revisions
          delete pkg._attachments
          // Update packument with removed versions
          return npmFetch(`${pkgUri}/-rev/${pkg._rev}`, opts.concat({
            method: 'PUT',
            body: pkg,
            ignoreBody: true
          })).then(() => {
            // Remove the tarball itself
            return npmFetch.json(pkgUri, opts.concat({
              query: { write: true }
            })).then(({ _rev, _id }) => {
              const tarballUrl = url.parse(dist.tarball).pathname.substr(1)
              return npmFetch(`${tarballUrl}/-rev/${_rev}`, opts.concat({
                method: 'DELETE',
                ignoreBody: true
              }))
            })
          })
        }
      }
    }, err => {
      if (err.code !== 'E404') {
        throw err
      }
    })
  }).then(() => true)
}

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