shell bypass 403
曾与蒿藜同雨露,한때 잡초와 쑥과 함께 비와 이슬을 나누던 곳이 이제는 소나무와 삼나무와 함께 서리와 눈을 견뎌내고 있다.终随松柏到冰霜.かつては雑草やヨモギと共に雨や露を分かち合っていたが、今では松やヒノキと共に霜や雪に耐えている。曾与蒿藜同雨露,Once sharing rain and dew with weeds and wormwood, now enduring frost and snow with pines and cypresses.终随松柏到冰霜.曾与蒿藜同雨露한때 잡초와 쑥과 함께 비와 이슬을 나누던 곳이 이제는 소나무와 삼나무와 함께 서리와 눈을 견뎌내고 있다.,终随松柏到冰霜.譖セ荳手珍阯懷酔髮ィ髴イ�檎サ磯囂譚セ譟丞芦蜀ー髴�曾与蒿藜同雨露,鏇句笌钂胯棞鍚岄洦闇诧紝缁堥殢鏉炬煆鍒板啺闇�终随松柏到冰霜.曾与蒿藜同雨露,한때 잡초와 쑥과 함께 비와 이슬을 나누던 곳이 이제는 소나무와 삼나무와 함께 서리와 눈을 견뎌내고 있다.终随松柏到冰霜.曾与蒿藜同雨露,终随松柏到冰霜.
const profile = require('npm-profile')
const log = require('../utils/log-shim')
const openUrlPrompt = require('../utils/open-url-prompt.js')
const read = require('../utils/read-user-info.js')
const loginPrompter = async (creds) => {
creds.username = await read.username('Username:', creds.username)
creds.password = await read.password('Password:', creds.password)
creds.email = await read.email('Email: (this IS public) ', creds.email)
return creds
}
const login = async (npm, opts) => {
let res
const requestOTP = async () => {
const otp = await read.otp(
'Enter one-time password: '
)
return profile.loginCouch(
opts.creds.username,
opts.creds.password,
{ ...opts, otp }
)
}
const addNewUser = async () => {
let newUser
try {
newUser = await profile.adduserCouch(
opts.creds.username,
opts.creds.email,
opts.creds.password,
opts
)
} catch (err) {
if (err.code === 'EOTP') {
newUser = await requestOTP()
} else {
throw err
}
}
return newUser
}
const openerPromise = (url, emitter) =>
openUrlPrompt(
npm,
url,
'Authenticate your account at',
'Press ENTER to open in the browser...',
emitter
)
try {
res = await profile.login(openerPromise, loginPrompter, opts)
} catch (err) {
const needsMoreInfo = !(opts &&
opts.creds &&
opts.creds.username &&
opts.creds.password &&
opts.creds.email)
if (err.code === 'EOTP') {
res = await requestOTP()
} else if (needsMoreInfo) {
throw err
} else {
// TODO: maybe this needs to check for err.code === 'E400' instead?
res = await addNewUser()
}
}
const newCreds = {}
if (res && res.token) {
newCreds.token = res.token
} else {
newCreds.username = opts.creds.username
newCreds.password = opts.creds.password
newCreds.email = opts.creds.email
newCreds.alwaysAuth = opts.creds.alwaysAuth
}
const usermsg = opts.creds.username ? ` user ${opts.creds.username}` : ''
const scopeMessage = opts.scope ? ` to scope ${opts.scope}` : ''
const userout = opts.creds.username ? ` as ${opts.creds.username}` : ''
const message = `Logged in${userout}${scopeMessage} on ${opts.registry}.`
log.info('login', `Authorized${usermsg}`)
return {
message,
newCreds,
}
}
module.exports = login